mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 10:19:32 -06:00
lrec tutorial examples
This commit is contained in:
14
examples/lrec-tutorial/face/Face.gf
Normal file
14
examples/lrec-tutorial/face/Face.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
abstract Face = {
|
||||
|
||||
flags startcat = Message ;
|
||||
|
||||
cat
|
||||
Message ; Person ; Object ; Number ;
|
||||
fun
|
||||
Have : Person -> Number -> Object -> Message ;
|
||||
Like : Person -> Object -> Message ;
|
||||
You : Person ;
|
||||
Friend, Invitation : Object ;
|
||||
One, Two, Hundred : Number ;
|
||||
|
||||
}
|
||||
22
examples/lrec-tutorial/face/FaceEn0.gf
Normal file
22
examples/lrec-tutorial/face/FaceEn0.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete FaceEn0 of Face = open SyntaxEng, ParadigmsEng in {
|
||||
lincat
|
||||
Message = Cl ;
|
||||
Person = NP ;
|
||||
Object = CN ;
|
||||
Number = Numeral ;
|
||||
lin
|
||||
Have p n o = mkCl p have_V2 (mkNP n o) ;
|
||||
Like p o = mkCl p like_V2 (mkNP this_Quant o) ;
|
||||
You = mkNP youSg_Pron ;
|
||||
Friend = mkCN friend_N ;
|
||||
Invitation = mkCN invitation_N ;
|
||||
One = n1_Numeral ;
|
||||
Two = n2_Numeral ;
|
||||
Hundred = n100_Numeral ;
|
||||
oper
|
||||
like_V2 = mkV2 "like" ;
|
||||
invitation_N = mkN "invitation" ;
|
||||
friend_N = mkN "friend" ;
|
||||
}
|
||||
7
examples/lrec-tutorial/face/FaceEng.gf
Normal file
7
examples/lrec-tutorial/face/FaceEng.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete FaceEng of Face = FaceI with
|
||||
(Syntax = SyntaxEng),
|
||||
(LexFace = LexFaceEng) ;
|
||||
|
||||
|
||||
7
examples/lrec-tutorial/face/FaceFin.gf
Normal file
7
examples/lrec-tutorial/face/FaceFin.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete FaceFin of Face = FaceI with
|
||||
(Syntax = SyntaxFin),
|
||||
(LexFace = LexFaceFin) ;
|
||||
|
||||
|
||||
17
examples/lrec-tutorial/face/FaceI.gf
Normal file
17
examples/lrec-tutorial/face/FaceI.gf
Normal file
@@ -0,0 +1,17 @@
|
||||
incomplete concrete FaceI of Face = open Syntax, LexFace in {
|
||||
|
||||
lincat
|
||||
Message = Cl ;
|
||||
Person = NP ;
|
||||
Object = CN ;
|
||||
Number = Numeral ;
|
||||
lin
|
||||
Have p n o = mkCl p have_V2 (mkNP n o) ;
|
||||
Like p o = mkCl p like_V2 (mkNP this_Quant o) ;
|
||||
You = mkNP youSg_Pron ;
|
||||
Friend = mkCN friend_N ;
|
||||
Invitation = mkCN invitation_N ;
|
||||
One = n1_Numeral ;
|
||||
Two = n2_Numeral ;
|
||||
Hundred = n100_Numeral ;
|
||||
}
|
||||
8
examples/lrec-tutorial/face/FaceIta.gf
Normal file
8
examples/lrec-tutorial/face/FaceIta.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete FaceIta of Face = FaceI - [Like] with
|
||||
(Syntax = SyntaxIta),
|
||||
(LexFace = LexFaceIta) ** open SyntaxIta in {
|
||||
lin Like p o =
|
||||
mkCl (mkNP this_Quant o) like_V2 p ;
|
||||
}
|
||||
8
examples/lrec-tutorial/face/LexFace.gf
Normal file
8
examples/lrec-tutorial/face/LexFace.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
interface LexFace = open Syntax in {
|
||||
|
||||
oper
|
||||
like_V2 : V2 ;
|
||||
invitation_N : N ;
|
||||
friend_N : N ;
|
||||
|
||||
}
|
||||
8
examples/lrec-tutorial/face/LexFaceEng.gf
Normal file
8
examples/lrec-tutorial/face/LexFaceEng.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
instance LexFaceEng of LexFace = open SyntaxEng, ParadigmsEng in {
|
||||
|
||||
oper
|
||||
like_V2 = mkV2 "like" ;
|
||||
invitation_N = mkN "invitation" ;
|
||||
friend_N = mkN "friend" ;
|
||||
|
||||
}
|
||||
7
examples/lrec-tutorial/face/LexFaceFin.gf
Normal file
7
examples/lrec-tutorial/face/LexFaceFin.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
instance LexFaceFin of LexFace = open SyntaxFin, ParadigmsFin in {
|
||||
|
||||
oper
|
||||
like_V2 = mkV2 (mkV "pitää") elative ;
|
||||
invitation_N = mkN "kutsu" ;
|
||||
friend_N = mkN "ystävä" ;
|
||||
}
|
||||
6
examples/lrec-tutorial/face/LexFaceIta.gf
Normal file
6
examples/lrec-tutorial/face/LexFaceIta.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
instance LexFaceIta of LexFace = open SyntaxIta, ParadigmsIta in {
|
||||
oper
|
||||
like_V2 = mkV2 (mkV (piacere_64 "piacere")) dative ;
|
||||
invitation_N = mkN "invito" ;
|
||||
friend_N = mkN "amico" ;
|
||||
}
|
||||
Reference in New Issue
Block a user