Question: CREATING A SET OF RULES Use Table 4.2 (from https://www.nltk.org/book/ch01.html) to create some potential rules/characteriztics for identifying whether a word is a verb. For example,

 CREATING A SET OF RULES Use Table 4.2 (from https://www.nltk.org/book/ch01.html) to

CREATING A SET OF RULES Use Table 4.2 (from https://www.nltk.org/book/ch01.html) to create some potential rules/characteriztics for identifying whether a word is a verb. For example, if the word ends in ing then it can be considered a verb. Another simple rule to implement is to see if the word is in our list_of_verbs. def is_word_a_verb(word): word.endswith(ing) if len(word) pass DATA TO TEST PERFORMANCE OF CODE An example of what the test data could look like is the following list of words: testing_data = [ "hat", "run", "sadness", "crying", "chew", "kiss" ] Your code will take one word at a time from the list and determine whether the word was a verb or not. For example: would return False, whereas: is_word_a_verb("crying") would return Note that the list of words in are unrelated to each other, meaning they are not necessarily from the same sentence (or even the same document)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!