summaryrefslogtreecommitdiff
path: root/examples/phrasebook/SentencesEst.gf
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2018-04-30 16:38:20 +0200
committerInari Listenmaa <inari.listenmaa@gmail.com>2018-04-30 16:38:20 +0200
commitece39a887978b41c0f268de516c0a21e84c0d554 (patch)
treed4ee04eb8e27415dea6f20b41214abfb2fc8deed /examples/phrasebook/SentencesEst.gf
parenta0fc1dfddd4bda696ed84db918733b31b1eccc86 (diff)
Estonian Phrasebook: '<Nationality> restaurant' and 'NN is <Nationality>' use different forms
Diffstat (limited to 'examples/phrasebook/SentencesEst.gf')
-rw-r--r--examples/phrasebook/SentencesEst.gf22
1 files changed, 15 insertions, 7 deletions
diff --git a/examples/phrasebook/SentencesEst.gf b/examples/phrasebook/SentencesEst.gf
index 2615f7434..667880f33 100644
--- a/examples/phrasebook/SentencesEst.gf
+++ b/examples/phrasebook/SentencesEst.gf
@@ -1,7 +1,7 @@
concrete SentencesEst of Sentences = NumeralEst ** SentencesI -
[NameNN, ObjMass,
- NPPlace, CNPlace, placeNP, mkCNPlace, mkCNPlacePl,
- CitiNat,
+ NPPlace, CNPlace, placeNP, mkCNPlace, mkCNPlacePl, NPNationality, mkNPNationality,
+ CitiNat, Citizenship, Nationality, ACitizen, PropCit, PCitizenship,
GObjectPlease
] with
(Syntax = SyntaxEst),
@@ -11,9 +11,15 @@ concrete SentencesEst of Sentences = NumeralEst ** SentencesI -
flags optimize = noexpand ;
+ lincat
+ Citizenship = ACitizenship ;
+ Nationality = NPNationality ;
+
oper
- NPPlace = {name : NP ; at : Adv ; to : Adv ; from : Adv} ;
- CNPlace = {name : CN ; at : Prep ; to : Prep ; from : Prep ; isPl : Bool} ;
+ NPPlace : Type = {name : NP ; at : Adv ; to : Adv ; from : Adv} ;
+ CNPlace : Type = {name : CN ; at : Prep ; to : Prep ; from : Prep ; isPl : Bool} ;
+ ACitizenship : Type = { prop : A ; nat : A } ;
+ NPNationality : Type = ACitizenship ** {lang : NP ; country : NP} ;
placeNP : Det -> CNPlace -> NPPlace = \det,kind ->
let name : NP = mkNP det kind.name in {
@@ -50,6 +56,8 @@ concrete SentencesEst of Sentences = NumeralEst ** SentencesI -
GObjectPlease o = lin Text (mkPhr noPConj (mkUtt o) (lin Voc (ss "palun"))) ;
- CitiNat n = n.prop ;
-
- }
+ CitiNat n = n ; -- keep just prop and nat fields
+ PropCit c = c.prop ;
+ PCitizenship c = mkPhrase (mkUtt (mkAP c.prop)) ;
+ ACitizen p n = mkCl p.name n.nat ;
+}