Exemplo n.º 1
0
def dataInitializer():
  parsing_emotions.buildSets()
Exemplo n.º 2
0
def createPlaylist(mood, level):
  i = 5
  song_set = []
  seed = getSeedArtist()
  while i > 0:
    seed = getSeedArtist()
    singer = getSimilarArtist(seed)
    song = getSongForMood(mood, singer, level)
    song_set.append(song)
    i -= 1

  return song_set

if __name__ == "__main__":
  parsing_emotions.buildSets()
  #print list(angerSet)

  tweets = parsing_emotions.get_five_tweets("itsmeaditi_")
  #print(tweettexts)

  (e_counts, s_counts) = parsing_emotions.getCounts(tweets)

  e_max = parsing_emotions.getMaxCount(e_counts)

  song_set = createPlaylist(e_max, 1)
  print song_set

  #print list(counts)
  #print list(sent_counts)