mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 01:52:50 -06:00
more Scandinavian
This commit is contained in:
@@ -47,7 +47,7 @@ incomplete concrete CatScand of Cat =
|
||||
|
||||
-- Constructed in $Noun$.
|
||||
|
||||
Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies } ;
|
||||
Det, Quant = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||
Predet = {s : GenNum => Str} ;
|
||||
Num = {s : Gender => Str} ;
|
||||
Ord = {s : Str} ;
|
||||
@@ -60,8 +60,8 @@ incomplete concrete CatScand of Cat =
|
||||
N2 = Noun ** {c2 : Str} ;
|
||||
N3 = Noun ** {c2,c3 : Str} ;
|
||||
|
||||
IP = NP ;
|
||||
IDet = Det ;
|
||||
IP = {s : NPForm => Str ; gn : GenNum} ;
|
||||
IDet = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||
IAdv = {s : Str} ;
|
||||
|
||||
RP = {s : RCase => Str ; a : RAgr} ;
|
||||
|
||||
@@ -5,6 +5,8 @@ interface DiffScand = open ResScand, Prelude in {
|
||||
param
|
||||
Gender ;
|
||||
|
||||
CardOrd = NCard Gender | NOrd AFormSup ; -- sic! (AFormSup)
|
||||
|
||||
oper
|
||||
neutrum, utrum : Gender ;
|
||||
|
||||
@@ -28,6 +30,7 @@ interface DiffScand = open ResScand, Prelude in {
|
||||
artIndef : Gender => Str ;
|
||||
|
||||
verbHave : {s : VForm => Str} ;
|
||||
verbBe : {s : VForm => Str} ;
|
||||
|
||||
auxFut : Str ;
|
||||
auxCond : Str ;
|
||||
@@ -72,4 +75,8 @@ interface DiffScand = open ResScand, Prelude in {
|
||||
en2,ea2,eext : Bool = False -- indicate if the field exists
|
||||
} ;
|
||||
|
||||
-- For determiners; mostly two-valued even in Norwegian.
|
||||
|
||||
genderForms : (x1,x2 : Str) -> Gender => Str ;
|
||||
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ incomplete concrete NounScand of Noun =
|
||||
NoOrd = {s = []} ;
|
||||
NumInt n = {s = \\_ => n.s} ;
|
||||
|
||||
---- NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
|
||||
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
||||
NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
|
||||
OrdNumeral numeral = {s = numeral.s ! NOrd SupWeak} ;
|
||||
|
||||
AdNum adn num = {s = \\g => adn.s ++ num.s ! g} ;
|
||||
|
||||
@@ -49,8 +49,17 @@ incomplete concrete NounScand of Noun =
|
||||
IndefSg = {s = artIndef ; n = Sg ; det = DIndef} ;
|
||||
IndefPl = {s = \\_ => [] ; n = Pl ; det = DIndef} ;
|
||||
|
||||
---- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ;
|
||||
---- ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ;
|
||||
-- The genitive of this $NP$ is not correct: "sonen till mig" (not "migs").
|
||||
|
||||
ComplN2 f x = {
|
||||
s = \\n,d,c => f.s ! n ! specDet d ! Nom ++ f.c2 ++ x.s ! accusative ;
|
||||
g = f.g
|
||||
} ;
|
||||
ComplN3 f x = {
|
||||
s = \\n,d,c => f.s ! n ! d ! Nom ++ f.c2 ++ x.s ! accusative ;
|
||||
g = f.g ;
|
||||
c2 = f.c3
|
||||
} ;
|
||||
|
||||
AdjCN ap cn = let g = cn.g in {
|
||||
s = \\n,d,c => preOrPost ap.isPre
|
||||
|
||||
@@ -46,8 +46,6 @@ param
|
||||
--- AdjPronForm = APron GenNum Case ;
|
||||
--- AuxVerbForm = AuxInf | AuxPres | AuxPret | AuxSup ;
|
||||
|
||||
CardOrd = NCard | NOrd ;
|
||||
|
||||
RCase = RNom | RAcc | RGen | RPrep ;
|
||||
|
||||
RAgr = RNoAg | RAg {gn : GenNum ; p : Person} ;
|
||||
|
||||
@@ -162,13 +162,28 @@ resource ResScand = ParamScand ** open Prelude in {
|
||||
eext = vp.eext
|
||||
} ;
|
||||
|
||||
----- This is not functional.
|
||||
--
|
||||
-- insertAdV : Str -> VP -> VP = \adv,vp -> {
|
||||
-- s = vp.s ;
|
||||
-- s2 = vp.s2
|
||||
-- } ;
|
||||
--
|
||||
insertAdv : Str -> VP -> VP = \adv,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = vp.a1 ;
|
||||
n2 = vp.n2 ;
|
||||
a2 = vp.a2 ++ adv ;
|
||||
ext = vp.ext ;
|
||||
en2 = vp.en2 ;
|
||||
ea2 = True ;
|
||||
eext = vp.eext
|
||||
} ;
|
||||
|
||||
insertAdV : Str -> VP -> VP = \adv,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = \\b => vp.a1 ! b ++ adv ;
|
||||
n2 = vp.n2 ;
|
||||
a2 = vp.a2 ;
|
||||
ext = vp.ext ;
|
||||
en2 = vp.en2 ;
|
||||
ea2 = vp.ea2 ;
|
||||
eext = vp.eext
|
||||
} ;
|
||||
|
||||
-- presVerb : {s : VForm => Str} -> Agr -> Str = \verb ->
|
||||
-- agrVerb (verb.s ! VPres) (verb.s ! VInf) ;
|
||||
|
||||
|
||||
@@ -11,29 +11,34 @@ incomplete concrete VerbScand of Verb = CatScand ** open DiffScand, ResScand in
|
||||
ComplVV v vp = insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ;
|
||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||
{-
|
||||
ComplVA v ap = insertObj (ap.s) (predV v) ;
|
||||
|
||||
ComplVA v ap =
|
||||
insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
||||
ComplV2A v np ap =
|
||||
insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ;
|
||||
insertAdv
|
||||
(ap.s ! agrAdj np.a.gn DIndef)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||
|
||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! accusative} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
--- these give parser overflow
|
||||
--- AdvVP vp adv = insertAdv adv.s vp ;
|
||||
--- AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
{-
|
||||
ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
|
||||
|
||||
PassV2 v = {s = \\_ => v.s ! VPPart} ;
|
||||
-}
|
||||
|
||||
UseVV, UseVS, UseVQ = \vv -> {s = vv.s ; c2 = []} ;
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! Acc} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP vp (agrP3 Sg)} ; --- agr
|
||||
-}
|
||||
EmbedVP vp = {s = infVP vp (agrP3 utrum Sg)} ; --- agr
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user