From 5835c8ad588e983c9aa5ec949bb285eb525215fe Mon Sep 17 00:00:00 2001 From: Normunds Gruzitis Date: Sat, 6 Oct 2012 21:16:46 +0000 Subject: 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). --- examples/phrasebook/SentencesLav.gf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'examples/phrasebook/SentencesLav.gf') 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 + } ; } -- cgit v1.2.3