summaryrefslogtreecommitdiff
path: root/examples/phrasebook/SentencesEst.gf
diff options
context:
space:
mode:
authorkaljurand <kaljurand@gmail.com>2015-11-09 12:43:29 +0000
committerkaljurand <kaljurand@gmail.com>2015-11-09 12:43:29 +0000
commit0b1a880eae43a4c96c0f206ac4c93dc18661aba1 (patch)
tree9ab02d454ff8a50a89c07f2c338fbc12ff57b265 /examples/phrasebook/SentencesEst.gf
parenta57eddf1df55ba0fa3fcac128647990b1d4fb789 (diff)
better Estonian Phrasebook modules from https://github.com/GF-Estonian/GF-Estonian
Diffstat (limited to 'examples/phrasebook/SentencesEst.gf')
-rw-r--r--examples/phrasebook/SentencesEst.gf65
1 files changed, 29 insertions, 36 deletions
diff --git a/examples/phrasebook/SentencesEst.gf b/examples/phrasebook/SentencesEst.gf
index 735f0376f..2615f7434 100644
--- a/examples/phrasebook/SentencesEst.gf
+++ b/examples/phrasebook/SentencesEst.gf
@@ -1,62 +1,55 @@
---# -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,
+concrete SentencesEst of Sentences = NumeralEst ** SentencesI -
+ [NameNN, ObjMass,
NPPlace, CNPlace, placeNP, mkCNPlace, mkCNPlacePl,
- GObjectPlease,
- NPNationality, mkNPNationality,
- Country, PCountry
- ]
--}
-
-
-with
+ CitiNat,
+ GObjectPlease
+ ] with
(Syntax = SyntaxEst),
(Symbolic = SymbolicEst),
- (Lexicon = LexiconEst) **
+ (Lexicon = LexiconEst) **
open SyntaxEst, ExtraEst, (P = ParadigmsEst), (V = VerbEst), Prelude in {
-{- ---- TODO: functor exceptions for Est
+ flags optimize = noexpand ;
- 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} ;
+ CNPlace = {name : CN ; at : Prep ; to : Prep ; from : Prep ; 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
+ at = mkAdv kind.at name ;
+ to = mkAdv kind.to name ;
+ from = mkAdv kind.from 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ä")) ;
-
+ -- The Fin-grammar overloaded the Is and IsMass functions to be
+ -- able to use the complement in partitive.
+ -- This would be wrong in Est, where the complement is in nominative.
+ -- Fin: tämä pizza on herkullista
+ -- Is item prop = mkCl item (V.UseComp (CompPartAP prop)) ;
+ --
+ -- Fin: pizza on herkullista
+ -- IsMass mass prop = mkCl (mkNP a_Det mass) (V.UseComp (CompPartAP prop)) ;
+
+ NameNN = mkNP (P.mkPN (P.mkN "NN")) ;
+
+ -- Estonian does not have possessive endings and does not make use of ProDrop
+ -- that much, so we do not override SentencesI, like Finnish does.
+{--
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"))) ;
--}
+ GObjectPlease o = lin Text (mkPhr noPConj (mkUtt o) (lin Voc (ss "palun"))) ;
+
+ CitiNat n = n.prop ;
}