Exemplo n.º 1
0
 def test_atnl_errors(self):
     tests = [
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<number, $caste->gender>;
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<number, case->gender>{gender: fkeminine};
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<number, case->gender>{geonder: feminine};
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $Nbb<number, case->gender>{geonder: feminine};
         """,
         """
         np is noun-phrase;
         N is noun;
         npb :-
             $N<number, case->gender>{gender: feminine};
         """,
         """
         np is noun-phrase;
         N is noun;
         n--p :-
             $N<8number, case->gender>{gender: feminine};
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<num---ber, case->gender>{gender: feminine};
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<number, case->gender>{gender: ".uioou};
         """,
     ]
     for txt in tests:
         self.assertIsNone(atnl.parse(txt, self.ptc))
Exemplo n.º 2
0
 def test_atnl(self):
     tests = [
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N;
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<number, $case->gender>;
         """,
         """
         np is noun-phrase;
         N is noun;
         np :-
             $N<number, case->gender>{gender: feminine};
         """,
     ]
     for txt in tests:
         self.assertIsNotNone(atnl.parse(txt, self.ptc))