Latvian: an optimized NP linearization type => fixed the double negation support in VPS

The flag indicating whether a NP has a negated determiner is now encapsulated in the algebraic parameter Agr, removing the extra field in the NP linearization type.
This commit is contained in:
normundsg
2013-05-02 13:17:53 +00:00
parent 0dbddbb9d7
commit 9f5c805ab5
14 changed files with 117 additions and 148 deletions

View File

@@ -157,13 +157,13 @@ oper
mkPronoun_They : Gender -> Pron = \g -> {
s = \\c => (mkPronoun_Gend "viņš").s ! g ! Pl ! c ;
a = AgP3 Pl g ;
a = AgP3 Pl g Pos ;
possessive = \\_,_,_ => "viņu"
} ;
mkPronoun_It_Sg : Gender -> Pron = \g -> {
s = \\c => (mkPronoun_ThisThat That).s ! g ! Sg ! c ;
a = AgP3 Sg g ;
a = AgP3 Sg g Pos ;
possessive = \\_,_,_ => case g of { Masc => "tā" ; Fem => "tās" }
} ;
@@ -268,8 +268,7 @@ oper
} ;
-- Everything, something, nothing, i.e., all that end with "kas"
-- Quick & dirty
mkPronoun_Thing : Str -> Pron = \lemma ->
mkPronoun_Thing : Str -> Polarity -> Pron = \lemma,pol ->
let stem : Str = Predef.tk 3 lemma
in {
s = \\c => table {
@@ -280,13 +279,14 @@ oper
Loc => case stem of { "kaut" => stem ++ "kur" ; _ => stem + "kur" } ;
Voc => NON_EXISTENT
} ! c ;
a = AgP3 Sg Masc ;
a = AgP3 Sg Masc pol ;
possessive = \\_,_,_ => case stem of { "kaut" => stem ++ "kā" ; _ => stem + "kā" }
} ;
mkPronoun_Body : Str -> Pron = \lemma -> {
-- Everybody, somebody, nobody
mkPronoun_Body : Str -> Polarity -> Pron = \lemma,pol -> {
s = \\c => (mkPronoun_Gend lemma).s ! Masc ! Sg ! c ;
a = AgP3 Sg Masc ;
a = AgP3 Sg Masc pol ;
possessive = \\_,_,_ => (mkPronoun_Gend lemma).s ! Masc ! Sg ! Gen ;
} ;