Skip to content

Instantly share code, notes, and snippets.

@ugik
Created January 11, 2017 17:40
Show Gist options
  • Save ugik/751849122751ba2380ff86a6528a85bb to your computer and use it in GitHub Desktop.
Save ugik/751849122751ba2380ff86a6528a85bb to your computer and use it in GitHub Desktop.
part 5
# we can now calculate a score for a new sentence
sentence = "good day for us to have lunch?"
# now we can find the class with the highest score
for c in class_words.keys():
print ("Class: %s Score: %s \n" % (c, calculate_class_score(sentence, c)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment