Created
January 11, 2017 17:40
-
-
Save ugik/751849122751ba2380ff86a6528a85bb to your computer and use it in GitHub Desktop.
part 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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