mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
extended AP with Ord and compar in 1.5
This commit is contained in:
@@ -7,13 +7,17 @@ abstract Adjective = Cat ** {
|
|||||||
-- The principal ways of forming an adjectival phrase are
|
-- The principal ways of forming an adjectival phrase are
|
||||||
-- positive, comparative, relational, reflexive-relational, and
|
-- positive, comparative, relational, reflexive-relational, and
|
||||||
-- elliptic-relational.
|
-- elliptic-relational.
|
||||||
-- (The superlative use is covered in [Noun Noun.html].$SuperlA$.)
|
|
||||||
|
|
||||||
PositA : A -> AP ; -- warm
|
PositA : A -> AP ; -- warm
|
||||||
ComparA : A -> NP -> AP ; -- warmer than I
|
ComparA : A -> NP -> AP ; -- warmer than I
|
||||||
ComplA2 : A2 -> NP -> AP ; -- married to her
|
ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||||
ReflA2 : A2 -> AP ; -- married to itself
|
ReflA2 : A2 -> AP ; -- married to itself
|
||||||
UseA2 : A2 -> A ; -- married
|
UseA2 : A2 -> AP ; -- married
|
||||||
|
UseComparA : A -> AP ; -- warmer
|
||||||
|
|
||||||
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
|
AdjOrd : Ord -> AP ; -- warmest
|
||||||
|
|
||||||
-- Sentence and question complements defined for all adjectival
|
-- Sentence and question complements defined for all adjectival
|
||||||
-- phrases, although the semantics is only clear for some adjectives.
|
-- phrases, although the semantics is only clear for some adjectives.
|
||||||
|
|||||||
@@ -37,11 +37,10 @@ abstract Noun = Cat ** {
|
|||||||
--2 Determiners
|
--2 Determiners
|
||||||
|
|
||||||
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||||
-- quantifier and two optional parts can be discerned: a cardinal and
|
-- quantifier and an optional numeral can be discerned.
|
||||||
-- an ordinal numeral.
|
|
||||||
|
|
||||||
|
DetQuant : Quant -> Num -> Det ; -- these five
|
||||||
DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
DetQuant : Quant -> Num -> Det ; -- these five
|
|
||||||
|
|
||||||
-- Whether the resulting determiner is singular or plural depends on the
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
-- cardinal.
|
-- cardinal.
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ incomplete resource Combinators = open Cat, Structural, Constructors in {
|
|||||||
neg : RCl -> RS
|
neg : RCl -> RS
|
||||||
};
|
};
|
||||||
|
|
||||||
--2 Text append
|
|
||||||
|
|
||||||
-- This is not in ground API, because it would destroy parsing.
|
|
||||||
|
|
||||||
appendText : Text -> Text -> Text ;
|
|
||||||
|
|
||||||
--.
|
--.
|
||||||
|
|
||||||
pred = overload {
|
pred = overload {
|
||||||
|
|||||||
@@ -593,7 +593,7 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
-- Relational adjectives can be used with a complement or a reflexive
|
-- Relational adjectives can be used with a complement or a reflexive
|
||||||
|
|
||||||
mkAP : A2 -> NP -> AP ; -- 3. married to her
|
mkAP : A2 -> NP -> AP ; -- 3. married to her
|
||||||
mkAP : A2 -> AP ; -- 4. married to myself
|
mkAP : A2 -> AP ; -- 4. married
|
||||||
|
|
||||||
-- Some adjectival phrases can take as complements sentences,
|
-- Some adjectival phrases can take as complements sentences,
|
||||||
-- questions, or infinitives. Syntactically this is possible for
|
-- questions, or infinitives. Syntactically this is possible for
|
||||||
@@ -613,8 +613,12 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
mkAP : Conj -> AP -> AP -> AP ; -- 10. old and big
|
mkAP : Conj -> AP -> AP -> AP ; -- 10. old and big
|
||||||
mkAP : Conj -> ListAP -> AP ; -- 11. old, big, and warm
|
mkAP : Conj -> ListAP -> AP ; -- 11. old, big, and warm
|
||||||
|
|
||||||
|
mkAP : Ord -> AP ; -- 12. oldest
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
reflAP : A2 -> AP ; -- married to himself
|
||||||
|
comparAP : A -> AP ; -- warmer
|
||||||
|
|
||||||
--3 Adv, adverbial phrases
|
--3 Adv, adverbial phrases
|
||||||
|
|
||||||
mkAdv : overload {
|
mkAdv : overload {
|
||||||
@@ -865,7 +869,7 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
mkAP : A2 -> NP -> AP -- divisible by 2
|
mkAP : A2 -> NP -> AP -- divisible by 2
|
||||||
= ComplA2 ;
|
= ComplA2 ;
|
||||||
mkAP : A2 -> AP -- divisible by itself
|
mkAP : A2 -> AP -- divisible by itself
|
||||||
= ReflA2 ;
|
= UseA2 ;
|
||||||
mkAP : AP -> S -> AP -- great that she won
|
mkAP : AP -> S -> AP -- great that she won
|
||||||
= \ap,s -> SentAP ap (EmbedS s) ;
|
= \ap,s -> SentAP ap (EmbedS s) ;
|
||||||
mkAP : AP -> QS -> AP -- great that she won
|
mkAP : AP -> QS -> AP -- great that she won
|
||||||
@@ -882,6 +886,9 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
= \c,xy -> ConjAP c xy ;
|
= \c,xy -> ConjAP c xy ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
reflAP = ReflA2 ;
|
||||||
|
comparAP = UseComparA ;
|
||||||
|
|
||||||
mkAdv = overload {
|
mkAdv = overload {
|
||||||
mkAdv : A -> Adv -- quickly
|
mkAdv : A -> Adv -- quickly
|
||||||
= PositAdvAdj ;
|
= PositAdvAdj ;
|
||||||
@@ -1686,10 +1693,13 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
the_Art : Art = DefArt ; -- the
|
the_Art : Art = DefArt ; -- the
|
||||||
a_Art : Art = IndefArt ; -- a
|
a_Art : Art = IndefArt ; -- a
|
||||||
|
|
||||||
|
the_Quant : Quant = DefArt ; -- the
|
||||||
|
a_Quant : Quant = IndefArt ; -- a
|
||||||
|
|
||||||
DetArtSg : Art -> CN -> NP = \a -> DetCN (DetQuant a sgNum) ;
|
DetArtSg : Art -> CN -> NP = \a -> DetCN (DetQuant a sgNum) ;
|
||||||
DetArtPl : Art -> CN -> NP = \a -> DetCN (DetQuant a plNum) ;
|
DetArtPl : Art -> CN -> NP = \a -> DetCN (DetQuant a plNum) ;
|
||||||
|
|
||||||
DetArtOrd = DetQuantOrd ;
|
DetArtOrd : Quant -> Num -> Ord -> Det = DetQuantOrd ;
|
||||||
DetArtCard : Art -> Card -> Det = \a,c -> DetQuant a (NumCard c) ;
|
DetArtCard : Art -> Card -> Det = \a,c -> DetQuant a (NumCard c) ;
|
||||||
|
|
||||||
TUseCl : Tense -> Ant -> Pol -> Cl -> S = \t,a -> UseCl (TTAnt t a) ;
|
TUseCl : Tense -> Ant -> Pol -> Cl -> S = \t,a -> UseCl (TTAnt t a) ;
|
||||||
|
|||||||
@@ -10,8 +10,16 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
|
|||||||
s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ;
|
s = \\_ => a.s ! AAdj Compar ++ "than" ++ np.s ! Nom ;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
UseComparA a = {
|
||||||
|
s = \\_ => a.s ! AAdj Compar ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdjOrd ord = {
|
||||||
|
s = \\_ => ord.s ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
|
||||||
|
|
||||||
ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ;
|
s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ;
|
||||||
@@ -33,6 +41,9 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
|
|||||||
isPre = ap.isPre
|
isPre = ap.isPre
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseA2 a = a ;
|
UseA2 a = {
|
||||||
|
s = \\_ => a.s ! AAdj Posit ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,18 +31,18 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
|
|||||||
a = np.a
|
a = np.a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
|
||||||
s = quant.s ! num.hasCard ! num.n ++ num.s ++ ord.s ;
|
|
||||||
sp = quant.sp ! num.hasCard ! num.n ++ num.s ++ ord.s ;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetQuant quant num = {
|
DetQuant quant num = {
|
||||||
s = quant.s ! num.hasCard ! num.n ++ num.s ;
|
s = quant.s ! num.hasCard ! num.n ++ num.s ;
|
||||||
sp = quant.sp ! num.hasCard ! num.n ++ num.s ;
|
sp = quant.sp ! num.hasCard ! num.n ++ num.s ;
|
||||||
n = num.n
|
n = num.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
DetQuantOrd quant num ord = {
|
||||||
|
s = quant.s ! num.hasCard ! num.n ++ num.s ++ ord.s ;
|
||||||
|
sp = quant.sp ! num.hasCard ! num.n ++ num.s ++ ord.s ;
|
||||||
|
n = num.n
|
||||||
|
} ;
|
||||||
|
|
||||||
DetNP det = {
|
DetNP det = {
|
||||||
s = \\c => det.sp ; ---- case
|
s = \\c => det.sp ; ---- case
|
||||||
a = agrP3 det.n
|
a = agrP3 det.n
|
||||||
|
|||||||
@@ -5,26 +5,33 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, Prelude in {
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
PositA a = {
|
PositA a = {
|
||||||
s = \\_ => a.s ! Posit
|
s = \\_,nf => a.s ! Posit ! AN nf
|
||||||
} ;
|
} ;
|
||||||
ComparA a np = {
|
ComparA a np = {
|
||||||
s = \\isMod,af => case isMod of {
|
s = \\isMod,af => case isMod of {
|
||||||
True => np.s ! NPCase Part ++ a.s ! Compar ! af ; -- minua isompi
|
True => np.s ! NPCase Part ++ a.s ! Compar ! AN af ; -- minua isompi
|
||||||
_ => a.s ! Compar ! af ++ "kuin" ++ np.s ! NPCase Nom -- isompi kuin minä
|
_ => a.s ! Compar ! AN af ++ "kuin" ++ np.s ! NPCase Nom -- isompi kuin minä
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
UseComparA a = {
|
||||||
|
s = \\_,nf => a.s ! Compar ! AN nf ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
AdjOrd ord = {
|
||||||
|
s = \\_ => ord.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
ComplA2 adj np = {
|
ComplA2 adj np = {
|
||||||
s = \\isMod,af =>
|
s = \\isMod,af =>
|
||||||
preOrPost isMod (appCompl True Pos adj.c2 np) (adj.s ! Posit ! af)
|
preOrPost isMod (appCompl True Pos adj.c2 np) (adj.s ! Posit ! AN af)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflA2 adj = {
|
ReflA2 adj = {
|
||||||
s = \\isMod,af =>
|
s = \\isMod,af =>
|
||||||
preOrPost isMod
|
preOrPost isMod
|
||||||
(appCompl True Pos adj.c2 (reflPron (agrP3 Sg))) (adj.s ! Posit ! af)
|
(appCompl True Pos adj.c2 (reflPron (agrP3 Sg))) (adj.s ! Posit ! AN af)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentAP ap sc = {
|
SentAP ap sc = {
|
||||||
@@ -35,6 +42,8 @@ concrete AdjectiveFin of Adjective = CatFin ** open ResFin, Prelude in {
|
|||||||
s = \\b,af => ada.s ++ ap.s ! b ! af
|
s = \\b,af => ada.s ++ ap.s ! b ! af
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseA2 a = a ;
|
UseA2 a = {
|
||||||
|
s = \\_,nf => a.s ! Posit ! AN nf
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
|
|||||||
-- The $Bool$ tells whether usage is modifying (as opposed to
|
-- The $Bool$ tells whether usage is modifying (as opposed to
|
||||||
-- predicative), e.g. "x on suurempi kuin y" vs. "y:tä suurempi luku".
|
-- predicative), e.g. "x on suurempi kuin y" vs. "y:tä suurempi luku".
|
||||||
|
|
||||||
AP = {s : Bool => AForm => Str} ;
|
AP = {s : Bool => NForm => Str} ;
|
||||||
|
|
||||||
-- Noun
|
-- Noun
|
||||||
|
|
||||||
@@ -59,11 +59,11 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
|
|||||||
isDef : Bool -- True (verb agrees in Pl, Nom is not Part)
|
isDef : Bool -- True (verb agrees in Pl, Nom is not Part)
|
||||||
} ;
|
} ;
|
||||||
---- QuantSg, QuantPl = {s1 : Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
|
---- QuantSg, QuantPl = {s1 : Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
|
||||||
Ord = {s : Number => Case => Str} ;
|
Ord = {s : NForm => Str} ;
|
||||||
Predet = {s : Number => NPForm => Str} ;
|
Predet = {s : Number => NPForm => Str} ;
|
||||||
Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss : Bool ; isDef : Bool} ;
|
Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss : Bool ; isDef : Bool} ;
|
||||||
Card = {s : Number => Case => Str ; n : Number} ;
|
Card = {s : Number => Case => Str ; n : Number} ;
|
||||||
Num = {s : Number => Case => Str ; isNum : Bool ; n : Number} ;
|
Num = {s : Number => Case => Str ; isNum : Bool ; n : Number} ;
|
||||||
|
|
||||||
-- Numeral
|
-- Numeral
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable2 Bool AForm conj ss ;
|
ConjAP conj ss = conjunctDistrTable2 Bool NForm conj ss ;
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's.
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
@@ -24,13 +24,13 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a} ;
|
BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a} ;
|
||||||
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ;
|
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||||
BaseAP x y = twoTable2 Bool AForm x y ;
|
BaseAP x y = twoTable2 Bool NForm x y ;
|
||||||
ConsAP xs x = consrTable2 Bool AForm comma xs x ;
|
ConsAP xs x = consrTable2 Bool NForm comma xs x ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
[Adv] = {s1,s2 : Str} ;
|
[Adv] = {s1,s2 : Str} ;
|
||||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||||
[AP] = {s1,s2 : Bool => AForm => Str} ;
|
[AP] = {s1,s2 : Bool => NForm => Str} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ lin
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
mkOrd : N -> Ord ;
|
mkOrd : N -> Ord ;
|
||||||
mkOrd x = {s = \\n,c => x.s ! NCase n c; lock_Ord = <> } ;
|
mkOrd x = {s = x.s ; lock_Ord = <> } ;
|
||||||
cpartitive = casePrep partitive ;
|
cpartitive = casePrep partitive ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! Pl ! c ;
|
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase Pl c ;
|
||||||
s2 = quant.s2 ;
|
s2 = quant.s2 ;
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
isNum = num.isNum ;
|
isNum = num.isNum ;
|
||||||
@@ -94,38 +94,6 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
|
|||||||
isDef = True
|
isDef = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
{-
|
|
||||||
DetArtSg det cn =
|
|
||||||
let
|
|
||||||
n : Number = Sg ;
|
|
||||||
ncase : Case -> NForm = \c -> NCase n c ;
|
|
||||||
in {
|
|
||||||
s = \\c => let k = npform2case n c in
|
|
||||||
det.s1 ! Sg ! k ++ cn.s ! ncase k ;
|
|
||||||
a = agrP3 Sg ;
|
|
||||||
isPron = False
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetArtPl det cn =
|
|
||||||
let
|
|
||||||
n : Number = Pl ;
|
|
||||||
ncase : Case -> NForm = \c ->
|
|
||||||
case <n,c,det.isDef> of {
|
|
||||||
<Pl,Nom,False> => NCase Pl Part ; -- kytkimiä
|
|
||||||
_ => NCase n c -- kytkin, kytkimen,...
|
|
||||||
}
|
|
||||||
in {
|
|
||||||
s = \\c => let k = npform2case n c in
|
|
||||||
det.s1 ! Pl ! k ++ cn.s ! ncase k ;
|
|
||||||
a = agrP3 (case det.isDef of {
|
|
||||||
False => Sg ; -- autoja menee; kolme autoa menee
|
|
||||||
_ => Pl
|
|
||||||
}) ;
|
|
||||||
isPron = False
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s1 = \\_,_ => p.s ! NPCase Gen ;
|
s1 = \\_,_ => p.s ! NPCase Gen ;
|
||||||
s2 = BIND ++ possSuffix p.a ;
|
s2 = BIND ++ possSuffix p.a ;
|
||||||
@@ -143,20 +111,20 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
|
|||||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||||
n = numeral.n
|
n = numeral.n
|
||||||
} ;
|
} ;
|
||||||
OrdDigits numeral = {s = \\n,c => numeral.s ! NOrd (NCase n c)} ;
|
OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ;
|
||||||
|
|
||||||
NumNumeral numeral = {
|
NumNumeral numeral = {
|
||||||
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
s = \\n,c => numeral.s ! NCard (NCase n c) ;
|
||||||
n = numeral.n
|
n = numeral.n
|
||||||
} ;
|
} ;
|
||||||
OrdNumeral numeral = {s = \\n,c => numeral.s ! NOrd (NCase n c)} ;
|
OrdNumeral numeral = {s = \\nc => numeral.s ! NOrd nc} ;
|
||||||
|
|
||||||
AdNum adn num = {
|
AdNum adn num = {
|
||||||
s = \\n,c => adn.s ++ num.s ! n ! c ;
|
s = \\n,c => adn.s ++ num.s ! n ! c ;
|
||||||
n = num.n
|
n = num.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
OrdSuperl a = {s = \\n,c => a.s ! Superl ! AN (NCase n c)} ;
|
OrdSuperl a = {s = \\nc => a.s ! Superl ! AN nc} ;
|
||||||
|
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s1 = \\_,_ => [] ;
|
s1 = \\_,_ => [] ;
|
||||||
@@ -210,7 +178,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdjCN ap cn = {
|
AdjCN ap cn = {
|
||||||
s = \\nf => ap.s ! True ! AN (n2nform nf) ++ cn.s ! nf
|
s = \\nf => ap.s ! True ! (n2nform nf) ++ cn.s ! nf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ;
|
RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
|
|||||||
ComplVA v ap =
|
ComplVA v ap =
|
||||||
insertObj
|
insertObj
|
||||||
(\\_,b,agr =>
|
(\\_,b,agr =>
|
||||||
ap.s ! False ! AN (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored
|
ap.s ! False ! (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored
|
||||||
(predV v) ;
|
(predV v) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
@@ -46,7 +46,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
|
|||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertObj
|
insertObj
|
||||||
(\\fin,b,_ =>
|
(\\fin,b,_ =>
|
||||||
ap.s ! False ! AN (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj
|
ap.s ! False ! (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj
|
||||||
(predV v) ** {c2 = v.c2} ;
|
(predV v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
ComplSlash vp np = insertObj (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
|
ComplSlash vp np = insertObj (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
|
||||||
@@ -95,7 +95,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
|
|||||||
Sg => Nom ; -- minä olen iso
|
Sg => Nom ; -- minä olen iso
|
||||||
Pl => Part -- me olemme isoja
|
Pl => Part -- me olemme isoja
|
||||||
} --- definiteness of NP ?
|
} --- definiteness of NP ?
|
||||||
in ap.s ! False ! AN (NCase agr.n c)
|
in ap.s ! False ! (NCase agr.n c)
|
||||||
} ;
|
} ;
|
||||||
CompNP np = {s = \\_ => np.s ! NPCase Nom} ;
|
CompNP np = {s = \\_ => np.s ! NPCase Nom} ;
|
||||||
CompAdv a = {s = \\_ => a.s} ;
|
CompAdv a = {s = \\_ => a.s} ;
|
||||||
|
|||||||
@@ -12,6 +12,14 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
|
|||||||
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Nom ;
|
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Nom ;
|
||||||
isPre = True
|
isPre = True
|
||||||
} ;
|
} ;
|
||||||
|
UseComparA a = {
|
||||||
|
s = \\af => a.s ! Compar ! af ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
AdjOrd a = {
|
||||||
|
s = a.s ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
@@ -35,6 +43,9 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
|
|||||||
isPre = ap.isPre
|
isPre = ap.isPre
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseA2 a = a ;
|
UseA2 a = {
|
||||||
|
s = a.s ! Posit ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,17 @@ incomplete concrete AdjectiveRomance of Adjective =
|
|||||||
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Ton Nom ;
|
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Ton Nom ;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
UseComparA a = {
|
||||||
|
s = \\af => a.s ! Compar ! af ;
|
||||||
|
isPre = a.isPre
|
||||||
|
} ;
|
||||||
|
AdjOrd ord = {
|
||||||
|
s = \\af => ord.s ! (case af of {
|
||||||
|
AF g n => aagr g n ;
|
||||||
|
_ => aagr Masc Sg ----
|
||||||
|
}) ;
|
||||||
|
isPre = False ----
|
||||||
|
} ;
|
||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
@@ -36,6 +47,9 @@ incomplete concrete AdjectiveRomance of Adjective =
|
|||||||
isPre = ap.isPre
|
isPre = ap.isPre
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseA2 a = a ** {isPre = False} ;
|
UseA2 a = {
|
||||||
|
s = a.s ! Posit ;
|
||||||
|
isPre = False ---- A2 has no isPre
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,30 +93,6 @@ 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} ;
|
||||||
|
|
||||||
{-
|
|
||||||
DetArtSg det cn =
|
|
||||||
let
|
|
||||||
g = cn.g ;
|
|
||||||
n = Sg
|
|
||||||
in {
|
|
||||||
s = \\c => let cs = npform2case c in
|
|
||||||
det.s ! False ! n ! g ! cs ++ cn.s ! n ;
|
|
||||||
a = agrP3 g n ;
|
|
||||||
hasClit = False
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetArtPl det cn =
|
|
||||||
let
|
|
||||||
g = cn.g ;
|
|
||||||
n = Pl
|
|
||||||
in {
|
|
||||||
s = \\c => let cs = npform2case c in
|
|
||||||
det.s ! False ! n ! g ! cs ++ cn.s ! n ;
|
|
||||||
a = agrP3 g n ;
|
|
||||||
hasClit = False
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = \\_,n,g,c => artDef g n c ;
|
s = \\_,n,g,c => artDef g n c ;
|
||||||
sp = \\n,g,c => artDef g n c ; ---- not for Fre
|
sp = \\n,g,c => artDef g n c ; ---- not for Fre
|
||||||
@@ -138,15 +114,6 @@ incomplete concrete NounRomance of Noun =
|
|||||||
hasClit = False
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{---b
|
|
||||||
MassDet = {
|
|
||||||
s = \\b,n,g,c => case <b,n> of {
|
|
||||||
<False,Sg> => partitive g c ;
|
|
||||||
_ => prepCase genitive ----
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
-- This is based on record subtyping.
|
-- This is based on record subtyping.
|
||||||
|
|
||||||
UseN, UseN2 = \noun -> noun ;
|
UseN, UseN2 = \noun -> noun ;
|
||||||
|
|||||||
@@ -15,8 +15,18 @@ incomplete concrete AdjectiveScand of Adjective =
|
|||||||
++ conjThan ++ np.s ! nominative ;
|
++ conjThan ++ np.s ! nominative ;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
UseComparA a = {
|
||||||
|
s = \\ap => case a.isComp of {
|
||||||
|
True => compMore ++ a.s ! AF (APosit ap) Nom ;
|
||||||
|
_ => a.s ! AF ACompar Nom
|
||||||
|
} ;
|
||||||
|
isPre = False
|
||||||
|
} ;
|
||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
AdjOrd ord = {
|
||||||
|
s = \\_ => ord.s ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2.s ++ np.s ! accusative ;
|
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2.s ++ np.s ! accusative ;
|
||||||
@@ -39,6 +49,9 @@ incomplete concrete AdjectiveScand of Adjective =
|
|||||||
isPre = ap.isPre
|
isPre = ap.isPre
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseA2 a = a ;
|
UseA2 a = {
|
||||||
|
s = \\ap => a.s ! AF (APosit ap) Nom ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user