Beispiel #1
0
 def test_restructurations(self):
     self.assertEqual(
         list(tokenize_syntax("Theme.poss V Co-Theme.poss {en} Theme.prop")),
         ["Theme.poss", "V", "Co-Theme.poss", {"en"}, "Theme.prop"],
     )
     self.assertEqual(
         list(tokenize_syntax("Agent LUI<+Theme.poss> V Theme.prop")),
         ["Agent", "LUI<+Theme.poss>", "V", "Theme.prop"],
     )
Beispiel #2
0
    def test_preposition_list(self):
        self.assertEqual(list(tokenize_syntax("Agent V {{+loc}} Location")), ["Agent", "V", {"+loc"}, "Location"])
        self.assertEqual(
            list(tokenize_syntax("Agent V {pour à de} Patient")), ["Agent", "V", {"pour", "à", "de"}, "Patient"]
        )
        self.assertEqual(
            list(tokenize_syntax("Agent V {pour/à/de} Patient")), ["Agent", "V", {"pour", "à", "de"}, "Patient"]
        )

        self.assertEqual(
            list(tokenize_syntax("Agent V {à dans BAR} Location")), ["Agent", "V", {"à", "dans", "BAR"}, "Location"]
        )
        self.assertEqual(list(tokenize_syntax("Agent V {à} Location")), ["Agent", "V", {"à"}, "Location"])
        self.assertEqual(list(tokenize_syntax("Agent V {de} Location")), ["Agent", "V", {"de"}, "Location"])

        self.assertEqual(
            list(tokenize_syntax("Agent V {pour/de la part de} Patient")),
            ["Agent", "V", {"pour", "de la part de"}, "Patient"],
        )
Beispiel #3
0
 def test_restriction(self):
     self.assertEqual(list(tokenize_syntax("Agent V Theme<+de_Vinf>")), ["Agent", "V", "Theme<+de_Vinf>"])
Beispiel #4
0
 def test_simple(self):
     self.assertEqual(list(tokenize_syntax("Agent V Patient")), ["Agent", "V", "Patient"])
     self.assertEqual(list(tokenize_syntax("Agent V  Patient")), "Agent V   Patient".split())