1
0
forked from GitHub/gf-core

*** empty log message ***

This commit is contained in:
peb
2004-06-02 11:17:15 +00:00
parent 9b0a968597
commit 7716f81886
7 changed files with 72 additions and 26 deletions

View File

@@ -1,8 +1,16 @@
abstract MicroAbs = {
cat S;
cat S; V; VV; W;
fun vars : S;
fun
sv : V -> S;
vars : VV;
ww : W -> W;
svw : V -> W -> S;
supr : V -> V -> S;
supredup : S -> S -> S;
suplbl : V -> S;
reorder : V -> V -> V;
}

View File

@@ -1,10 +1,26 @@
concrete MicroCnc of MicroAbs = {
concrete MicroCnc of MicroAbs = open MicroRes in {
lincat S = {a : {s1:Str ; s2:Str}};
lincat
S = {s : Str};
VV = {a : {s1:Str ; s2:Str}};
V = {s1 : Str ; s2 : Str ; p : PQ};
W = {s : Num => Str ; p : PQ => Num};
lin vars = {a = variants { {s1="a" ; s2=variants{"b";"c"}} ; {s1="d";s2="e"} }};
lin
sv x = {s = x.s1 ++ x.s2};
vars = {a = variants { {s1="a" ; s2=variants{"b";"c"}} ; {s1="d";s2="e"} }};
ww x = {s = table {Sg => x.s!(x.p!P);
Pl => x.s!(x.p!Q Pl)};
p = table {P => Sg ; Q n => n}};
svw x y = {s = x.s2 ++ y.s!(y.p!x.p) ++ x.s1};
supr x y = {s = x.s1 ++ "a" ++ x.s2};
supredup x y = {s = x.s ++ "b" ++ x.s};
suplbl x = {s = x.s1};
reorder x y = {s1 = x.s2 ++ y.s1 ++ x.s1;
s2 = y.s2 ++ y.s1;
p = x.p};
}

View File

@@ -2,14 +2,16 @@
abstract SimpleAbs = {
cat
S; VP; NP; V; N; D;
S; VP; NP; V; N; D; P; PP;
fun
cyclic : S -> S;
mkS : NP -> V -> S;
mkS : NP -> VP -> S;
mkVP : V -> NP -> VP;
mkNP1 : D -> N -> NP;
mkNP2 : N -> NP;
mkNP3 : NP -> PP -> NP;
mkPP : P -> NP -> PP;
robin : NP;
dog : N;
@@ -18,6 +20,7 @@ love : V;
hate : V;
one : D;
all : D;
inside : P;
}

View File

@@ -8,6 +8,8 @@ NP = {s : Str ; n : Num};
V = {s : Num => Str};
N = {s : Num => Str};
D = {s : Str ; n : Num};
P = {s : Str};
PP = {s : Str};
lin
cyclic x = x;
@@ -15,6 +17,8 @@ mkS x y = {s = x.s ++ y.s ! x.n};
mkVP x y = {s = table {n => x.s ! n ++ y.s}};
mkNP1 x y = {s = x.s ++ y.s ! x.n ; n = x.n};
mkNP2 x = {s = x.s ! Pl ; n = Pl};
mkNP3 x y = {s = x.s ++ y.s; n = x.n};
mkPP x y = {s = x.s ++ y.s};
robin = {s = "Robin" ; n = Sg};
dog = {s = table {Sg => "dog" ; Pl => "dogs"}};
@@ -23,6 +27,7 @@ love = {s = table {Sg => "loves" ; Pl => "love"}};
hate = {s = table {Sg => "hates" ; Pl => "hate"}};
one = {s = "one" ; n = Sg};
all = {s = "all" ; n = Pl};
inside= {s = "in"};
}