mirror of
https://github.com/GrammaticalFramework/comp-syntax-gu-mlt.git
synced 2026-04-08 21:29:32 -06:00
lecture 2 examples
This commit is contained in:
21
lectures/lecture02/Nano.gf
Normal file
21
lectures/lecture02/Nano.gf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
abstract Nano = {
|
||||||
|
|
||||||
|
cat
|
||||||
|
S ; NP ; VP ; CN ;
|
||||||
|
Det ; Pron ; A ; N ; V2 ;
|
||||||
|
|
||||||
|
fun
|
||||||
|
PredVPS : NP -> VP -> S ;
|
||||||
|
ComplV2 : V2 -> NP -> VP ;
|
||||||
|
DetCN : Det -> CN -> NP ;
|
||||||
|
AdjCN : A -> CN -> CN ;
|
||||||
|
UseCN : N -> CN ;
|
||||||
|
UsePron : Pron -> NP ;
|
||||||
|
|
||||||
|
the_Det : Det ;
|
||||||
|
black_A : A ;
|
||||||
|
cat_N : N ;
|
||||||
|
see_V2 : V2 ;
|
||||||
|
we_Pron : Pron ;
|
||||||
|
|
||||||
|
}
|
||||||
33
lectures/lecture02/NanoEng.gf
Normal file
33
lectures/lecture02/NanoEng.gf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
concrete NanoEng of Nano = {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
S = Str ;
|
||||||
|
NP, Pron = {s : Case => Str ; n : Number} ;
|
||||||
|
VP, V2 = Number => Str ;
|
||||||
|
CN, Det = Str ;
|
||||||
|
A, N = Str ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
PredVPS np vp = np.s ! Nom ++ vp ! np.n ;
|
||||||
|
ComplV2 v2 np = table {n => v2 ! n ++ np.s ! Acc} ;
|
||||||
|
DetCN det cn =
|
||||||
|
{s = table {c => det ++ cn} ; n = Sg} ;
|
||||||
|
AdjCN a cn = a ++ cn ;
|
||||||
|
UseCN n = n ;
|
||||||
|
UsePron pron = pron ;
|
||||||
|
|
||||||
|
the_Det = "the" ;
|
||||||
|
black_A = "black" ;
|
||||||
|
cat_N = "cat" ;
|
||||||
|
see_V2 =
|
||||||
|
table {Sg => "sees" ; Pl => "see"} ;
|
||||||
|
we_Pron = {
|
||||||
|
s = table {Nom => "we" ; Acc => "us"} ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
param
|
||||||
|
Number = Sg | Pl ;
|
||||||
|
Case = Nom | Acc ;
|
||||||
|
|
||||||
|
}
|
||||||
21
lectures/lecture02/NanoIta.gf
Normal file
21
lectures/lecture02/NanoIta.gf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
concrete NanoIta of Nano = {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
S, NP, VP, CN,
|
||||||
|
Det, Pron, A, N, V2 = Str ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
PredVPS np vp = np ++ vp ;
|
||||||
|
ComplV2 v2 np = np ++ v2 ;
|
||||||
|
DetCN det cn = det ++ cn ;
|
||||||
|
AdjCN a cn = cn ++ a ;
|
||||||
|
UseCN n = n ;
|
||||||
|
UsePron pron = pron ;
|
||||||
|
|
||||||
|
the_Det = "il" ;
|
||||||
|
black_A = "nero" ;
|
||||||
|
cat_N = "gatto" ;
|
||||||
|
see_V2 = "vede" ;
|
||||||
|
we_Pron = "ci" ;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user