diff options
| author | aarne <aarne@chalmers.se> | 2015-11-09 10:43:24 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2015-11-09 10:43:24 +0000 |
| commit | 73861c2993405a907d032ec42ef19a8cb98358b5 (patch) | |
| tree | 247cc98f9d4b980cafb35aafe9d744167af6d489 /examples/phrasebook/SentencesEst.gf | |
| parent | ce6557f1f216f68668752319001ac36c29a03c4d (diff) | |
started Estonian phrasebook modules to test AppEst
Diffstat (limited to 'examples/phrasebook/SentencesEst.gf')
| -rw-r--r-- | examples/phrasebook/SentencesEst.gf | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/examples/phrasebook/SentencesEst.gf b/examples/phrasebook/SentencesEst.gf new file mode 100644 index 000000000..735f0376f --- /dev/null +++ b/examples/phrasebook/SentencesEst.gf @@ -0,0 +1,62 @@ +--# -coding=latin1 +concrete SentencesEst of Sentences = NumeralEst ** SentencesI + +{- ---- TODO functor exceptions + - [Is, IsMass, NameNN, ObjMass, + IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale, + WeMale, WeFemale, YouPlurFamMale, YouPlurFamFemale, YouPlurPolFemale, YouPlurPolMale, + NPPlace, CNPlace, placeNP, mkCNPlace, mkCNPlacePl, + GObjectPlease, + NPNationality, mkNPNationality, + Country, PCountry + ] +-} + + +with + (Syntax = SyntaxEst), + (Symbolic = SymbolicEst), + (Lexicon = LexiconEst) ** + open SyntaxEst, ExtraEst, (P = ParadigmsEst), (V = VerbEst), Prelude in { + +{- ---- TODO: functor exceptions for Est + + lincat + Country = {np : NP ; isExternal : Bool} ; + lin + PCountry x = mkPhrase (mkUtt x.np) ; + oper + NPNationality = {lang : NP ; prop : A ; country : {np : NP ; isExternal : Bool}} ; + NPPlace = {name : NP ; at : Adv ; to : Adv ; from : Adv} ; + CNPlace = {name : CN ; isExternal : Bool ; isPl : Bool} ; + + placeNP : Det -> CNPlace -> NPPlace = \det,kind -> + let name : NP = mkNP det kind.name in { + name = name ; + at = mkAdv (P.casePrep (if_then_else P.Case kind.isExternal P.adessive P.inessive)) name ; + to = mkAdv (P.casePrep (if_then_else P.Case kind.isExternal P.allative P.illative)) name ; + from = mkAdv (P.casePrep (if_then_else P.Case kind.isExternal P.ablative P.elative)) name + } ; + + lin + Is item prop = mkCl item (V.UseComp (CompPartAP prop)) ; -- tämä pizza on herkullista + IsMass mass prop = mkCl (mkNP a_Det mass) (V.UseComp (CompPartAP prop)) ; -- pizza on herkullista + NameNN = mkNP (P.mkPN (P.mkN "NN" "NN:iä")) ; + + IMale, IFemale = + {name = mkNP (ProDrop i_Pron) ; isPron = True ; poss = ProDropPoss i_Pron} ; + YouFamMale, YouFamFemale = + {name = mkNP (ProDrop youSg_Pron) ; isPron = True ; poss = ProDropPoss youSg_Pron} ; + YouPolMale, YouPolFemale = + {name = mkNP (ProDrop youPol_Pron) ; isPron = True ; poss = ProDropPoss youPol_Pron} ; + WeMale, WeFemale = + {name = mkNP (ProDrop we_Pron) ; isPron = True ; poss = ProDropPoss we_Pron} ; + YouPlurFamMale, YouPlurFamFemale, YouPlurPolMale, YouPlurPolFemale = + {name = mkNP (ProDrop youPl_Pron) ; isPron = True ; poss = ProDropPoss youPl_Pron} ; + + ObjMass = PartCN ; + + GObjectPlease o = lin Text (mkPhr noPConj (mkUtt o) (lin Voc (ss "kiitos"))) ; +-} + + } |
