From d045e26217e58b9c1eb46832fc2148caebe57167 Mon Sep 17 00:00:00 2001 From: Kevin Brubeck Unhammer Date: Tue, 5 Sep 2023 10:09:02 +0200 Subject: [PATCH] Tests for reparse #80 --- tests/Reparse.input | 1 + tests/Reparse.output | 1 + tests/Reparse.rtx | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 tests/Reparse.input create mode 100644 tests/Reparse.output create mode 100644 tests/Reparse.rtx diff --git a/tests/Reparse.input b/tests/Reparse.input new file mode 100644 index 0000000..1d57c47 --- /dev/null +++ b/tests/Reparse.input @@ -0,0 +1 @@ +^ja/ja$ ^Jämtlánda<@→N>/Jämtlánnda<@→N>$ ^regiovdna<@→P>/regiåvnnå<@→P>$ ^dáfus<@ADVL>/gáktuj<@ADVL>$^./.$ diff --git a/tests/Reparse.output b/tests/Reparse.output new file mode 100644 index 0000000..6827ef1 --- /dev/null +++ b/tests/Reparse.output @@ -0,0 +1 @@ +^ja$ ^Jämtlánnda$ ^regiåvnnå$ ^gáktuj$^.$ diff --git a/tests/Reparse.rtx b/tests/Reparse.rtx new file mode 100644 index 0000000..b0b75f3 --- /dev/null +++ b/tests/Reparse.rtx @@ -0,0 +1,42 @@ +!!!!!!!!!!!!!!! +!! ATTRIBUTE CATEGORIES +!!!!!!!!!!!!!!! + +function = "@→N" "@→P" "@ADVL" ; +number = sg du pl ; +case = acc nom gen loc ine ela com ess ill ; + +!!!!!!!!!!!!!!! +!! OUTPUT PATTERNS +!!!!!!!!!!!!!!! + +NP: _.number.case.function ; +PP: _ ; + +Name: _.number.case.function ; +N: _.number.case.function ; +n: .number.case; + +post: _ ; + +np: .number.case ; + + +!!!!!!!!!!!!!!! +!! REDUCTION RULES +!!!!!!!!!!!!!!! + +N -> "N:n" %n { %1 } ; + +Name -> "N:np" %np { %1 } + | "NP:N Name" N %Name {1 _ %2 } !gonagas Harald + | "NP:N Name" np %Name {1 _ %2 } ! + | "NP:N Name" Name %N {1 _ %2 } ! ! Verdens Gang aviisii + ; + +NP -> "NP: N" %N { %1 } ; + + +PP -> "PP N post" N %post { 1 _ %2 } + | "lone post" %post { 1 } + ;