def test2_relationshipOrder(self): string = "Show me the names of people who have parents." t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_1)
def test2_match_label_and_property(self): string = "what are the names of all the people?" t = Tokenize(string) self.assertEqual(t.match_label_and_property(t.wordsTagged), self.query1_1)
def test4_match_label_and_property(self): string = "How many names start with J?" t = Tokenize(string) self.assertEqual(t.match_label_and_property(t.wordsTagged), -1)
def test2_return_multiple_labels(self): string = "Who are the animals, outlaws and persons" t = Tokenize(string) self.assertEqual(t.return_multiple_labels(t.wordsTagged), self.query2_2)
def test4_return_multiple_labels(self): string = "show me the shoe size of the people and outlaws" t = Tokenize(string) self.assertEqual(t.return_multiple_labels(t.wordsTagged), self.query2_4)
def test24_numberStartsWith(self): string = "What is the number of names that have a J in any position" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_3)
def test4_numberNullOrNot(self): string = "How many animals have an unknown specie" t = Tokenize(string) self.assertEqual(t.numberNullOrNot(t.wordsTagged), self.query6_2)
def test10_relationshipOrder(self): string = "Show me everyone that dislikes anything." t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_5)
def test8_numberStartsWith(self): string = "How many names have a J at the beginning" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_1)
def test8_relationshipOrder(self): string = "Show me everyone that is a parent." t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_4)
def test9_relationshipOrder(self): string = "Who dislikes something?" t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_5)
def test7_relationshipOrder(self): string = "Who are parents?." t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_4)
def test4_relationshipOrder(self): string = "Show me the sizes of people who like anything." t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_2)
def test3_relationshipOrder(self): string = "What are the sizes of everyone with that likes someone?" t = Tokenize(string) self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_2)
def test22_numberStartsWith(self): string = "How many names have a J in any position" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_3)
def test_stopWords_capitalized(self): string = "FROM ABOVE INTO MYSELF" t = Tokenize(string) self.assertEqual(t.wordsTagged, []);
def test23_numberStartsWith(self): string = "What is the number of names that contain a J" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_3)
def test11_numberStartsWith(self): string = "What is the number of names that begin with J" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_1)
def test3_numberNullOrNot(self): string = "What is the number of animals with an unknown specie" t = Tokenize(string) self.assertEqual(t.numberNullOrNot(t.wordsTagged), self.query6_2)
def test17_numberStartsWith(self): string = "How many names have a J as the last Letter" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_2)
def test1_return_multiple_labels(self): string = "Who are all the animals and outlaws" t = Tokenize(string) self.assertEqual(t.return_multiple_labels(t.wordsTagged), self.query2_1)
def test_keptStopWords(self): string = "How do you do" t = Tokenize(string) self.assertEqual(t.wordsTagged, [('how', 'WRB')]);
def test3_return_multiple_labels(self): string = "What are the sizes of each outlaw and person" t = Tokenize(string) self.assertEqual(t.return_multiple_labels(t.wordsTagged), self.query2_3)
def test19_numberStartsWith(self): string = "What is the number of names that have a J at the end" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_2)
def test5_return_multiple_labels(self): string = "What are the names of the outlaws?" t = Tokenize(string) self.assertEqual(t.return_multiple_labels(t.wordsTagged), -1)
def test20_numberStartsWith(self): string = "What is the number of names whose last letter is J" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_2)
def test3_match_label_and_property(self): string = "WHAT ARE THE NAMES OF ALL THE PEOPLE?" t = Tokenize(string) self.assertEqual(t.match_label_and_property(t.wordsTagged), self.query1_1)
def test21_numberStartsWith(self): string = "How many names end with J" t = Tokenize(string) self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_2)
def test5_match_label_and_property(self): string = "Who are the people that are outlaws?" t = Tokenize(string) self.assertEqual(t.match_label_and_property(t.wordsTagged), -1)
def test_stopWords(self): string = "from above into myself" t = Tokenize(string) self.assertEqual(t.wordsTagged, [])