diff options
| author | krasimir <krasimir@chalmers.se> | 2010-05-20 11:51:49 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-05-20 11:51:49 +0000 |
| commit | 694b0a61ac3305776f55673a1de773156ab8f01b (patch) | |
| tree | 85c24175973f221dcef366ddff57bbc81f51c31f /examples/phrasebook/SentencesBul.gf | |
| parent | a3df8b9962986651e7acb0236b9c7790b0211220 (diff) | |
nationalities and languages in WordsBul and SentencesBul
Diffstat (limited to 'examples/phrasebook/SentencesBul.gf')
| -rw-r--r-- | examples/phrasebook/SentencesBul.gf | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/examples/phrasebook/SentencesBul.gf b/examples/phrasebook/SentencesBul.gf index 53ea87228..b196034f8 100644 --- a/examples/phrasebook/SentencesBul.gf +++ b/examples/phrasebook/SentencesBul.gf @@ -1,4 +1,48 @@ -concrete SentencesBul of Sentences = NumeralBul ** SentencesI with +concrete SentencesBul of Sentences = + NumeralBul ** SentencesI - [IMale, IFemale, YouFamMale, YouFamFemale, YouPolMale, + YouPolFemale, ACitizen, Citizenship, PCitizenship, + LangNat, CitiNat, CountryNat, PropCit, + Nationality, Country, Language, PLanguage, PCountry] with (Syntax = SyntaxBul), (Symbolic = SymbolicBul), - (Lexicon = LexiconBul) ; + (Lexicon = LexiconBul) ** open ExtraBul, (R = ResBul) in { + +lincat + Citizenship = {s1 : R.Gender => R.NForm => Str; -- there are two nouns for every citizenship - one for males and one for females + s2 : A -- furthermore, adjective for Property + } ; + Nationality = {s1 : R.Gender => R.NForm => Str; -- there are two nouns for every citizenship - one for males and one for females + s2 : A; -- furthermore, adjective for Property + s3 : PN -- country name + } ; + Language = A ; + Country = PN ; + +lin IMale = mkPerson i_Pron ; + IFemale = mkPerson i8fem_Pron ; + +lin YouFamMale = mkPerson youSg_Pron ; + YouFamFemale = mkPerson youSg8fem_Pron ; + YouPolMale = mkPerson youPol_Pron ; + YouPolFemale = mkPerson youPol8fem_Pron ; + +lin ACitizen p cit = + let noun : N + = case p.name.a.gn of { + R.GSg g => lin N {s = \\nf => cit.s1 ! g ! nf; g = case g of {R.Masc=>R.AMasc R.Human; R.Fem=>R.AFem; R.Neut=>R.ANeut}} ; + R.GPl => lin N {s = \\nf => cit.s1 ! R.Masc ! nf; g = R.AMasc R.Human} + } ; + in mkCl p.name noun ; + + PCitizenship cit = + mkPhrase (mkUtt (mkAP cit.s2)) ; + + LangNat n = n.s2 ; + CitiNat n = n ; + CountryNat n = n.s3 ; + PropCit cit = cit.s2 ; + + PLanguage x = mkPhrase (mkUtt (mkAP x)) ; + PCountry x = mkPhrase (mkUtt (mkNP x)) ; + +} |
