1
0
forked from GitHub/gf-core

Add unit test for missing lins

This commit is contained in:
John J. Camilleri
2021-02-21 14:05:31 +01:00
parent dca2ebaf72
commit 9942908df9
4 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
abstract Missing = {
cat S; NP; V2;
fun
Pred: NP -> V2 -> NP -> S;
John, Dogs, Fish: NP ;
Love, Eat: V2 ;
}

View File

@@ -0,0 +1,12 @@
Missing: Pred John Love Fish
MissingCnc: John loves fish a lot
Missing: Pred John Eat Fish
MissingCnc: John [Eat] fish [Eat]
Missing: Pred Fish Love Dogs
MissingCnc: fish love [Dogs] a lot
Missing: Pred Dogs Eat Fish
MissingCnc: [Dogs] [Eat] fish [Eat]

View File

@@ -0,0 +1,4 @@
Pred John Love Fish
Pred John Eat Fish
Pred Fish Love Dogs
Pred Dogs Eat Fish

View File

@@ -0,0 +1,25 @@
concrete MissingCnc of Missing = open Prelude, ParamX in {
lincat
S = SS ;
NP = { s : Str ; n : Number } ;
V2 = { s : Number => Str; s2 : Str } ;
lin
Pred subj verb obj = ss (subj.s ++ verb.s ! subj.n ++ obj.s ++ verb.s2) ;
John = { s = "John" ; n = Sg } ;
-- Dogs = { s = "dogs" ; n = Pl } ;
Fish = { s = "fish" ; n = Pl } ;
Love = {
s = table {
Sg => "loves" ;
Pl => "love"
} ;
s2 = "a lot"
} ;
-- Eat = {
-- s = table {
-- Sg => "eats" ;
-- Pl => "eat"
-- } ;
-- s2 = "often"
-- } ;
}