Quant with variable number

This commit is contained in:
aarne
2006-02-02 15:23:43 +00:00
parent 478d1f4435
commit f5f3ba0e42
19 changed files with 142 additions and 114 deletions

View File

@@ -68,8 +68,9 @@ abstract Cat = Tense ** {
Pron ; -- personal pronoun e.g. "she" Pron ; -- personal pronoun e.g. "she"
Det ; -- determiner phrase e.g. "all the seven" Det ; -- determiner phrase e.g. "all the seven"
Predet; -- predeterminer (prefixed Quant) e.g. "all" Predet; -- predeterminer (prefixed Quant) e.g. "all"
QuantSg;-- quantifier ('nucleus' of sing. Det) e.g. "this" QuantSg;-- quantifier ('nucleus' of sing. Det) e.g. "every"
QuantPl;-- quantifier ('nucleus' of plur. Det) e.g. "these" QuantPl;-- quantifier ('nucleus' of plur. Det) e.g. "many"
Quant ; -- quantifier with both sg and pl e.g. "this/these"
Num ; -- cardinal number (used with QuantPl) e.g. "seven" Num ; -- cardinal number (used with QuantPl) e.g. "seven"
Ord ; -- ordinal number (used in Det) e.g. "seventh" Ord ; -- ordinal number (used in Det) e.g. "seventh"

View File

@@ -32,12 +32,16 @@ abstract Noun = Cat ** {
DetSg : QuantSg -> Ord -> Det ; -- this best man DetSg : QuantSg -> Ord -> Det ; -- this best man
DetPl : QuantPl -> Num -> Ord -> Det ; -- these five best men DetPl : QuantPl -> Num -> Ord -> Det ; -- these five best men
-- Quantifiers that have both forms can be used in both ways.
SgQuant : Quant -> QuantSg ; -- this
PlQuant : Quant -> QuantPl ; -- these
-- Pronouns have possessive forms. Genitives of other kinds -- Pronouns have possessive forms. Genitives of other kinds
-- of noun phrases are not given here, since they are not possible -- of noun phrases are not given here, since they are not possible
-- in e.g. Romance languages. -- in e.g. Romance languages.
PossSg : Pron -> QuantSg ; -- my (house) PossPron : Pron -> Quant ; -- my (house)
PossPl : Pron -> QuantPl ; -- my (houses)
-- All parts of the determiner can be empty, except $Quant$, which is -- All parts of the determiner can be empty, except $Quant$, which is
-- the "kernel" of a determiner. -- the "kernel" of a determiner.
@@ -70,16 +74,14 @@ abstract Noun = Cat ** {
-- neatly distinct words (Spanish "un, unos ; el, los") but also without -- neatly distinct words (Spanish "un, unos ; el, los") but also without
-- any particular word (Finnish; Swedish definites). -- any particular word (Finnish; Swedish definites).
DefSg : QuantSg ; -- the (house) DefArt : Quant ; -- the (house), the (houses)
DefPl : QuantPl ; -- the (houses) IndefArt : Quant ; -- a (house), (houses)
IndefSg : QuantSg ; -- a (house)
IndefPl : QuantPl ; -- (houses)
-- Nouns can be used without an article as mass nouns. The resource does -- Nouns can be used without an article as mass nouns. The resource does
-- not distinguish mass nouns from other common nouns, which can result -- not distinguish mass nouns from other common nouns, which can result
-- in semantically odd expressions. -- in semantically odd expressions.
MassDet : QuantSg ; -- (beer) MassDet : QuantSg ; -- (beer)
-- Other determiners are defined in [Structural Structural.html]. -- Other determiners are defined in [Structural Structural.html].

View File

@@ -73,19 +73,17 @@ abstract Structural = Cat ** {
somebody_NP : NP ; somebody_NP : NP ;
something_NP : NP ; something_NP : NP ;
somewhere_Adv : Adv ; somewhere_Adv : Adv ;
that_Quant : QuantSg ; that_Quant : Quant ;
that_NP : NP ; that_NP : NP ;
there_Adv : Adv ; there_Adv : Adv ;
there7to_Adv : Adv ; there7to_Adv : Adv ;
there7from_Adv : Adv ; there7from_Adv : Adv ;
therefore_PConj : PConj ; therefore_PConj : PConj ;
these_NP : NP ; these_NP : NP ;
these_Quant : QuantPl ;
they_Pron : Pron ; they_Pron : Pron ;
this_Quant : QuantSg ; this_Quant : Quant ;
this_NP : NP ; this_NP : NP ;
those_NP : NP ; those_NP : NP ;
those_Quant : QuantPl ;
through_Prep : Prep ; through_Prep : Prep ;
to_Prep : Prep ; to_Prep : Prep ;
too_AdA : AdA ; too_AdA : AdA ;

View File

@@ -51,6 +51,7 @@ concrete CatEng of Cat = TenseX ** open ResEng, Prelude in {
NP, Pron = {s : Case => Str ; a : Agr} ; NP, Pron = {s : Case => Str ; a : Agr} ;
Det = {s : Str ; n : Number} ; Det = {s : Str ; n : Number} ;
Predet, QuantSg, QuantPl, Num, Ord = {s : Str} ; Predet, QuantSg, QuantPl, Num, Ord = {s : Str} ;
Quant = {s : Number => Str} ;
-- Adverb -- Adverb

View File

@@ -25,8 +25,10 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
n = Pl n = Pl
} ; } ;
PossSg p = {s = p.s ! Gen} ; SgQuant quant = {s = quant.s ! Sg} ;
PossPl p = {s = p.s ! Gen} ; PlQuant quant = {s = quant.s ! Pl} ;
PossPron p = {s = \\_ => p.s ! Gen} ;
NoNum, NoOrd = {s = []} ; NoNum, NoOrd = {s = []} ;
@@ -40,11 +42,14 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
OrdSuperl a = {s = a.s ! AAdj Superl} ; OrdSuperl a = {s = a.s ! AAdj Superl} ;
DefSg = {s = artDef ; n = Sg} ; DefArt = {s = \\_ => artDef} ;
DefPl = {s = artDef ; n = Pl} ;
IndefSg = {s = artIndef ; n = Sg} ; IndefArt = {
IndefPl = {s = [] ; n = Pl} ; s = table {
Sg => artIndef ;
Pl => []
}
} ;
MassDet = {s = [] ; n = Sg} ; MassDet = {s = [] ; n = Sg} ;

View File

@@ -63,19 +63,16 @@ concrete StructuralEng of Structural = CatEng **
somePl_Det = mkDeterminer Pl "some" ; somePl_Det = mkDeterminer Pl "some" ;
something_NP = regNP "something" Sg ; something_NP = regNP "something" Sg ;
somewhere_Adv = ss "somewhere" ; somewhere_Adv = ss "somewhere" ;
that_Quant = mkDeterminer Sg "that" ; that_Quant = mkQuant "that" "those" ;
that_NP = regNP "that" Sg ; that_NP = regNP "that" Sg ;
there_Adv = ss "there" ; there_Adv = ss "there" ;
there7to_Adv = ss "there" ; there7to_Adv = ss "there" ;
there7from_Adv = ss ["from there"] ; there7from_Adv = ss ["from there"] ;
therefore_PConj = ss "therefore" ; therefore_PConj = ss "therefore" ;
these_NP = regNP "these" Pl ;
these_Quant = mkDeterminer Pl "these" ;
they_Pron = mkNP "they" "them" "their" Pl P3 ; they_Pron = mkNP "they" "them" "their" Pl P3 ;
this_Quant = mkDeterminer Sg "this" ; this_Quant = mkQuant "this" "these" ;
this_NP = regNP "this" Sg ; this_NP = regNP "this" Sg ;
those_NP = regNP "those" Pl ; those_NP = regNP "those" Pl ;
those_Quant = mkDeterminer Pl "those" ;
through_Prep = ss "through" ; through_Prep = ss "through" ;
too_AdA = ss "too" ; too_AdA = ss "too" ;
to_Prep = ss "to" ; to_Prep = ss "to" ;
@@ -100,5 +97,10 @@ concrete StructuralEng of Structural = CatEng **
youPl_Pron = mkNP "you" "you" "your" Pl P2 ; youPl_Pron = mkNP "you" "you" "your" Pl P2 ;
youPol_Pron = mkNP "you" "you" "your" Sg P2 ; youPol_Pron = mkNP "you" "you" "your" Sg P2 ;
oper
mkQuant : Str -> Str -> {s : Number => Str} = \x,y -> {
s = table Number [x ; y]
} ;
} }

View File

@@ -80,21 +80,29 @@ lin
someSg_Det = {s = \\_,c => prepCase c ++ elision "quelqu" ; n = Sg} ; someSg_Det = {s = \\_,c => prepCase c ++ elision "quelqu" ; n = Sg} ;
something_NP = pn2np (mkPN ["quelque chose"] Masc) ; something_NP = pn2np (mkPN ["quelque chose"] Masc) ;
somewhere_Adv = ss ["quelque part"] ; --- ne - pas somewhere_Adv = ss ["quelque part"] ; --- ne - pas
that_Quant = {s = \\g,c => prepCase c ++ genForms "ce" "cette" ! g} ; ---- cet that_Quant = {s =
table {
Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; là
Pl => \\_,_ => "ces"
}
} ;
that_NP = mkNP ["ceci"] Masc Sg ; that_NP = mkNP ["ceci"] Masc Sg ;
there7from_Adv = ss ["de là"] ; there7from_Adv = ss ["de là"] ;
there7to_Adv = ss "là" ; --- y there7to_Adv = ss "là" ; --- y
there_Adv = ss "là" ; there_Adv = ss "là" ;
therefore_PConj = ss "donc" ; therefore_PConj = ss "donc" ;
these_NP = mkNP ["celles-ci"] Fem Pl ; these_NP = mkNP ["celles-ci"] Fem Pl ;
these_Quant = {s = \\_,c => prepCase c ++ "ces"} ; ---- ci
they_Pron = mkPronoun they_Pron = mkPronoun
"elles" "les" "leur" "eux" "leur" "leur" "leurs" "elles" "les" "leur" "eux" "leur" "leur" "leurs"
Fem Pl P3 Clit1 ; Fem Pl P3 Clit1 ;
this_Quant = {s = \\g,c => prepCase c ++ genForms "ce" "cette" ! g} ; ---- cet this_Quant = {s =
table {
Sg => \\g,c => prepCase c ++ genForms "ce" "cette" ! g ; ---- cet ; ci
Pl => \\_,_ => "ces"
}
} ;
this_NP = pn2np (mkPN ["ceci"] Masc) ; this_NP = pn2np (mkPN ["ceci"] Masc) ;
those_NP = mkNP ["celles-là"] Fem Pl ; those_NP = mkNP ["celles-là"] Fem Pl ;
those_Quant = {s = \\_,c => prepCase c ++ "ces"} ; ---- là
through_Prep = mkPreposition "par" ; through_Prep = mkPreposition "par" ;
too_AdA = ss "trop" ; too_AdA = ss "trop" ;
to_Prep = complDat ; to_Prep = complDat ;

View File

@@ -50,6 +50,7 @@ concrete CatGer of Cat = TenseX ** open ResGer, Prelude in {
Pron = {s : NPForm => Str ; a : Agr} ; Pron = {s : NPForm => Str ; a : Agr} ;
Det = {s : Gender => Case => Str ; n : Number ; a : Adjf} ; Det = {s : Gender => Case => Str ; n : Number ; a : Adjf} ;
QuantSg, QuantPl = {s : Gender => Case => Str ; a : Adjf} ; QuantSg, QuantPl = {s : Gender => Case => Str ; a : Adjf} ;
Quant = {s : Number => Gender => Case => Str ; a : Adjf} ;
Predet = {s : Number => Gender => Case => Str} ; Predet = {s : Number => Gender => Case => Str} ;
Num = {s : Str} ; Num = {s : Str} ;
Ord = {s : AForm => Str} ; Ord = {s : AForm => Str} ;

View File

@@ -42,16 +42,18 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
a = a a = a
} ; } ;
PossSg p = { SgQuant q = {
s = \\g,c => p.s ! NPPoss (gennum g Sg) c ; s = q.s ! Sg ;
n = Sg ; a = q.a
a = Strong } ;
PlQuant q = {
s = q.s ! Pl ;
a = q.a
} ; } ;
PossPl p = { PossPron p = {
s = \\g,c => p.s ! NPPoss (gennum g Pl) c ; s = \\n,g,c => p.s ! NPPoss (gennum g n) c ;
n = Pl ; a = Strong --- need separately weak for Pl ?
a = Weak
} ; } ;
NoNum = {s = []} ; NoNum = {s = []} ;
@@ -67,25 +69,16 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
OrdSuperl a = {s = a.s ! Superl} ; OrdSuperl a = {s = a.s ! Superl} ;
DefSg = { DefArt = {
s = \\g,c => artDef ! GSg g ! c ; s = \\n,g,c => artDef ! gennum g n ! c ;
n = Sg ;
a = Weak
} ;
DefPl = {
s = \\_,c => artDef ! GPl ! c ;
n = Pl ;
a = Weak a = Weak
} ; } ;
IndefSg = { IndefArt = {
s = \\g,c => "ein" + pronEnding ! GSg g ! c ; s = table {
n = Sg ; Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
a = Strong Pl => \\_,_ => []
} ; } ;
IndefPl = {
s = \\_,_ => [] ;
n = Pl ;
a = Strong a = Strong
} ; } ;
@@ -95,7 +88,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in {
a = Strong a = Strong
} ; } ;
UseN, UseN2, UseN3 = \n -> { UseN, UseN2, UseN3 = \n -> {
s = \\_ => n.s ; s = \\_ => n.s ;
g = n.g g = n.g

View File

@@ -82,19 +82,17 @@ concrete StructuralGer of Structural = CatGer **
} ; } ;
something_NP = nameNounPhrase {s = \\_ => "etwas"} ; something_NP = nameNounPhrase {s = \\_ => "etwas"} ;
somewhere_Adv = ss "irgendwo" ; somewhere_Adv = ss "irgendwo" ;
that_Quant = detLikeAdj Sg "jen" ; that_Quant = {s = \\n => (detLikeAdj n "jen").s ; a = Weak} ;
that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ---- that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ----
there_Adv = ss "da" ; there_Adv = ss "da" ;
there7to_Adv = ss "dahin" ; there7to_Adv = ss "dahin" ;
there7from_Adv = ss ["daher"] ; there7from_Adv = ss ["daher"] ;
therefore_PConj = ss "deshalb" ; therefore_PConj = ss "deshalb" ;
these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ; these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
these_Quant = detLikeAdj Pl "dies" ;
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Pl P3 ; they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Pl P3 ;
this_Quant = detLikeAdj Sg "dies" ; this_Quant = {s = \\n => (detLikeAdj n "dies").s ; a = Weak} ;
this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ---- this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ; those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
those_Quant = detLikeAdj Pl "jen" ;
through_Prep = mkPrep "durch" Acc ; through_Prep = mkPrep "durch" Acc ;
too_AdA = ss "zu" ; too_AdA = ss "zu" ;
to_Prep = mkPrep "nach" Dat ; to_Prep = mkPrep "nach" Dat ;

View File

@@ -79,21 +79,29 @@ lin
someSg_Det = {s = \\_,c => prepCase c ++ "qualche" ; n = Sg} ; someSg_Det = {s = \\_,c => prepCase c ++ "qualche" ; n = Sg} ;
something_NP = pn2np (mkPN ["qualche cosa"] Masc) ; something_NP = pn2np (mkPN ["qualche cosa"] Masc) ;
somewhere_Adv = ss ["qualche parte"] ; somewhere_Adv = ss ["qualche parte"] ;
that_Quant = {s = \\g,c => prepCase c ++ genForms "quello" "quella" ! g} ; that_Quant = {
s = table {
Sg => \\g,c => prepCase c ++ genForms "quello" "quella" ! g ;
Pl => \\g,c => prepCase c ++ genForms "quelli" "quelle" ! g ---- quegli
}
} ;
that_NP = mkNP ["questo"] Masc Sg ; that_NP = mkNP ["questo"] Masc Sg ;
there7from_Adv = ss ["di là"] ; there7from_Adv = ss ["di là"] ;
there7to_Adv = ss "là" ; --- ci there7to_Adv = ss "là" ; --- ci
there_Adv = ss "là" ; there_Adv = ss "là" ;
therefore_PConj = ss "quindi" ; therefore_PConj = ss "quindi" ;
these_NP = mkNP ["queste"] Fem Pl ; these_NP = mkNP ["queste"] Fem Pl ;
these_Quant = {s = \\g,c => prepCase c ++ genForms "questo" "questa" ! g} ;
they_Pron = mkPronoun they_Pron = mkPronoun
"loro" "loro" "li" "loro" "loro" "loro" "loro" "loro" "loro" "loro" "li" "loro" "loro" "loro" "loro" "loro"
Fem Pl P3 Clit1 ; Fem Pl P3 Clit1 ;
this_Quant = {s = \\g,c => prepCase c ++ genForms "questo" "questa" ! g} ; this_Quant = {
s = table {
Sg => \\g,c => prepCase c ++ genForms "questo" "questa" ! g ;
Pl => \\g,c => prepCase c ++ genForms "questi" "queste" ! g
}
} ;
this_NP = pn2np (mkPN ["questo"] Masc) ; this_NP = pn2np (mkPN ["questo"] Masc) ;
those_NP = mkNP ["quelle"] Fem Pl ; those_NP = mkNP ["quelle"] Fem Pl ;
those_Quant = {s = \\g,c => prepCase c ++ genForms "quelli" "quelle" ! g} ; --- quegli
through_Prep = mkPreposition "per" ; through_Prep = mkPreposition "per" ;
too_AdA = ss "troppo" ; too_AdA = ss "troppo" ;
to_Prep = complDat ; to_Prep = complDat ;

View File

@@ -17,19 +17,21 @@ lin
predAComp a x y = PredVP x (UseComp (CompAP (ComparA a y))) ; predAComp a x y = PredVP x (UseComp (CompAP (ComparA a y))) ;
predAColl a x y = predAColl a x y =
PredVP (ConjNP and_Conj (BaseNP x y)) (UseComp (CompAP (PositA a))) ; PredVP (ConjNP and_Conj (BaseNP x y)) (UseComp (CompAP (PositA a))) ;
predN n x = PredVP x (UseComp (CompNP (DetCN (DetSg IndefSg NoOrd) (UseN n)))) ; predN n x =
PredVP x (UseComp (CompNP (DetCN (DetSg (SgQuant IndefArt) NoOrd) (UseN n)))) ;
predN2 n x y = predN2 n x y =
PredVP x (UseComp (CompNP (DetCN (DetSg IndefSg NoOrd) (ComplN2 n y)))) ; PredVP x (UseComp (CompNP (DetCN (DetSg (SgQuant IndefArt) NoOrd) (ComplN2 n y)))) ;
predNColl n x y = PredVP (ConjNP and_Conj (BaseNP x y)) predNColl n x y = PredVP (ConjNP and_Conj (BaseNP x y))
(UseComp (CompNP (DetCN (DetPl IndefPl NoNum NoOrd) (UseN n)))) ; (UseComp (CompNP (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) (UseN n)))) ;
predAdv a x = PredVP x (UseComp (CompAdv a)) ; predAdv a x = PredVP x (UseComp (CompAdv a)) ;
predPrep p x y = PredVP x (UseComp (CompAdv (PrepNP p y))) ; predPrep p x y = PredVP x (UseComp (CompAdv (PrepNP p y))) ;
--2 Individual-valued function applications --2 Individual-valued function applications
appN2 n x = DetCN (DetSg DefSg NoOrd) (ComplN2 n x) ; appN2 n x = DetCN (DetSg (SgQuant DefArt) NoOrd) (ComplN2 n x) ;
appN3 n x y = DetCN (DetSg DefSg NoOrd) (ComplN2 (ComplN3 n x) y) ; appN3 n x y = DetCN (DetSg (SgQuant DefArt) NoOrd) (ComplN2 (ComplN3 n x) y) ;
appColl n x y = DetCN (DetSg DefSg NoOrd) (ComplN2 n (ConjNP and_Conj (BaseNP x y))) ; appColl n x y =
DetCN (DetSg (SgQuant DefArt) NoOrd) (ComplN2 n (ConjNP and_Conj (BaseNP x y))) ;
--2 Families of types --2 Families of types
@@ -43,6 +45,6 @@ lin
-- This is similar to a family except that the argument is a type. -- This is similar to a family except that the argument is a type.
typN2 f n = ComplN2 f (DetCN (DetPl IndefPl NoNum NoOrd) n) ; typN2 f n = ComplN2 f (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) n) ;
} }

View File

@@ -82,9 +82,9 @@ incomplete concrete DemonstrativeI of Demonstrative = Cat **
that_MNP = mkDem NP that_NP ; that_MNP = mkDem NP that_NP ;
thisDet_MNP cn = thisDet_MNP cn =
mkDem NP (DetCN (DetSg this_Quant NoOrd) cn) ; mkDem NP (DetCN (DetSg (SgQuant this_Quant) NoOrd) cn) ;
thatDet_MNP cn = thatDet_MNP cn =
mkDem NP (DetCN (DetSg that_Quant NoOrd) cn) ; mkDem NP (DetCN (DetSg (SgQuant that_Quant) NoOrd) cn) ;
here_MAdv = mkDem Adv here_Adv ; here_MAdv = mkDem Adv here_Adv ;
here7from_MAdv = mkDem Adv here7from_Adv ; here7from_MAdv = mkDem Adv here7from_Adv ;

View File

@@ -67,20 +67,28 @@ concrete StructuralNor of Structural = CatNor **
something_NP = regNP "noe" "noes" SgNeutr ; something_NP = regNP "noe" "noes" SgNeutr ;
somewhere_Adv = ss ["et eller annet sted"] ; ---- ? somewhere_Adv = ss ["et eller annet sted"] ; ---- ?
that_Quant = that_Quant =
{s = \\_ => genderForms ["den der"] ["det der"] ; n = Sg ; det = DDef Def} ; {s = table {
Sg => \\_ => genderForms ["den der"] ["det der"] ;
Pl => \\_,_ => ["de der"]
} ;
det = DDef Def
} ;
that_NP = regNP ["det der"] ["det ders"] SgNeutr ; that_NP = regNP ["det der"] ["det ders"] SgNeutr ;
there_Adv = ss "der" ; there_Adv = ss "der" ;
there7to_Adv = ss "dit" ; there7to_Adv = ss "dit" ;
there7from_Adv = ss "derfra" ; there7from_Adv = ss "derfra" ;
therefore_PConj = ss "derfor" ; therefore_PConj = ss "derfor" ;
these_NP = regNP ["de her"] ["det hers"] Plg ; these_NP = regNP ["de her"] ["det hers"] Plg ;
these_Quant = {s = \\_,_ => ["de her"] ; n = Pl ; det = DDef Def} ;
they_Pron = MorphoNor.mkNP "de" "dem" "deres" "deres" "deres" Plg P1 ; they_Pron = MorphoNor.mkNP "de" "dem" "deres" "deres" "deres" Plg P1 ;
this_Quant = this_Quant =
{s = \\_ => genderForms ["den her"] ["det her"] ; n = Sg ; det = DDef Def} ; {s = table {
Sg => \\_ => genderForms ["den her"] ["det her"] ;
Pl => \\_,_ => ["de her"]
} ;
det = DDef Def
} ;
this_NP = regNP ["det her"] ["det hers"] SgNeutr ; this_NP = regNP ["det her"] ["det hers"] SgNeutr ;
those_NP = regNP ["de der"] ["de ders"] Plg ; those_NP = regNP ["de der"] ["de ders"] Plg ;
those_Quant = {s = \\_,_ => ["de der"] ; n = Pl ; det = DDef Def} ;
through_Prep = ss "gjennom" ; through_Prep = ss "gjennom" ;
too_AdA = ss "for" ; too_AdA = ss "for" ;
to_Prep = ss "til" ; to_Prep = ss "til" ;

View File

@@ -50,6 +50,7 @@ incomplete concrete CatRomance of Cat =
Det = {s : Gender => Case => Str ; n : Number} ; Det = {s : Gender => Case => Str ; n : Number} ;
QuantSg = {s : Gender => Case => Str} ; QuantSg = {s : Gender => Case => Str} ;
QuantPl = {s : Gender => Case => Str} ; QuantPl = {s : Gender => Case => Str} ;
Quant = {s : Number => Gender => Case => Str} ;
Predet = {s : AAgr => Case => Str ; c : Case} ; -- la plupart de... Predet = {s : AAgr => Case => Str ; c : Case} ; -- la plupart de...
Num = {s : Gender => Str} ; Num = {s : Gender => Str} ;
Ord = {s : AAgr => Str} ; Ord = {s : AAgr => Str} ;

View File

@@ -34,13 +34,11 @@ incomplete concrete NounRomance of Noun =
n = Pl n = Pl
} ; } ;
PossSg p = { SgQuant q = {s = q.s ! Sg} ;
s = \\g,c => prepCase c ++ p.s ! Poss (aagr g Sg) ; PlQuant q = {s = q.s ! Pl} ;
n = Sg
} ; PossPron p = {
PossPl p = { s = \\n,g,c => prepCase c ++ p.s ! Poss (aagr g n) ---- il mio!
s = \\g,c => prepCase c ++ p.s ! Poss (aagr g Pl) ;
n = Pl
} ; } ;
NoNum = {s = \\_ => []} ; NoNum = {s = \\_ => []} ;
@@ -56,22 +54,12 @@ incomplete concrete NounRomance of Noun =
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ; OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
DefSg = { DefArt = {
s = \\g,c => artDef g Sg c ; s = \\n,g,c => artDef g n c
n = Sg
} ;
DefPl = {
s = \\g,c => artDef g Pl c ;
n = Pl
} ; } ;
IndefSg = { IndefArt = {
s = \\g,c => artIndef g Sg c ; s = \\n,g,c => artIndef g n c
n = Sg
} ;
IndefPl = {
s = \\g,c => artIndef g Pl c ;
n = Pl
} ; } ;
MassDet = { MassDet = {

View File

@@ -66,6 +66,7 @@ incomplete concrete CatScand of Cat =
Det = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ; Det = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
QuantSg = {s : Bool => Gender => Str ; det : DetSpecies} ; QuantSg = {s : Bool => Gender => Str ; det : DetSpecies} ;
QuantPl = {s : Bool => Gender => Str ; det : DetSpecies} ; QuantPl = {s : Bool => Gender => Str ; det : DetSpecies} ;
Quant = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
Predet = {s : GenNum => Str} ; Predet = {s : GenNum => Str} ;
Num = {s : Gender => Str ; isDet : Bool} ; Num = {s : Gender => Str ; isDet : Bool} ;
Ord = {s : Str ; isDet : Bool} ; Ord = {s : Str ; isDet : Bool} ;

View File

@@ -39,14 +39,19 @@ incomplete concrete NounScand of Noun =
det = quant.det det = quant.det
} ; } ;
PossSg p = { SgQuant quant = {
s = \\_,g => p.s ! NPPoss (gennum g Sg) ; s = quant.s ! Sg ;
n = Sg ; n = Sg ;
det = DDef Indef det = quant.det
} ; } ;
PossPl p = { PlQuant quant = {
s = \\_,_ => p.s ! NPPoss Plg ; s = quant.s ! Pl ;
n = Pl ; n = Pl ;
det = quant.det
} ;
PossPron p = {
s = \\n,_,g => p.s ! NPPoss (gennum g n) ;
det = DDef Indef det = DDef Indef
} ; } ;
@@ -63,19 +68,18 @@ incomplete concrete NounScand of Noun =
OrdSuperl a = {s = a.s ! AF (ASuperl SupWeak) Nom ; isDet = True} ; OrdSuperl a = {s = a.s ! AF (ASuperl SupWeak) Nom ; isDet = True} ;
DefSg = { DefArt = {
s = \\b,g => if_then_Str b (artDef (gennum g Sg)) [] ; s = \\n,b,g => if_then_Str b (artDef (gennum g n)) [] ;
n = Sg ;
det = DDef detDef
} ;
DefPl = {
s = \\b,_ => if_then_Str b (artDef Plg) [] ;
n = Pl ;
det = DDef detDef det = DDef detDef
} ; } ;
IndefSg = {s = \\_ => artIndef ; n = Sg ; det = DIndef} ; IndefArt = {
IndefPl = {s = \\_,_ => [] ; n = Pl ; det = DIndef} ; s = table {
Sg => \\_ => artIndef ;
Pl => \\_,_ => []
} ;
det = DIndef
} ;
MassDet = {s = \\_,_ => [] ; n = Sg ; det = DIndef} ; MassDet = {s = \\_,_ => [] ; n = Sg ; det = DIndef} ;

View File

@@ -66,20 +66,28 @@ concrete StructuralSwe of Structural = CatSwe **
something_NP = regNP "något" "någots" SgNeutr ; something_NP = regNP "något" "någots" SgNeutr ;
somewhere_Adv = ss "någonstans" ; somewhere_Adv = ss "någonstans" ;
that_Quant = that_Quant =
{s = \\_ => genderForms ["den där"] ["det där"] ; n = Sg ; det = DDef Def} ; {s = table {
Sg => \\_ => genderForms ["den där"] ["det där"] ;
Pl => \\_,_ => ["de där"]
} ;
det = DDef Def
} ;
that_NP = regNP ["det där"] ["det därs"] SgNeutr ; that_NP = regNP ["det där"] ["det därs"] SgNeutr ;
there_Adv = ss "där" ; there_Adv = ss "där" ;
there7to_Adv = ss "dit" ; there7to_Adv = ss "dit" ;
there7from_Adv = ss "därifrån" ; there7from_Adv = ss "därifrån" ;
therefore_PConj = ss "därför" ; therefore_PConj = ss "därför" ;
these_NP = regNP ["de här"] ["det härs"] Plg ; these_NP = regNP ["de här"] ["det härs"] Plg ;
these_Quant = {s = \\_,_ => ["de här"] ; n = Pl ; det = DDef Def} ;
they_Pron = MorphoSwe.mkNP "de" "dem" "deras" "deras" "deras" Plg P1 ; they_Pron = MorphoSwe.mkNP "de" "dem" "deras" "deras" "deras" Plg P1 ;
this_Quant = this_Quant =
{s = \\_ => genderForms ["den här"] ["det här"] ; n = Sg ; det = DDef Def} ; {s = table {
Sg => \\_ => genderForms ["den här"] ["det här"] ;
Pl => \\_,_ => ["de här"]
} ;
det = DDef Def
} ;
this_NP = regNP ["det här"] ["det härs"] SgNeutr ; this_NP = regNP ["det här"] ["det härs"] SgNeutr ;
those_NP = regNP ["de där"] ["det därs"] Plg ; those_NP = regNP ["de där"] ["det därs"] Plg ;
those_Quant = {s = \\_,_ => ["de där"] ; n = Pl ; det = DDef Def} ;
through_Prep = ss "genom" ; through_Prep = ss "genom" ;
too_AdA = ss "för" ; too_AdA = ss "för" ;
to_Prep = ss "till" ; to_Prep = ss "till" ;