print("\nEnter your choice:\n1: Get the score of a word\n2: Get the average score of words in a file (one word per line)\n3: Find the highest/lowest scoring words in a file\n4: Sort words from a file into positive.txt and negative.txt\n5: Exit the program\n")
choice=choice_input()
ifchoiceis1:
key=input("Enter word to search :\n")
average=score_of_word(review,key)
print("\nScore of \"",key,"\"is",average,"\n")
average,number=option1(review,key)
print("\nScore of \"",key,"\"appears",number," times with an average sentiment of",average,"\n")
elifchoiceis2:
average_score(review)
elifchoiceis3:
...
...
@@ -39,7 +39,7 @@ def preloading(raw_input):
foriinrange(0,len(raw_input)):#iterates over the line
tokens=raw_input[i].split()
forindexinrange(0,len(tokens)):#iterates over the word
forindexinrange(1,len(tokens)):#iterates over the word