summaryrefslogtreecommitdiff
path: root/examples/phrasebook/SentencesLav.gf
diff options
context:
space:
mode:
authorNormunds Gruzitis <normundsg@gmail.com>2012-10-06 21:16:46 +0000
committerNormunds Gruzitis <normundsg@gmail.com>2012-10-06 21:16:46 +0000
commit5835c8ad588e983c9aa5ec949bb285eb525215fe (patch)
tree28dce072370acbdfb8cf3cee2fd6b1e4b43eda08 /examples/phrasebook/SentencesLav.gf
parentb5bf276e9c82505038f4269a77ba3c6e201438bb (diff)
PhrasebookLav: fixed four more functions and introduced few typical alternatives (paraphrases)
Fixed QWhatName, QWhatAge, HowMuchCost and ItCost, however, the solutions have to be reviewed. Introduced a Lav-specific type for Language (affected also NPNationality etc.) to support a different realization of ASpeak. Introduced alternative realizations for AHasName and ASpeak (the most typical/simple variant is the default one).
Diffstat (limited to 'examples/phrasebook/SentencesLav.gf')
-rw-r--r--examples/phrasebook/SentencesLav.gf20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/phrasebook/SentencesLav.gf b/examples/phrasebook/SentencesLav.gf
index 34e732762..57c335653 100644
--- a/examples/phrasebook/SentencesLav.gf
+++ b/examples/phrasebook/SentencesLav.gf
@@ -1,4 +1,8 @@
concrete SentencesLav of Sentences = NumeralLav ** SentencesI - [
+ Language,
+ PLanguage,
+ NPNationality,
+ mkNPNationality,
NameNN,
IFemale,
YouFamFemale,
@@ -18,7 +22,13 @@ open
(P = ParadigmsLav),
ExtraLav
in {
+
+ lincat
+ Language = NPLanguage ;
+
lin
+ PLanguage x = mkPhrase (mkUtt x.lang) ;
+
NameNN = mkNP (P.mkN "NN") ;
IFemale = mkPerson i8fem_Pron ;
@@ -30,4 +40,14 @@ in {
--AHaveCurr p curr = mkCl p.name have_V2 (mkNP aPl_Det curr) ;
--AHaveCurr p curr = mkCl (mkVP have_V3 (mkNP aPl_Det curr) p.name) ;
+
+ oper
+ NPLanguage : Type = {lang : NP ; modif : Adv} ;
+ NPNationality : Type = {lang : NPLanguage ; country : NP ; prop : A} ;
+
+ mkNPNationality : NPLanguage -> NP -> A -> NPNationality = \la,co,pro -> {
+ lang = la ;
+ country = co ;
+ prop = pro
+ } ;
}