Add some simple tests for the Basque grammar

This commit is contained in:
Inari Listenmaa
2017-10-03 15:20:52 +02:00
parent b46fcb757c
commit 103669d667
6 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# Simple tests
## Morphology of synthetic verbs
Some tests found in `ukanDu.gfs`, `ukanZaio.gfs` and `ukanDio.gfs`. I test the forms against Apertium morphological analyser, you can use your favourite Basque morphological analyser.
In this directory I run it like this:
```
gf --run < ukanDio.gfs > /tmp/Dio.txt
```
And in the directory with Apertium, I run this:
```
cat /tmp/Dio.txt | lt-proc -w eus.automorf.bin | egrep -o "\*(.*)$" | sort -u
*didagu$
...
*zatzaie$
*zintzaizkizuekete$
```
The output is forms that the GF grammar generates but the Apertium analyser doesn't recognise. Some of them are due to overgeneration: forms like "I <some V2> me" don't exist, you should use reflexive instead. So *didagu* is wrong in the sense that it doesn't exist, but there is no other form that would be more correct. For that reason, I decided to keep these forms and not replace them with an empty string or `nonExist`.
If an application grammarian needs to say "I see myself", they can just use `ReflVP` in `VerbEus`.
Some of the non-existing forms are genuine mistakes, like *zatzaie*, which should be *zatza__zki__e* instead. Then you just go to `AditzTrinkoak.gf` and fix the relevant functions.

View File

@@ -0,0 +1,6 @@
import ../basque/LangEus.gf
gt PrepNP ? (DetCN (DetQuant DefArt NumSg) (UseN girl_N)) | l -treebank -bind
gt PrepNP ? (DetCN (DetQuant DefArt NumSg) (UseN boy_N)) | l -treebank -bind
gt PrepNP ? (DetCN (DetQuant DefArt NumSg) (UseN dog_N)) | l -treebank -bind
gt PrepNP ? (DetCN (DetQuant DefArt NumSg) (UseN beer_N)) | l -treebank -bind

View File

@@ -0,0 +1,21 @@
import ../basque/LangEus.gf
import LangEng.gfo
gr -number=5 DetCN (DetQuant ? NumSg) (RelCN (UseN beer_N) (UseRCl ? ? (RelVP IdRP (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant ? ?) (UseN blood_N)))))) | l -bind -treebank
gr -number=5 DetCN (DetQuant ? NumPl) (RelCN (UseN beer_N) (UseRCl ? ? (RelVP IdRP (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant ? ?) (UseN blood_N)))))) | l -bind -treebank
gr -number=10 DetCN (DetQuant ? ?) (RelCN (UseN beer_N) (UseRCl ? ? (RelSlash IdRP (SlashVP (DetCN (DetQuant ? ?) (UseN blood_N)) (SlashV2a love_V2))))) | l -bind -treebank
gr -number=10 DetCN (DetQuant ? ?) (RelCN (UseN beer_N) (UseRCl ? ? (RelVP (FunRP ? ? IdRP) (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant ? ?) (UseN blood_N)))))) | l -bind -treebank
gr -number=10 DetCN (DetQuant ? ?) (RelCN (UseN beer_N) (UseRCl ? ? (RelSlash (FunRP ? ? IdRP) (SlashVP (DetCN (DetQuant ? ?) (UseN blood_N)) (SlashV2a love_V2))))) | l -bind -treebank
l DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant DefArt NumSg) (UseN girl_N))))))
l DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant DefArt NumPl) (UseN girl_N))))))
l DetCN (DetQuant DefArt NumPl) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant DefArt NumSg) (UseN girl_N))))))
l DetCN (DetQuant DefArt NumPl) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a love_V2) (DetCN (DetQuant DefArt NumPl) (UseN girl_N))))))
l DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN girl_N)) (SlashV2a love_V2)))))
l DetCN (DetQuant DefArt NumSg) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN girl_N)) (SlashV2a love_V2)))))
l DetCN (DetQuant DefArt NumPl) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN girl_N)) (SlashV2a love_V2)))))
l DetCN (DetQuant DefArt NumPl) (RelCN (UseN boy_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN girl_N)) (SlashV2a love_V2)))))

View File

@@ -0,0 +1,4 @@
import ../LangEus.gf
gt PhrUtt NoPConj (UttS (UseCl (TTAnt ? ?) PPos (PredVP (UsePron ?) (ComplSlash (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumSg) (UseN car_N))) (UsePron ?))))) NoVoc | l -bind
gt PhrUtt NoPConj (UttS (UseCl (TTAnt ? ?) PPos (PredVP (UsePron ?) (ComplSlash (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumPl) (UseN car_N))) (UsePron ?))))) NoVoc | l -bind

View File

@@ -0,0 +1,3 @@
import ../LangEus.gf
gt UseCl (TTAnt ? ?) PPos (PredVP (UsePron ?) (ComplSlash (SlashV2a see_V2) (UsePron ?))) | l

View File

@@ -0,0 +1,3 @@
import ../LangEus.gf
gt UseCl (TTAnt ? ?) PPos (PredVP (UsePron ?) (ComplSlash (SlashV2a like_V2) (UsePron ?))) | l