forked from GitHub/gf-core
DAP, Det with AP and its conjunction, in Eng and Scand ; not quite sure if this is possible in all languages
This commit is contained in:
@@ -84,6 +84,7 @@ abstract Cat = Common ** {
|
|||||||
Num ; -- number determining element e.g. "seven"
|
Num ; -- number determining element e.g. "seven"
|
||||||
Card ; -- cardinal number e.g. "seven"
|
Card ; -- cardinal number e.g. "seven"
|
||||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||||
|
DAP ; -- determiner with adjective e.g. "three small"
|
||||||
|
|
||||||
--2 Numerals
|
--2 Numerals
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ abstract Conjunction = Cat ** {
|
|||||||
ConjAdV : Conj -> [AdV] -> AdV ;
|
ConjAdV : Conj -> [AdV] -> AdV ;
|
||||||
ConjIAdv : Conj -> [IAdv] -> IAdv ; -- "where and with whom"
|
ConjIAdv : Conj -> [IAdv] -> IAdv ; -- "where and with whom"
|
||||||
ConjCN : Conj -> [CN] -> CN ; -- "man and woman"
|
ConjCN : Conj -> [CN] -> CN ; -- "man and woman"
|
||||||
|
ConjDet : Conj -> [DAP] -> Det ; -- "his or her"
|
||||||
|
|
||||||
--2 Categories
|
--2 Categories
|
||||||
|
|
||||||
@@ -39,6 +40,7 @@ abstract Conjunction = Cat ** {
|
|||||||
[AP]{2} ;
|
[AP]{2} ;
|
||||||
[IAdv]{2} ;
|
[IAdv]{2} ;
|
||||||
[CN] {2} ;
|
[CN] {2} ;
|
||||||
|
[DAP] {2} ;
|
||||||
|
|
||||||
--2 List constructors
|
--2 List constructors
|
||||||
|
|
||||||
|
|||||||
@@ -146,4 +146,9 @@ abstract Noun = Cat ** {
|
|||||||
|
|
||||||
CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
||||||
|
|
||||||
|
--3 Conjoinable determiners and ones with adjectives
|
||||||
|
|
||||||
|
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
||||||
|
DetDAP : Det -> DAP ; -- this (or that)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,8 +170,8 @@ oper
|
|||||||
tr (th (heading imperative_Parameter ++ heading singular_Parameter) ++ td (vfin VImp2 ++ Predef.BIND ++ "," ++ vfin VImp3)) ++
|
tr (th (heading imperative_Parameter ++ heading singular_Parameter) ++ td (vfin VImp2 ++ Predef.BIND ++ "," ++ vfin VImp3)) ++
|
||||||
tr (th (heading imperative_Parameter ++ heading plural_Parameter) ++ td (vfin (VImpPl))) ++
|
tr (th (heading imperative_Parameter ++ heading plural_Parameter) ++ td (vfin (VImpPl))) ++
|
||||||
tr (th (heading infinitive_Parameter) ++ td (verb.s ! VInf)) ++
|
tr (th (heading infinitive_Parameter) ++ td (verb.s ! VInf)) ++
|
||||||
tr (th (heading past_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPerf)) ++
|
tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPerf)) ++
|
||||||
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPresPart)) ++
|
tr (th (heading imperfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPresPart)) ++
|
||||||
tr (th (heading gerund_Parameter) ++ td (verb.s ! VGer)) ++
|
tr (th (heading gerund_Parameter) ++ td (verb.s ! VGer)) ++
|
||||||
tr (th (heading aux_verb_Parameter) ++ td (case verb.aux of {VHebben => "hebben" ; VZijn => "zijn"}))
|
tr (th (heading aux_verb_Parameter) ++ td (case verb.aux of {VHebben => "hebben" ; VZijn => "zijn"}))
|
||||||
) ;
|
) ;
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ lin
|
|||||||
future_Parameter = mkN "toekomend" ;
|
future_Parameter = mkN "toekomend" ;
|
||||||
conditional_Parameter = mkN "voorwaardelijk" ;
|
conditional_Parameter = mkN "voorwaardelijk" ;
|
||||||
perfect_Parameter = mkN "voltooid" ;
|
perfect_Parameter = mkN "voltooid" ;
|
||||||
|
imperfect_Parameter = mkN "onvoltooid" ;
|
||||||
|
|
||||||
participle_Parameter = mkN "deelwoord" ;
|
participle_Parameter = mkN "deelwoord" ;
|
||||||
aux_verb_Parameter = mkN "hulpwerkwoord" ;
|
aux_verb_Parameter = mkN "hulpwerkwoord" ;
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ concrete CatEng of Cat = CommonX - [Pol] ** open ResEng, Prelude in {
|
|||||||
Num = {s : Case => Str ; n : Number ; hasCard : Bool} ;
|
Num = {s : Case => Str ; n : Number ; hasCard : Bool} ;
|
||||||
Card = {s : Case => Str ; n : Number} ;
|
Card = {s : Case => Str ; n : Number} ;
|
||||||
Quant = {s : Bool => Number => Str ; sp : Bool => Number => NPCase => Str} ;
|
Quant = {s : Bool => Number => Str ; sp : Bool => Number => NPCase => Str} ;
|
||||||
|
DAP = {s : Str ; n : Number} ;
|
||||||
|
|
||||||
-- Numeral
|
-- Numeral
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ concrete ConjunctionEng of Conjunction =
|
|||||||
|
|
||||||
ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
|
ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
|
||||||
|
|
||||||
|
ConjDet c xs = let cxs = (conjunctDistrSS c xs).s in {s = cxs ; sp = \\_ => cxs ++ "one" ; hasNum = False ; n = xs.n} ;
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's.
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
BaseS = twoSS ;
|
BaseS = twoSS ;
|
||||||
@@ -44,6 +46,8 @@ concrete ConjunctionEng of Conjunction =
|
|||||||
ConsIAdv = consrSS comma ;
|
ConsIAdv = consrSS comma ;
|
||||||
BaseCN = twoTable2 Number Case ;
|
BaseCN = twoTable2 Number Case ;
|
||||||
ConsCN = consrTable2 Number Case comma ;
|
ConsCN = consrTable2 Number Case comma ;
|
||||||
|
BaseDAP x y = twoSS x y ** {n = y.n} ; --- the last number decides: one big and two small cars
|
||||||
|
ConsDAP x xs = consrSS comma x xs ** {n = xs.n} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
@@ -54,5 +58,7 @@ concrete ConjunctionEng of Conjunction =
|
|||||||
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||||
[RS] = {s1,s2 : Agr => Str ; c : NPCase} ;
|
[RS] = {s1,s2 : Agr => Str ; c : NPCase} ;
|
||||||
[CN] = {s1,s2 : Number => Case => Str} ;
|
[CN] = {s1,s2 : Number => Case => Str} ;
|
||||||
|
[DAP] = {s1,s2 : Str ; n : Number} ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,4 +152,11 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
|||||||
a = agrP3 det.n
|
a = agrP3 det.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
AdjDAP det ap = {
|
||||||
|
s = det.s ++ ap.s ! agrgP3 det.n Masc ; --- post-ap's ? "this larger than life (movie)"
|
||||||
|
n = det.n ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetDAP d = d ; -- forgetting sp and hasNumber
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ incomplete concrete CatScand of Cat =
|
|||||||
Num = {s : NGender => Str ; isDet : Bool ; n : Number} ;
|
Num = {s : NGender => Str ; isDet : Bool ; n : Number} ;
|
||||||
Card = {s : NGender => Str ; n : Number} ;
|
Card = {s : NGender => Str ; n : Number} ;
|
||||||
Ord = {s : Str} ;
|
Ord = {s : Str} ;
|
||||||
|
DAP = {s : Bool => NGender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
|
|
||||||
-- Numeral
|
-- Numeral
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ incomplete concrete ConjunctionScand of Conjunction =
|
|||||||
ConjCN co ns = conjunctDistrTable3 Number DetSpecies Case co ns **
|
ConjCN co ns = conjunctDistrTable3 Number DetSpecies Case co ns **
|
||||||
{g = neutrum ; isMod = False} ; ----
|
{g = neutrum ; isMod = False} ; ----
|
||||||
|
|
||||||
|
ConjDet conj ss = let css = (conjunctDistrTable2 Bool NGender conj ss).s in {
|
||||||
|
s,sp = css ;
|
||||||
|
n = ss.n ;
|
||||||
|
det = ss.det ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's.
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
@@ -50,6 +56,9 @@ incomplete concrete ConjunctionScand of Conjunction =
|
|||||||
BaseCN = twoTable3 Number DetSpecies Case ;
|
BaseCN = twoTable3 Number DetSpecies Case ;
|
||||||
ConsCN = consrTable3 Number DetSpecies Case comma ;
|
ConsCN = consrTable3 Number DetSpecies Case comma ;
|
||||||
|
|
||||||
|
BaseDAP x y = twoTable2 Bool NGender x y ** {n = y.n ; det = y.det} ;
|
||||||
|
ConsDAP x xs = consrTable2 Bool NGender comma x xs ** {n = xs.n ; det = xs.det} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Order => Str} ;
|
[S] = {s1,s2 : Order => Str} ;
|
||||||
[Adv] = {s1,s2 : Str} ;
|
[Adv] = {s1,s2 : Str} ;
|
||||||
@@ -58,5 +67,7 @@ incomplete concrete ConjunctionScand of Conjunction =
|
|||||||
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
|
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
|
||||||
[RS] = {s1,s2 : Agr => RCase => Str ; c : NPForm} ;
|
[RS] = {s1,s2 : Agr => RCase => Str ; c : NPForm} ;
|
||||||
[CN] = {s1,s2 : Number => DetSpecies => Case => Str} ; --- g : NGender ; isMod : Bool} ;
|
[CN] = {s1,s2 : Number => DetSpecies => Case => Str} ; --- g : NGender ; isMod : Bool} ;
|
||||||
|
[DAP] = {s1,s2 : Bool => NGender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,5 +228,12 @@ incomplete concrete NounScand of Noun =
|
|||||||
a = agrP3 g det.n
|
a = agrP3 g det.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
AdjDAP det ap = {
|
||||||
|
s = \\b,g => det.s ! b ! g ++ ap.s ! agrAdj (gennum (ngen2gen g) det.n) det.det ;
|
||||||
|
n = det.n ;
|
||||||
|
det = det.det ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetDAP d = d ; -- forgetting sp
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user