Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 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)
Example #6
0
 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)
Example #7
0
 def test4_numberNullOrNot(self):
     string = "How many animals have an unknown specie"
     t = Tokenize(string)
     self.assertEqual(t.numberNullOrNot(t.wordsTagged), self.query6_2)
Example #8
0
 def test10_relationshipOrder(self):
     string = "Show me everyone that dislikes anything."
     t = Tokenize(string)
     self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_5)
Example #9
0
 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)
Example #10
0
 def test8_relationshipOrder(self):
     string = "Show me everyone that is a parent."
     t = Tokenize(string)
     self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_4)
Example #11
0
 def test9_relationshipOrder(self):
     string = "Who dislikes something?"
     t = Tokenize(string)
     self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_5)
Example #12
0
 def test7_relationshipOrder(self):
     string = "Who are parents?."
     t = Tokenize(string)
     self.assertEqual(t.relationshipOrder(t.wordsTagged), self.query7_4)
Example #13
0
 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)
Example #14
0
 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)
Example #15
0
 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)
Example #16
0
 def test_stopWords_capitalized(self):
     string = "FROM ABOVE INTO MYSELF"
     t = Tokenize(string)
     self.assertEqual(t.wordsTagged, []);
Example #17
0
 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)
Example #18
0
 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)
Example #19
0
 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)
Example #20
0
 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)
Example #21
0
 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)
Example #22
0
 def test_keptStopWords(self):
     string = "How do you do"
     t = Tokenize(string)
     self.assertEqual(t.wordsTagged, [('how', 'WRB')]);
Example #23
0
 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)
Example #24
0
 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)
Example #25
0
 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)
Example #26
0
 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)
Example #27
0
 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)
Example #28
0
 def test21_numberStartsWith(self):
     string = "How many names end with J"
     t = Tokenize(string)
     self.assertEqual(t.numberStartsWith(t.wordsTagged), self.query5_2)
Example #29
0
 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)
Example #30
0
 def test_stopWords(self):
     string = "from above into myself"
     t = Tokenize(string)
     self.assertEqual(t.wordsTagged, [])