Beispiel #1
0
 def test_difficult_word(self):
     """
     """
     pass
     aligned_token = AlignedToken(reference="that", outputs=["but"])
     print("that", aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.UNKNOWN)
Beispiel #2
0
 def test_same_meaning(self):
     """
     """
     pass
     aligned_token = AlignedToken(reference="gonna",
                                  outputs=["going", "to"])
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_MEANING)
Beispiel #3
0
 def test_plural5(self):
     """
     """
     aligned_token = AlignedToken(reference="enable", outputs=["enables"])
     print('reference="enable", outputs=["enables"]',
           aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.PLURAL)
Beispiel #4
0
 def test_2(self):
     """
     I think we can add more typr
     """
     aligned_token = AlignedToken(reference="i've", outputs=["ive"])
     print("i've, outputs=[ive", aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.NOT_IN_WORD_NET)
Beispiel #5
0
 def test_verb_tense2(self):
     """
     """
     aligned_token = AlignedToken(reference="deposes", outputs=["deposed"])
     print('reference="deposes", outputs=["deposed"]',
           aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_STEM_OTHER)
Beispiel #6
0
 def test_verb_tense_BE(self):
     """
     MAYBE WE CAN HAVE ONE MOE FOR be
     """
     aligned_token = AlignedToken(reference="are", outputs=["were"])
     print('reference="are", outputs=["were"]', aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.BE_VERB)
Beispiel #7
0
 def test_name(self):
     """
     """
     pass
     aligned_token = AlignedToken(reference="cindy", outputs=["sindy"])
     print("daryl", aligned_token.classify())
     self.assertEqual(aligned_token.classify(),
                      ErrorType.IS_BOTH_NAME_MATCH)
Beispiel #8
0
 def test_number(self):
     """
     """
     # pass
     aligned_token = AlignedToken(reference="eighteenth",
                                  outputs=["eighteen"])
     print("eighteen", aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.NUMBER)
Beispiel #9
0
 def test_plural3(self):
     """
     """
     aligned_token = AlignedToken(reference="nebuchadnezzar's",
                                  outputs=["nebuchadnezzars's"])
     print("reference=nebuchadnezzar's, outputs=[nebuchadnezzars's]",
           aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_STEM_OTHER)
Beispiel #10
0
 def test_1(self):
     """
     """
     aligned_token = AlignedToken(reference="lords", outputs=["lord's"])
     print("lords, outputs=[lord's]", aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_STEM_OTHER)
Beispiel #11
0
 def test_name2(self):
     """
     """
     aligned_token = AlignedToken(reference="daryl", outputs=["H"])
     print("daryl", aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.IS_REFERENCE_NAME)
Beispiel #12
0
 def test_possessive(self):
     """
     """
     aligned_token = AlignedToken(reference="daniel", outputs=["daniel's"])
     print("reference=daniel, outputs=[daniel's]", aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_STEM_OTHER)
Beispiel #13
0
 def test_split(self):
     """
     """
     aligned_token = AlignedToken(reference="todo", outputs=["to", "do"])
     print('todo', aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SPLIT)
Beispiel #14
0
 def test_same_stem2(self):
     """
     """
     aligned_token = AlignedToken(reference="asking", outputs=["ask"])
     print('asking", outputs=["ask', aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_STEM_OTHER)
Beispiel #15
0
 def test_same_stem(self):
     """
     """
     aligned_token = AlignedToken(reference="hope", outputs=["hopeful"])
     print('hope", outputs=["hopeful', aligned_token.classify())
     self.assertEqual(aligned_token.classify(), ErrorType.SAME_STEM_OTHER)
Beispiel #16
0
 def test_double(self):
     """
     """
     aligned_token = AlignedToken(reference="to", outputs=["to", "to"])
     self.assertEqual(aligned_token.classify(), ErrorType.DOUBLE)