mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
scandinavian compound comparison
This commit is contained in:
@@ -33,6 +33,7 @@ instance DiffDan of DiffScand = open CommonScand, Prelude in {
|
||||
conjThan = "end" ;
|
||||
conjAnd = "og" ;
|
||||
infMark = "at" ;
|
||||
compMore = "mere" ;
|
||||
|
||||
subjIf = "hvis" ;
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ oper
|
||||
-- If comparison is formed by "mer, "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundADeg : A -> A ; -- -/mer/mest norsk
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
|
||||
--2 Adverbs
|
||||
@@ -346,18 +346,23 @@ oper
|
||||
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
|
||||
mkADeg a b c d e = mkAdject a b c d e ** {lock_A = <>} ;
|
||||
mkADeg a b c d e = mkAdject a b c d e ** {isComp = False ; lock_A = <>} ;
|
||||
|
||||
regADeg a = case Predef.dp 2 a of {
|
||||
"sk" => aRask a ;
|
||||
_ => case last a of {
|
||||
"t" => aAbstrakt a ;
|
||||
_ => aRod a
|
||||
}} ** {lock_A = <>} ;
|
||||
}} ** {isComp = False ; lock_A = <>} ;
|
||||
|
||||
irregADeg a b c = mkAdject a (a + "t") (a + "e") b c ** {lock_A = <>} ;
|
||||
mk3ADeg a b c = mkAdject a b c (c + "re") (c + "st") ** {lock_A = <>} ;
|
||||
mk2ADeg a b = mkAdject a b (a + "e") (a + "ere") (a + "est") ** {lock_A = <>} ;
|
||||
irregADeg a b c = mkAdject a (a + "t") (a + "e") b c **
|
||||
{isComp = False ; lock_A = <>} ;
|
||||
mk3ADeg a b c = mkAdject a b c (c + "re") (c + "st") **
|
||||
{isComp = False ; lock_A = <>} ;
|
||||
mk2ADeg a b = mkAdject a b (a + "e") (a + "ere") (a + "est") **
|
||||
{isComp = False ; lock_A = <>} ;
|
||||
|
||||
compoundA adj = {s = adj.s ; isComp = True ; lock_A = <>} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
|
||||
@@ -33,6 +33,7 @@ instance DiffNor of DiffScand = open CommonScand, Prelude in {
|
||||
conjThat = "at" ;
|
||||
conjThan = "enn" ;
|
||||
conjAnd = "og" ;
|
||||
compMore = "mere" ;
|
||||
infMark = "å" ;
|
||||
|
||||
subjIf = "hvis" ;
|
||||
|
||||
@@ -176,7 +176,7 @@ oper
|
||||
-- If comparison is formed by "mer, "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundADeg : A -> A ; -- -/mer/mest norsk
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
|
||||
--2 Adverbs
|
||||
@@ -341,21 +341,26 @@ oper
|
||||
{s = table {NPPoss _ => x ; _ => y} ; a = agrP3 g n ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
mkA a b c = (mkAdject a b c [] []) ** {lock_A = <>} ;
|
||||
mkA a b c = (mkAdject a b c [] []) ** {isComp = False ; lock_A = <>} ;
|
||||
mk2A a b = mkA a b (a + "e") ;
|
||||
regA a = (regADeg a) ** {lock_A = <>} ;
|
||||
regA a = (regADeg a) ** {isComp = False ; lock_A = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
|
||||
mkADeg a b c d e = mkAdject a b c d e ** {lock_A = <>} ;
|
||||
mkADeg a b c d e = mkAdject a b c d e ** {isComp = False ; lock_A = <>} ;
|
||||
regADeg a = case Predef.dp 2 a of {
|
||||
"ig" => aBillig a ;
|
||||
"sk" => aRask a ;
|
||||
_ => aRod a
|
||||
} ** {lock_A = <>} ;
|
||||
irregADeg a b c = mkAdject a (a + "t") (a + "e") b c ** {lock_A = <>} ;
|
||||
mk3ADeg a b c = mkAdject a b c (a + "ere") (a + "est") ** {lock_A = <>} ;
|
||||
mk2ADeg a b = mkAdject a b (a + "e") (a + "ere") (a + "est") ** {lock_A = <>} ;
|
||||
} ** {isComp = False ; lock_A = <>} ;
|
||||
irregADeg a b c = mkAdject a (a + "t") (a + "e") b c **
|
||||
{isComp = False ; lock_A = <>} ;
|
||||
mk3ADeg a b c = mkAdject a b c (a + "ere") (a + "est") **
|
||||
{isComp = False ; lock_A = <>} ;
|
||||
mk2ADeg a b = mkAdject a b (a + "e") (a + "ere") (a + "est") **
|
||||
{isComp = False ; lock_A = <>} ;
|
||||
|
||||
compoundA adj = {s = adj.s ; isComp = True ; lock_A = <>} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
|
||||
@@ -8,7 +8,11 @@ incomplete concrete AdjectiveScand of Adjective =
|
||||
isPre = True
|
||||
} ;
|
||||
ComparA a np = {
|
||||
s = \\_ => a.s ! AF ACompar Nom ++ conjThan ++ np.s ! nominative ;
|
||||
s = \\ap => case a.isComp of {
|
||||
True => compMore ++ a.s ! AF (APosit ap) Nom ;
|
||||
_ => a.s ! AF ACompar Nom
|
||||
}
|
||||
++ conjThan ++ np.s ! nominative ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -83,9 +83,9 @@ incomplete concrete CatScand of Cat =
|
||||
V2, VV, V2A = Verb ** {c2 : Str} ;
|
||||
V3 = Verb ** {c2,c3 : Str} ;
|
||||
|
||||
A = Adjective ;
|
||||
A = Adjective ** {isComp : Bool} ;
|
||||
-- {s : AForm => Str} ;
|
||||
A2 = Adjective ** {c2 : Str} ;
|
||||
A2 = Adjective ** {isComp : Bool ; c2 : Str} ;
|
||||
|
||||
N = Noun ;
|
||||
-- {s : Number => Species => Case => Str ; g : Gender} ;
|
||||
|
||||
@@ -27,6 +27,7 @@ interface DiffScand = open CommonScand, Prelude in {
|
||||
|
||||
conjThat : Str ;
|
||||
conjThan : Str ;
|
||||
compMore : Str ;
|
||||
conjAnd : Str ;
|
||||
infMark : Str ;
|
||||
|
||||
|
||||
@@ -76,7 +76,13 @@ incomplete concrete NounScand of Noun =
|
||||
|
||||
AdNum adn num = {s = \\g => adn.s ++ num.s ! g ; isDet = True} ;
|
||||
|
||||
OrdSuperl a = {s = a.s ! AF (ASuperl SupWeak) Nom ; isDet = True} ;
|
||||
OrdSuperl a = {
|
||||
s = case a.isComp of {
|
||||
True => "mest" ++ a.s ! AF (APosit (Weak Sg)) Nom ;
|
||||
_ => a.s ! AF (ASuperl SupWeak) Nom
|
||||
} ;
|
||||
isDet = True
|
||||
} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\n,b,g => if_then_Str b (artDef (gennum g n)) [] ;
|
||||
|
||||
@@ -33,6 +33,7 @@ instance DiffSwe of DiffScand = open CommonScand, Prelude in {
|
||||
conjThan = "än" ;
|
||||
conjAnd = "och" ;
|
||||
infMark = "att" ;
|
||||
compMore = "mera" ;
|
||||
|
||||
subjIf = "om" ;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ lin
|
||||
baby_N = regGenN "bebis" utrum ;
|
||||
bad_A = irregA "dålig" "sämre" "sämst";
|
||||
bank_N = mk2N "bank" "banker" ;
|
||||
beautiful_A = mk3A "vacker" "vackert" "vackrast" ;
|
||||
beautiful_A = mk3A "vacker" "vackert" "vackra" ;
|
||||
become_VA = mkVA (mkV "bli" "blir""bli" "blev" "blivit" "bliven") ;
|
||||
beer_N = regGenN "öl" neutrum ;
|
||||
beg_V2V = mkV2V (mkV "be" "ber""be" "blad" "bett" "bedd") [] "att" ;
|
||||
|
||||
@@ -158,6 +158,10 @@ oper
|
||||
mk3A : (galen,galet,galna : Str) -> A ;
|
||||
mk2A : (bred,brett : Str) -> A ;
|
||||
|
||||
-- Comparison forms may be compound ("mera svensk" - "mest svensk").
|
||||
|
||||
compoundA : A -> A ;
|
||||
|
||||
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
@@ -387,7 +391,7 @@ oper
|
||||
{s = table {NPPoss _ => y ; _ => x} ; a = agrP3 g n ; p = P3 ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
mkA a b c d e f g = mkAdjective a b c d e f g ** {lock_A = <>} ;
|
||||
mkA a b c d e f g = mkAdjective a b c d e f g ** {isComp = False ; lock_A = <>} ;
|
||||
regA fin =
|
||||
let fint : Str = case fin of {
|
||||
ru + "nd" => ru + "nt" ;
|
||||
@@ -397,16 +401,17 @@ oper
|
||||
_ => fin + "t"
|
||||
}
|
||||
in
|
||||
mk3A fin fint (fin + "a") ** {lock_A = <>} ;
|
||||
mk3A fin fint (fin + "a") ;
|
||||
irregA ung yngre yngst =
|
||||
mkA ung (ung + "t") (ung + "a") (ung + "a") yngre yngst (yngst+"a") ;
|
||||
|
||||
mk3A ljummen ljummet ljumma =
|
||||
mkAdjective
|
||||
mkA
|
||||
ljummen ljummet ljumma ljumma
|
||||
(ljumma + "re") (ljumma + "st") (ljumma + "ste") ** {lock_A = <>} ;
|
||||
(ljumma + "re") (ljumma + "st") (ljumma + "ste") ;
|
||||
mk2A vid vitt = mk3A vid vitt (vid + "a") ;
|
||||
|
||||
compoundA adj = {s = adj.s ; isComp = True ; lock_A = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user