Commit c53ca5eb authored by POGODALLA Sylvain's avatar POGODALLA Sylvain
Browse files

No commit message

No commit message
parent 143f69ac
load d ../data/more.acg;
more analyse FOCUS JOHN (lambda x. Lambda d.LIKE d MARY x) THE_MOST : S;
more analyse FOCUS MARY (lambda y .Lambda d.LIKE d y JOHN) THE_MOST : S;
more analyse LIKE THE_MOST MARY JOHN :S;
load d ../data/more-3.acg;
more_sem analyse LIKE_1 THE_MOST (FOCUS MARY) JOHN : S;
more_sem analyse LIKE_2 THE_MOST MARY (FOCUS JOHN) : S;
#more analyse FOCUS MARY (lambda y .Lambda d.LIKE d y JOHN) THE_MOST : S;
#more analyse LIKE THE_MOST MARY JOHN :S;
signature syntax =
signature syntax =
NP,S,DEG:type;
JOHN,MARY:NP;
LIKE : DEG => NP => NP => S;
......@@ -38,67 +38,3 @@ lexicon more(syntax) : semantics =
end
signature syntax2 =
NP,S,DEG:type;
JOHN,MARY:NP;
LIKE : DEG => NP -> NP -> S;
THE_MOST : DEG;
(* FOCUS : NP -> (NP -> DEG -> S) -> DEG -> S;*)
end
signature strings =
s : type;
string=s->s:type;
infix + = lambda f g x . f (g x) : string -> string -> string;
john,mary,likes,the,most:string;
prefix ` : string -> string;
end
lexicon more2(syntax2) : strings =
NP, S,DEG := string;
JOHN := john;
MARY := mary;
LIKE := Lambda d. lambda O S. S + likes + O + d;
THE_MOST := the+ most;
(* FOCUS := lambda n P d.P (`n) d;*)
end
signature semantics2 =
i,o,d:type;
J,M:i;
like : i -> i ->o;
binder All : (i =>o) -> o;
infix > : o -> o -> o;
not_eq : i -> i -> o ;
infix < : d -> d -> o;
D : (i=>o) -> (i -> d);
dummy : i => (i=>o) =>o;
end
lexicon more3(syntax2) : semantics2 =
NP := (i => o ) -> o;
S := o;
DEG := i => (i=>o) =>o;
JOHN := lambda P.P J;
MARY := lambda P.P M;
LIKE := Lambda d. lambda O S.S(Lambda x.O(Lambda y.like x y));
THE_MOST := Lambda x P.All y. (not_eq y x) > ((D P y)<(D P x));
(* FOCUS := lambda P Q D.Q(lambda X.P(Lambda y. D y X))dummy;*)
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment