generalized the Person category in Phrasebook to plurals, added some new Words

This commit is contained in:
aarne
2010-04-09 14:37:25 +00:00
parent b3c8cf315a
commit 74a61db4a1
10 changed files with 99 additions and 50 deletions

View File

@@ -124,10 +124,21 @@ concrete WordsSwe of Words = SentencesSwe **
open_A = mkA "öppen" "öppet" ;
closed_A = mkA "stängd" "stängt" ;
nameOf : {name : NP ; isPron : Bool ; poss : Det} -> NP = \p ->
case p.isPron of {
True => mkNP p.poss (mkN "namn" "namn") ;
_ => mkNP (mkNP the_Det (mkN "namn" "namn"))
NPPerson : Type = {name : NP ; isPron : Bool ; poss : Quant} ;
xOf : Bool -> N -> NPPerson -> NPPerson = \n,x,p ->
let num = if_then_else Num n plNum sgNum in {
name = case p.isPron of {
True => mkNP p.poss num x ;
_ => mkNP (mkNP the_Quant num x)
(SyntaxSwe.mkAdv possess_Prep p.name)
} ;
isPron = False ;
poss = SyntaxSwe.mkQuant he_Pron -- not used because not pron
} ;
nameOf : NPPerson -> NP = \p -> (xOf sing L.name_N p).name ;
sing = False ; plur = True ;
}