Add more unit tests for missing lin functions

This commit is contained in:
John J. Camilleri
2021-08-10 11:32:51 +02:00
parent 42bdee1e5f
commit b96fa7e08a
5 changed files with 156 additions and 18 deletions

View File

@@ -1,13 +1,22 @@
concrete MissingCnc of Missing = open Prelude, ParamX in {
lincat
S = SS ;
Det = { s : Str ; n : Number } ;
N = { s : Number => Str } ;
NP = { s : Str ; n : Number } ;
V2 = { s : Number => Str; s2 : Str } ;
-- A = { s : Number => 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 } ;
ASg = { s = "a" ; n = Sg } ;
-- APl = { s = "" ; n = Pl } ;
-- TheSg = { s = "the" ; n = Sg } ;
-- ThePl = { s = "the" ; n = Pl } ;
Dog = { s = table { Sg => "dog" ; Pl => "dogs" } } ;
-- Fish = { s = \\_ => "fish" } ;
Love = {
s = table {
Sg => "loves" ;
@@ -22,4 +31,10 @@ concrete MissingCnc of Missing = open Prelude, ParamX in {
-- } ;
-- s2 = "often"
-- } ;
-- Big = { s = \\_ => "big" } ;
-- Red = { s = \\_ => "red" } ;
mkNP d n = { s = d.s ++ n.s ! d.n ; n = d.n } ;
-- mkANP d a n = { s = d.s ++ a.s ! d.n ++ n.s ! d.n ; n = d.n } ;
}