mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
LangSwe in 1.4 compiles but is incomplete
This commit is contained in:
44
lib/resource-1.4/scandinavian/AdjectiveScand.gf
Normal file
44
lib/resource-1.4/scandinavian/AdjectiveScand.gf
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
incomplete concrete AdjectiveScand of Adjective =
|
||||||
|
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
PositA a = {
|
||||||
|
s = \\ap => a.s ! AF (APosit ap) Nom ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
ComparA a np = {
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
|
ComplA2 a np = {
|
||||||
|
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++ np.s ! accusative ;
|
||||||
|
isPre = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ReflA2 a = {
|
||||||
|
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++
|
||||||
|
reflPron (agrP3 utrum Sg) ; ----
|
||||||
|
isPre = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SentAP ap sc = {
|
||||||
|
s = \\a => ap.s ! a ++ sc.s ;
|
||||||
|
isPre = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdAP ada ap = {
|
||||||
|
s = \\a => ada.s ++ ap.s ! a ;
|
||||||
|
isPre = ap.isPre
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseA2 a = a ;
|
||||||
|
|
||||||
|
}
|
||||||
27
lib/resource-1.4/scandinavian/AdverbScand.gf
Normal file
27
lib/resource-1.4/scandinavian/AdverbScand.gf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
incomplete concrete AdverbScand of Adverb = CatScand ** open CommonScand, ResScand, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PositAdvAdj a = {
|
||||||
|
s = a.s ! adverbForm
|
||||||
|
} ;
|
||||||
|
ComparAdvAdj cadv a np = {
|
||||||
|
s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ np.s ! nominative
|
||||||
|
} ;
|
||||||
|
ComparAdvAdjS cadv a s = {
|
||||||
|
s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ s.s ! Sub
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PrepNP prep np = {s = prep.s ++ np.s ! accusative} ;
|
||||||
|
|
||||||
|
AdAdv = cc2 ;
|
||||||
|
|
||||||
|
SubjS subj s = {
|
||||||
|
s = subj.s ++ s.s ! Sub
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
adverbForm : AForm = AF (APosit (Strong SgNeutr)) Nom ;
|
||||||
|
|
||||||
|
}
|
||||||
100
lib/resource-1.4/scandinavian/CatScand.gf
Normal file
100
lib/resource-1.4/scandinavian/CatScand.gf
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
incomplete concrete CatScand of Cat =
|
||||||
|
CommonX ** open ResScand, Prelude, CommonScand, (R = ParamX) in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
|
||||||
|
-- Tensed/Untensed
|
||||||
|
|
||||||
|
S = {s : Order => Str} ;
|
||||||
|
QS = {s : QForm => Str} ;
|
||||||
|
RS = {s : Agr => Str ; c : NPForm} ;
|
||||||
|
SSlash = {s : Order => Str} ** {c2 : Str} ;
|
||||||
|
|
||||||
|
-- Sentence
|
||||||
|
|
||||||
|
Cl = {s : R.Tense => Anteriority => Polarity => Order => Str} ;
|
||||||
|
ClSlash = {s : R.Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ;
|
||||||
|
Imp = {s : Polarity => Number => Str} ;
|
||||||
|
|
||||||
|
-- Question
|
||||||
|
|
||||||
|
QCl = {s : R.Tense => Anteriority => Polarity => QForm => Str} ;
|
||||||
|
IP = {s : NPForm => Str ; gn : GenNum} ;
|
||||||
|
IComp = {s : AFormPos => Str} ;
|
||||||
|
IDet = {s : Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
|
IQuant = {s : Number => Gender => Str ; det : DetSpecies} ;
|
||||||
|
|
||||||
|
-- Relative; the case $c$ is for "det" clefts.
|
||||||
|
|
||||||
|
RCl = {s : R.Tense => Anteriority => Polarity => Agr => Str ; c : NPForm} ;
|
||||||
|
RP = {s : GenNum => RCase => Str ; a : RAgr} ;
|
||||||
|
|
||||||
|
-- Verb
|
||||||
|
|
||||||
|
VP = {
|
||||||
|
s : VPForm => {
|
||||||
|
fin : Str ; -- V1 har ---s1
|
||||||
|
inf : Str -- V2 sagt ---s4
|
||||||
|
} ;
|
||||||
|
a1 : Polarity => Str ; -- A1 inte ---s3
|
||||||
|
n2 : Agr => Str ; -- N2 dig ---s5
|
||||||
|
a2 : Str ; -- A2 idag ---s6
|
||||||
|
ext : Str ; -- S-Ext att hon går ---s7
|
||||||
|
en2,ea2,eext : Bool -- indicate if the field exists
|
||||||
|
} ;
|
||||||
|
Comp = {s : AFormPos => Str} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Adjective
|
||||||
|
|
||||||
|
AP = {s : AFormPos => Str ; isPre : Bool} ;
|
||||||
|
|
||||||
|
-- Noun
|
||||||
|
|
||||||
|
-- The fields $isMod$ and $isDet$, and the boolean parameter of
|
||||||
|
-- determiners, are a hack (the simples possible we found) that
|
||||||
|
-- permits treating definite articles "huset - de fem husen - det gamla huset"
|
||||||
|
-- as $Quant$.
|
||||||
|
|
||||||
|
CN = {s : Number => DetSpecies => Case => Str ; g : Gender ; isMod : Bool} ;
|
||||||
|
NP,Pron = {s : NPForm => Str ; a : Agr} ;
|
||||||
|
Det = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
|
--- QuantSg = {s : Bool => Gender => Str ; det : DetSpecies} ;
|
||||||
|
--- QuantPl = {s : Bool => Gender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
|
Quant = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
||||||
|
Art = {s : Number => Bool => Gender => Str ; det : DetSpecies} ;
|
||||||
|
Predet = {s : GenNum => Str} ;
|
||||||
|
Num = {s : Gender => Str ; isDet : Bool ; n : Number} ;
|
||||||
|
Card = {s : Gender => Str ; n : Number} ;
|
||||||
|
Ord = {s : Str ; isDet : Bool} ;
|
||||||
|
|
||||||
|
-- Numeral
|
||||||
|
|
||||||
|
Numeral = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
Digits = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
|
-- Structural
|
||||||
|
|
||||||
|
Conj = {s1,s2 : Str ; n : Number} ;
|
||||||
|
Subj = {s : Str} ;
|
||||||
|
Prep = {s : Str} ;
|
||||||
|
|
||||||
|
-- Open lexical classes, e.g. Lexicon
|
||||||
|
|
||||||
|
V, VS, VQ, VA = Verb ;
|
||||||
|
V2, VV, V2Q, V2S, V2A = Verb ** {c2 : Str} ;
|
||||||
|
V3, V2V = Verb ** {c2,c3 : Str} ;
|
||||||
|
|
||||||
|
A = Adjective ** {isComp : Bool} ;
|
||||||
|
-- {s : AForm => Str} ;
|
||||||
|
A2 = Adjective ** {isComp : Bool ; c2 : Str} ;
|
||||||
|
|
||||||
|
N = Noun ;
|
||||||
|
-- {s : Number => Species => Case => Str ; g : Gender} ;
|
||||||
|
N2 = Noun ** {c2 : Str} ;
|
||||||
|
N3 = Noun ** {c2,c3 : Str} ;
|
||||||
|
PN = {s : Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
}
|
||||||
290
lib/resource-1.4/scandinavian/CommonScand.gf
Normal file
290
lib/resource-1.4/scandinavian/CommonScand.gf
Normal file
@@ -0,0 +1,290 @@
|
|||||||
|
--1 Auxiliary operations common for Scandinavian languages.
|
||||||
|
--
|
||||||
|
-- This module contains operations that are shared by the Scandinavian
|
||||||
|
-- languages. The complete set of auxiliary operations needed to
|
||||||
|
-- implement [Test Test.html] is defined in [ResScandinavian ResScandinavian.html],
|
||||||
|
-- which depends on [DiffScandinavian DiffScandinavian.html].
|
||||||
|
|
||||||
|
resource CommonScand = ParamX ** open Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
|
||||||
|
param
|
||||||
|
Species = Indef | Def ;
|
||||||
|
Case = Nom | Gen ;
|
||||||
|
Voice = Act | Pass ;
|
||||||
|
|
||||||
|
Order = Main | Inv | Sub ;
|
||||||
|
|
||||||
|
DetSpecies = DIndef | DDef Species ;
|
||||||
|
|
||||||
|
GenNum = SgUtr | SgNeutr | Plg ;
|
||||||
|
|
||||||
|
AForm = AF AFormGrad Case ;
|
||||||
|
|
||||||
|
AFormGrad =
|
||||||
|
APosit AFormPos
|
||||||
|
| ACompar
|
||||||
|
| ASuperl AFormSup ;
|
||||||
|
|
||||||
|
-- The $Number$ in $Weak$ only matters in "lilla"/"små".
|
||||||
|
|
||||||
|
AFormPos = Strong GenNum | Weak Number ;
|
||||||
|
AFormSup = SupStrong | SupWeak ;
|
||||||
|
|
||||||
|
VForm =
|
||||||
|
VF VFin
|
||||||
|
| VI VInf ;
|
||||||
|
|
||||||
|
VFin =
|
||||||
|
VPres Voice
|
||||||
|
| VPret Voice --# notpresent
|
||||||
|
| VImper Voice
|
||||||
|
;
|
||||||
|
|
||||||
|
VInf =
|
||||||
|
VInfin Voice
|
||||||
|
| VSupin Voice --# notpresent
|
||||||
|
| VPtPret AFormPos Case
|
||||||
|
;
|
||||||
|
|
||||||
|
VPForm =
|
||||||
|
VPFinite Tense Anteriority
|
||||||
|
| VPImperat
|
||||||
|
| VPInfinit Anteriority ;
|
||||||
|
|
||||||
|
VType = VAct | VPass | VRefl ;
|
||||||
|
|
||||||
|
NPForm = NPNom | NPAcc | NPPoss GenNum ;
|
||||||
|
--- AdjPronForm = APron GenNum Case ;
|
||||||
|
--- AuxVerbForm = AuxInf | AuxPres | AuxPret | AuxSup ;
|
||||||
|
|
||||||
|
RCase = RNom | RGen | RPrep ;
|
||||||
|
|
||||||
|
RAgr = RNoAg | RAg {gn : GenNum ; p : Person} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Agr : PType = {gn : GenNum ; p : Person} ;
|
||||||
|
|
||||||
|
nominative : NPForm = NPNom ;
|
||||||
|
accusative : NPForm = NPAcc ;
|
||||||
|
|
||||||
|
caseNP : NPForm -> Case = \np -> case np of {
|
||||||
|
NPPoss _ => Gen ;
|
||||||
|
_ => Nom
|
||||||
|
} ;
|
||||||
|
|
||||||
|
specDet : DetSpecies -> Species = \d -> case d of {
|
||||||
|
DDef Def => Def ;
|
||||||
|
_ => Indef
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Used in $Noun.AdjCN$.
|
||||||
|
|
||||||
|
----- agrAdj : GenNum -> DetSpecies -> AFormPos = \gn,d -> Strong gn ; --- debug
|
||||||
|
agrAdj : GenNum -> DetSpecies -> AFormPos = \gn,d ->
|
||||||
|
case <<gn,d> : GenNum * DetSpecies> of {
|
||||||
|
<_, DIndef> => Strong gn ;
|
||||||
|
<Plg,DDef _> => Weak Pl ;
|
||||||
|
_ => Weak Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Used in $DiffScand.predV$.
|
||||||
|
|
||||||
|
vFin : Tense -> Voice -> VForm = \t,v -> case t of {
|
||||||
|
Pres => VF (VPres v) ;
|
||||||
|
Past => VF (VPret v) ; --# notpresent
|
||||||
|
_ => VI (VInfin v) --- not to be used?
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Used in $ConjunctionScand$.
|
||||||
|
|
||||||
|
conjGenNum : (_,_ : GenNum) -> GenNum = \g,h -> case <g,h> of {
|
||||||
|
<SgUtr,SgUtr> => SgUtr ;
|
||||||
|
<Plg, _> => Plg ;
|
||||||
|
<_, Plg> => Plg ;
|
||||||
|
_ => SgNeutr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : (_,_ : Agr) -> Agr = \a,b -> {
|
||||||
|
gn = conjGenNum a.gn b.gn ;
|
||||||
|
p = conjPerson a.p b.p
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
-- For $Lex$.
|
||||||
|
|
||||||
|
-- For each lexical category, here are the worst-case constructors.
|
||||||
|
--
|
||||||
|
-- But $mkNoun$ is fully defined only for each language, since
|
||||||
|
-- $Gender$ varies.
|
||||||
|
|
||||||
|
nounForms : (x1,_,_,x4 : Str) -> (Number => Species => Case => Str) =
|
||||||
|
\man,mannen,men,mennen -> \\n,d,c => case <n,d> of {
|
||||||
|
<Sg,Indef> => mkCase c man ;
|
||||||
|
<Sg,Def> => mkCase c mannen ;
|
||||||
|
<Pl,Indef> => mkCase c men ;
|
||||||
|
<Pl,Def> => mkCase c mennen
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Adjective : Type = {s : AForm => Str} ;
|
||||||
|
|
||||||
|
mkAdjective : (x1,_,_,_,_,_,x7 : Str) -> {s : AForm => Str} =
|
||||||
|
\liten, litet, lilla, sma, mindre, minst, minsta -> {
|
||||||
|
s = table {
|
||||||
|
AF (APosit a) c => mkCase c (mkAdjPos a liten litet lilla sma) ;
|
||||||
|
AF ACompar c => mkCase c mindre ;
|
||||||
|
AF (ASuperl SupStrong) c => mkCase c minst ;
|
||||||
|
AF (ASuperl SupWeak) c => mkCase c minsta
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkVerb : (x1,_,_,_,_,_,_,x8 : Str) -> {s : VForm => Str ; vtype : VType} =
|
||||||
|
\finna,finner,finn,fann,funnit,funnen,funnet,funna -> {
|
||||||
|
s = table {
|
||||||
|
VF (VPres Act) => finner ;
|
||||||
|
VF (VPres Pass) => mkVoice Pass finn ;
|
||||||
|
VF (VPret v) => mkVoice v fann ; --# notpresent
|
||||||
|
VF (VImper v) => mkVoice v finn ;
|
||||||
|
VI (VInfin v) => mkVoice v finna ;
|
||||||
|
VI (VSupin v) => mkVoice v funnit ; --# notpresent
|
||||||
|
VI (VPtPret a c)=> mkCase c (mkAdjPos a funnen funnet funna funna)
|
||||||
|
} ;
|
||||||
|
vtype = VAct
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- These are useful auxiliaries.
|
||||||
|
|
||||||
|
mkCase : Case -> Str -> Str = \c,f -> case c of {
|
||||||
|
Nom => f ;
|
||||||
|
Gen => f + case last f of {
|
||||||
|
"s" | "x" => [] ;
|
||||||
|
_ => "s"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkAdjPos : AFormPos -> (s1,_,_,s4 : Str) -> Str =
|
||||||
|
\a, liten, litet, lilla, sma ->
|
||||||
|
case a of {
|
||||||
|
Strong gn => case gn of {
|
||||||
|
SgUtr => liten ;
|
||||||
|
SgNeutr => litet ;
|
||||||
|
Plg => sma
|
||||||
|
} ;
|
||||||
|
Weak Sg => lilla ;
|
||||||
|
Weak Pl => sma
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkVoice : Voice -> Str -> Str = \v,s -> case v of {
|
||||||
|
Act => s ;
|
||||||
|
Pass => s + case last s of {
|
||||||
|
"s" => "es" ;
|
||||||
|
_ => "s"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- For $Noun$.
|
||||||
|
|
||||||
|
artDef : GenNum -> Str = \gn -> gennumForms "den" "det" "de" ! gn ;
|
||||||
|
|
||||||
|
mkNP : (x1,_,_,_,x5 : Str) -> GenNum -> Person ->
|
||||||
|
{s : NPForm => Str ; a : Agr} = \du,dig,din,ditt,dina,gn,p -> {
|
||||||
|
s = table {
|
||||||
|
NPNom => du ;
|
||||||
|
NPAcc => dig ;
|
||||||
|
NPPoss g => gennumForms din ditt dina ! g
|
||||||
|
} ;
|
||||||
|
a = {
|
||||||
|
gn = gn ;
|
||||||
|
p = p
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
gennumForms : (x1,x2,x3 : Str) -> GenNum => Str = \den,det,de ->
|
||||||
|
table {
|
||||||
|
SgUtr => den ;
|
||||||
|
SgNeutr => det ;
|
||||||
|
_ => de
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regNP : Str -> Str -> GenNum -> {s : NPForm => Str ; a : Agr} =
|
||||||
|
\det,dess,gn ->
|
||||||
|
mkNP det det dess dess dess gn P3 ;
|
||||||
|
|
||||||
|
|
||||||
|
-- For $Verb$.
|
||||||
|
|
||||||
|
VP = {
|
||||||
|
s : VPForm => {
|
||||||
|
fin : Str ; -- V1 har ---s1
|
||||||
|
inf : Str -- V2 sagt ---s4
|
||||||
|
} ;
|
||||||
|
a1 : Polarity => Str ; -- A1 inte ---s3
|
||||||
|
n2 : Agr => Str ; -- N2 dig ---s5
|
||||||
|
a2 : Str ; -- A2 idag ---s6
|
||||||
|
ext : Str ; -- S-Ext att hon går ---s7
|
||||||
|
--- ea1,ev2, --- these depend on params of v and a1
|
||||||
|
en2,ea2,eext : Bool -- indicate if the field exists
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
a1 = vp.a1 ;
|
||||||
|
n2 = \\a => vp.n2 ! a ++ obj ! a ;
|
||||||
|
a2 = vp.a2 ;
|
||||||
|
ext = vp.ext ;
|
||||||
|
en2 = True ;
|
||||||
|
ea2 = vp.ea2 ;
|
||||||
|
eext = vp.eext
|
||||||
|
} ;
|
||||||
|
|
||||||
|
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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
infVP : VP -> Agr -> Str = \vp,a ->
|
||||||
|
vp.a1 ! Pos ++ (vp.s ! VPInfinit Simul).inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; --- a1
|
||||||
|
|
||||||
|
|
||||||
|
-- For $Sentence$.
|
||||||
|
|
||||||
|
Clause : Type = {
|
||||||
|
s : Tense => Anteriority => Polarity => Order => Str
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> {
|
||||||
|
s = \\t,a,b,o =>
|
||||||
|
let
|
||||||
|
verb = vp.s ! VPFinite t a ;
|
||||||
|
neg = vp.a1 ! b ;
|
||||||
|
compl = vp.n2 ! agr ++ vp.a2 ++ vp.ext
|
||||||
|
in
|
||||||
|
case o of {
|
||||||
|
Main => subj ++ verb.fin ++ neg ++ verb.inf ++ compl ;
|
||||||
|
Inv => verb.fin ++ subj ++ neg ++ verb.inf ++ compl ;
|
||||||
|
Sub => subj ++ neg ++ verb.fin ++ verb.inf ++ compl
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
37
lib/resource-1.4/scandinavian/ConjunctionScand.gf
Normal file
37
lib/resource-1.4/scandinavian/ConjunctionScand.gf
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
incomplete concrete ConjunctionScand of Conjunction =
|
||||||
|
CatScand ** open CommonScand, ResScand, Coordination, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
ConjS conj ss = conjunctDistrTable Order conj ss ;
|
||||||
|
|
||||||
|
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||||
|
|
||||||
|
ConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
||||||
|
a = {gn = conjGenNum (gennum utrum conj.n) ss.a.gn ; p = ss.a.p}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjAP conj ss = conjunctDistrTable AFormPos conj ss ** {
|
||||||
|
isPre = ss.isPre
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
|
BaseS = twoTable Order ;
|
||||||
|
ConsS = consrTable Order comma ;
|
||||||
|
BaseAdv = twoSS ;
|
||||||
|
ConsAdv = consrSS comma ;
|
||||||
|
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} ;
|
||||||
|
BaseAP x y = twoTable AFormPos x y ** {isPre = andB x.isPre y.isPre} ;
|
||||||
|
ConsAP xs x = consrTable AFormPos comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[S] = {s1,s2 : Order => Str} ;
|
||||||
|
[Adv] = {s1,s2 : Str} ;
|
||||||
|
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||||
|
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
|
||||||
|
|
||||||
|
}
|
||||||
63
lib/resource-1.4/scandinavian/DiffScand.gf
Normal file
63
lib/resource-1.4/scandinavian/DiffScand.gf
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
interface DiffScand = open CommonScand, Prelude in {
|
||||||
|
|
||||||
|
--1 Differences between Scandinavian languages
|
||||||
|
|
||||||
|
-- Norway has three genders, Danish and Swedish have two.
|
||||||
|
|
||||||
|
param
|
||||||
|
Gender ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
neutrum, utrum : Gender ;
|
||||||
|
|
||||||
|
gennum : Gender -> Number -> GenNum ;
|
||||||
|
|
||||||
|
-- This is the form of the noun in "det stora berget"/"det store berg".
|
||||||
|
|
||||||
|
detDef : Species ;
|
||||||
|
|
||||||
|
-- Danish and Norwegian verbs, but not Swedish verbs,
|
||||||
|
-- have two possible compound-tense auxiliaries ("have" or "være").
|
||||||
|
|
||||||
|
Verb : Type ;
|
||||||
|
|
||||||
|
hasAuxBe : Verb -> Bool ;
|
||||||
|
|
||||||
|
-- The rest of the parameters are function words used in the syntax modules.
|
||||||
|
|
||||||
|
conjThat : Str ;
|
||||||
|
conjThan : Str ;
|
||||||
|
compMore : Str ;
|
||||||
|
conjAnd : Str ;
|
||||||
|
infMark : Str ;
|
||||||
|
|
||||||
|
subjIf : Str ;
|
||||||
|
|
||||||
|
artIndef : Gender => Str ;
|
||||||
|
|
||||||
|
verbHave : Verb ;
|
||||||
|
verbBe : Verb ;
|
||||||
|
|
||||||
|
verbBecome : Verb ;
|
||||||
|
|
||||||
|
auxFut : Str ;
|
||||||
|
auxCond : Str ;
|
||||||
|
|
||||||
|
negation : Polarity => Str ;
|
||||||
|
|
||||||
|
-- For determiners; mostly two-valued even in Norwegian.
|
||||||
|
|
||||||
|
genderForms : (x1,x2 : Str) -> Gender => Str ;
|
||||||
|
|
||||||
|
-- The forms of a relative pronoun ("som", "vars", "i vilken").
|
||||||
|
|
||||||
|
relPron : GenNum => RCase => Str ;
|
||||||
|
|
||||||
|
-- Pronoun "sådan" used in $Relative.RelCl$.
|
||||||
|
|
||||||
|
pronSuch : GenNum => Str ;
|
||||||
|
|
||||||
|
reflPron : Agr -> Str ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
15
lib/resource-1.4/scandinavian/ExtEngAbs.gf
Normal file
15
lib/resource-1.4/scandinavian/ExtEngAbs.gf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
abstract ExtEngAbs = Cat ** {
|
||||||
|
|
||||||
|
cat
|
||||||
|
Aux ; -- auxiliary verbs: "can", "must", etc
|
||||||
|
|
||||||
|
-- Notice that $Aux$ cannot form $VP$ with infinitive, imperative, etc.
|
||||||
|
|
||||||
|
fun
|
||||||
|
PredAux : NP -> Aux -> VP -> Cl ;
|
||||||
|
QuestAux : IP -> Aux -> VP -> QCl ;
|
||||||
|
|
||||||
|
can_Aux : Aux ;
|
||||||
|
must_Aux : Aux ;
|
||||||
|
|
||||||
|
}
|
||||||
47
lib/resource-1.4/scandinavian/ExtraScand.gf
Normal file
47
lib/resource-1.4/scandinavian/ExtraScand.gf
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
incomplete concrete ExtraScand of ExtraScandAbs = CatScand **
|
||||||
|
open CommonScand,Coordination,ResScand in {
|
||||||
|
lin
|
||||||
|
GenNP np = {
|
||||||
|
s = \\n,_,g => np.s ! NPPoss (gennum g n) ;
|
||||||
|
det = DDef Indef
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ComplBareVS v s = insertObj (\\_ => s.s ! Sub) (predV v) ;
|
||||||
|
|
||||||
|
StrandRelSlash rp slash = {
|
||||||
|
s = \\t,a,p,ag =>
|
||||||
|
rp.s ! ag.gn ! RNom ++ slash.s ! t ! a ! p ! Sub ++ slash.c2 ;
|
||||||
|
c = NPAcc
|
||||||
|
} ;
|
||||||
|
EmptyRelSlash rp slash = {
|
||||||
|
s = \\t,a,p,ag =>
|
||||||
|
slash.s ! t ! a ! p ! Sub ++ slash.c2 ;
|
||||||
|
c = NPAcc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
StrandQuestSlash ip slash = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let
|
||||||
|
cls = slash.s ! t ! a ! p ;
|
||||||
|
who = ip.s ! accusative
|
||||||
|
in table {
|
||||||
|
QDir => who ++ cls ! Inv ++ slash.c2 ;
|
||||||
|
QIndir => who ++ cls ! Sub ++ slash.c2
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPI = {s : VPIForm => Agr => Str} ;
|
||||||
|
[VPI] = {s1,s2 : VPIForm => Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseVPI = twoTable2 VPIForm Agr ;
|
||||||
|
ConsVPI = consrTable2 VPIForm Agr comma ;
|
||||||
|
|
||||||
|
MkVPI vp = {
|
||||||
|
s = \\v,a => infVP vp a ---- no sup
|
||||||
|
} ;
|
||||||
|
ConjVPI = conjunctTable2 VPIForm Agr ;
|
||||||
|
ComplVPIVV vv vpi = insertObj (\\a => vv.c2 ++ vpi.s ! VPIInf ! a) (predV vv) ;
|
||||||
|
|
||||||
|
}
|
||||||
3
lib/resource-1.4/scandinavian/ExtraScandAbs.gf
Normal file
3
lib/resource-1.4/scandinavian/ExtraScandAbs.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
abstract ExtraScandAbs = Extra ** {
|
||||||
|
|
||||||
|
}
|
||||||
145
lib/resource-1.4/scandinavian/NounScand.gf
Normal file
145
lib/resource-1.4/scandinavian/NounScand.gf
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
incomplete concrete NounScand of Noun =
|
||||||
|
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
-- The rule defines $Det Quant Num Ord CN$ where $Det$ is empty if
|
||||||
|
-- it is the definite article ($DefSg$ or $DefPl$) and both $Num$ and
|
||||||
|
-- $Ord$ are empty and $CN$ is not adjectivally modified
|
||||||
|
-- ($AdjCN$). Thus we get $huset$ but $de fem husen$, $det gamla huset$.
|
||||||
|
|
||||||
|
lin
|
||||||
|
DetCN det cn =
|
||||||
|
let
|
||||||
|
g = cn.g ;
|
||||||
|
m = cn.isMod ;
|
||||||
|
dd = case <det.det,detDef,m> of {
|
||||||
|
<DDef Def, Indef, True> => DDef Indef ;
|
||||||
|
<d,_,_> => d
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
s = \\c => det.s ! m ! g ++
|
||||||
|
cn.s ! det.n ! dd ! caseNP c ;
|
||||||
|
a = agrP3 g det.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UsePN pn = {
|
||||||
|
s = \\c => pn.s ! caseNP c ;
|
||||||
|
a = agrP3 pn.g Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UsePron p = p ;
|
||||||
|
|
||||||
|
PredetNP pred np = {
|
||||||
|
s = \\c => pred.s ! np.a.gn ++ np.s ! c ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PPartNP np v2 = {
|
||||||
|
s = \\c => np.s ! c ++ v2.s ! (VI (VPtPret (agrAdj np.a.gn DIndef) Nom)) ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvNP np adv = {
|
||||||
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetQuantOrd quant num ord = {
|
||||||
|
s = \\b,g => quant.s ! num.n ! (orB b (orB num.isDet ord.isDet)) ! g ++
|
||||||
|
num.s ! g ++ ord.s ;
|
||||||
|
n = num.n ;
|
||||||
|
det = quant.det
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PossPron p = {
|
||||||
|
s = \\n,_,g => p.s ! NPPoss (gennum g n) ;
|
||||||
|
det = DDef Indef
|
||||||
|
} ;
|
||||||
|
|
||||||
|
NumSg = {s = \\_ => [] ; isDet = False ; n = Sg} ;
|
||||||
|
NumPl = {s = \\_ => [] ; isDet = False ; n = Pl} ;
|
||||||
|
|
||||||
|
NumDigits nu = {s = \\g => nu.s ! NCard g ; isDet = True ; n = nu.n} ;
|
||||||
|
OrdDigits nu = {s = nu.s ! NOrd SupWeak ; isDet = True} ;
|
||||||
|
|
||||||
|
NumNumeral nu = {s = \\g => nu.s ! NCard g ; isDet = True ; n = nu.n} ;
|
||||||
|
OrdNumeral nu = {s = nu.s ! NOrd SupWeak ; isDet = True} ;
|
||||||
|
|
||||||
|
AdNum adn num = {s = \\g => adn.s ++ num.s ! g ; isDet = True ; n = num.n} ;
|
||||||
|
|
||||||
|
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)) [] ;
|
||||||
|
det = DDef Def
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IndefArt = {
|
||||||
|
s = table {
|
||||||
|
Sg => \\_ => artIndef ;
|
||||||
|
Pl => \\_,_ => []
|
||||||
|
} ;
|
||||||
|
det = DIndef
|
||||||
|
} ;
|
||||||
|
{-
|
||||||
|
MassDet = {s = \\_,_,_ => [] ; n = Sg ; det = DIndef} ;
|
||||||
|
-}
|
||||||
|
UseN, UseN2 = \noun -> {
|
||||||
|
s = \\n,d,c => noun.s ! n ! specDet d ! c ;
|
||||||
|
---- part app wo c shows editor bug. AR 8/7/2007
|
||||||
|
g = noun.g ;
|
||||||
|
isMod = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- 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 ;
|
||||||
|
isMod = False
|
||||||
|
} ;
|
||||||
|
ComplN3 f x = {
|
||||||
|
s = \\n,d,c => f.s ! n ! d ! Nom ++ f.c2 ++ x.s ! accusative ;
|
||||||
|
g = f.g ;
|
||||||
|
c2 = f.c3 ;
|
||||||
|
isMod = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdjCN ap cn = let g = cn.g in {
|
||||||
|
s = \\n,d,c =>
|
||||||
|
preOrPost ap.isPre
|
||||||
|
(ap.s ! agrAdj (gennum g n) d)
|
||||||
|
(cn.s ! n ! d ! c) ;
|
||||||
|
g = g ;
|
||||||
|
isMod = True
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelCN cn rs = let g = cn.g in {
|
||||||
|
s = \\n,d,c => cn.s ! n ! d ! c ++ rs.s ! agrP3 g n ;
|
||||||
|
g = g ;
|
||||||
|
isMod = cn.isMod
|
||||||
|
} ;
|
||||||
|
AdvCN cn sc = let g = cn.g in {
|
||||||
|
s = \\n,d,c => cn.s ! n ! d ! c ++ sc.s ;
|
||||||
|
g = g ;
|
||||||
|
isMod = cn.isMod
|
||||||
|
} ;
|
||||||
|
SentCN cn sc = let g = cn.g in {
|
||||||
|
s = \\n,d,c => cn.s ! n ! d ! c ++ sc.s ;
|
||||||
|
g = g ;
|
||||||
|
isMod = cn.isMod
|
||||||
|
} ;
|
||||||
|
ApposCN cn np = let g = cn.g in {
|
||||||
|
s = \\n,d,c => cn.s ! n ! d ! Nom ++ np.s ! NPNom ; --c
|
||||||
|
g = g ;
|
||||||
|
isMod = cn.isMod
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
25
lib/resource-1.4/scandinavian/PhraseScand.gf
Normal file
25
lib/resource-1.4/scandinavian/PhraseScand.gf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
incomplete concrete PhraseScand of Phrase =
|
||||||
|
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|
||||||
|
UttS s = {s = s.s ! Main} ;
|
||||||
|
UttQS qs = {s = qs.s ! QDir} ;
|
||||||
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
|
||||||
|
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
||||||
|
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ; --- works for adj but not for refl
|
||||||
|
|
||||||
|
UttIP ip = {s = ip.s ! nominative} ; --- Acc also
|
||||||
|
UttIAdv iadv = iadv ;
|
||||||
|
UttNP np = {s = np.s ! accusative} ;
|
||||||
|
UttVP vp = {s = infMark ++ infVP vp (agrP3 utrum Sg)} ;
|
||||||
|
UttAdv adv = adv ;
|
||||||
|
|
||||||
|
NoPConj = {s = []} ;
|
||||||
|
PConjConj conj = {s = conj.s2} ;
|
||||||
|
|
||||||
|
NoVoc = {s = []} ;
|
||||||
|
VocNP np = {s = "," ++ np.s ! nominative} ;
|
||||||
|
|
||||||
|
}
|
||||||
81
lib/resource-1.4/scandinavian/QuestionScand.gf
Normal file
81
lib/resource-1.4/scandinavian/QuestionScand.gf
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
incomplete concrete QuestionScand of Question =
|
||||||
|
CatScand ** open CommonScand, ResScand in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
QuestCl cl = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let cls = cl.s ! t ! a ! p
|
||||||
|
in table {
|
||||||
|
QDir => cls ! Inv ;
|
||||||
|
QIndir => subjIf ++ cls ! Sub
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuestVP qp vp = {
|
||||||
|
s = \\t,a,b,q =>
|
||||||
|
let
|
||||||
|
somo = case q of {
|
||||||
|
QIndir => <"som",Sub> ;
|
||||||
|
_ => <[], Main>
|
||||||
|
} ;
|
||||||
|
cl = mkClause (qp.s ! nominative ++ somo.p1) {gn = qp.gn ; p = P3} vp
|
||||||
|
in
|
||||||
|
cl.s ! t ! a ! b ! somo.p2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuestSlash ip slash = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let
|
||||||
|
cls = slash.s ! t ! a ! p ;
|
||||||
|
who = slash.c2 ++ ip.s ! accusative --- stranding in ExtScand
|
||||||
|
in table {
|
||||||
|
QDir => who ++ cls ! Inv ;
|
||||||
|
QIndir => who ++ cls ! Sub
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuestIAdv iadv cl = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let
|
||||||
|
cls = cl.s ! t ! a ! p ;
|
||||||
|
why = iadv.s
|
||||||
|
in table {
|
||||||
|
QDir => why ++ cls ! Inv ;
|
||||||
|
QIndir => why ++ cls ! Sub
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuestIComp icomp np = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let
|
||||||
|
cls =
|
||||||
|
(mkClause (np.s ! nominative) np.a (predV verbBe)).s ! t ! a ! p ;
|
||||||
|
why = icomp.s ! agrAdj np.a.gn DIndef
|
||||||
|
in table {
|
||||||
|
QDir => why ++ cls ! Inv ;
|
||||||
|
QIndir => why ++ cls ! Sub
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PrepIP p ip = {
|
||||||
|
s = p.s ++ ip.s ! accusative
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvIP ip adv = {
|
||||||
|
s = \\c => ip.s ! c ++ adv.s ;
|
||||||
|
gn = ip.gn
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
IDetCN idet num ord cn = let g = cn.g in {
|
||||||
|
s = \\c =>
|
||||||
|
idet.s ! g ++ num.s ! g ++ ord.s ++ cn.s !idet.n ! idet.det ! caseNP c ;
|
||||||
|
gn = gennum g idet.n
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
CompIAdv a = {s = \\_ => a.s} ;
|
||||||
|
|
||||||
|
}
|
||||||
45
lib/resource-1.4/scandinavian/RelativeScand.gf
Normal file
45
lib/resource-1.4/scandinavian/RelativeScand.gf
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
incomplete concrete RelativeScand of Relative =
|
||||||
|
CatScand ** open CommonScand, ResScand in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
RelCl cl = {
|
||||||
|
s = \\t,a,p,ag => pronSuch ! ag.gn ++ conjThat ++ cl.s ! t ! a ! p ! Sub ;
|
||||||
|
c = NPAcc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelVP rp vp = {
|
||||||
|
s = \\t,ant,b,ag =>
|
||||||
|
let
|
||||||
|
agr = case rp.a of {
|
||||||
|
RNoAg => ag ;
|
||||||
|
RAg a => a
|
||||||
|
} ;
|
||||||
|
cl = mkClause (rp.s ! ag.gn ! RNom) agr vp
|
||||||
|
in
|
||||||
|
cl.s ! t ! ant ! b ! Sub ;
|
||||||
|
c = NPNom
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- This rule uses pied piping ("huset i vilket hon bor")
|
||||||
|
-- Preposition stranding ("huset som hon bor i")
|
||||||
|
-- and the empty relative ("huset hon bor i") are defined in $ExtraScand$.
|
||||||
|
|
||||||
|
RelSlash rp slash = {
|
||||||
|
s = \\t,a,p,ag =>
|
||||||
|
slash.c2 ++ rp.s ! ag.gn ! RPrep ++ slash.s ! t ! a ! p ! Sub ;
|
||||||
|
c = NPAcc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--- The case here could be genitive.
|
||||||
|
|
||||||
|
FunRP p np rp = {
|
||||||
|
s = \\gn,c => np.s ! nominative ++ p.s ++ rp.s ! gn ! RPrep ;
|
||||||
|
a = RAg np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IdRP = {s = relPron ; a = RNoAg} ;
|
||||||
|
|
||||||
|
}
|
||||||
75
lib/resource-1.4/scandinavian/ResScand.gf
Normal file
75
lib/resource-1.4/scandinavian/ResScand.gf
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
--1 Scandinavian auxiliary operations
|
||||||
|
|
||||||
|
interface ResScand = DiffScand ** open CommonScand, Prelude in {
|
||||||
|
|
||||||
|
--2 Constants uniformly defined in terms of language-dependent constants
|
||||||
|
|
||||||
|
param
|
||||||
|
CardOrd = NCard Gender | NOrd AFormSup ; -- sic! (AFormSup)
|
||||||
|
|
||||||
|
oper
|
||||||
|
agrP3 : Gender -> Number -> Agr = \g,n -> {
|
||||||
|
gn = gennum g n ;
|
||||||
|
p = P3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Noun = {s : Number => Species => Case => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
-- This function is here because it depends on $verbHave, auxFut, auxCond$.
|
||||||
|
|
||||||
|
predV : Verb -> VP = \verb ->
|
||||||
|
let
|
||||||
|
diath = case verb.vtype of {
|
||||||
|
VPass => Pass ;
|
||||||
|
_ => Act
|
||||||
|
} ;
|
||||||
|
vfin : Tense -> Str = \t -> verb.s ! vFin t diath ;
|
||||||
|
vsup = verb.s ! VI (VSupin diath) ; --# notpresent
|
||||||
|
vinf = verb.s ! VI (VInfin diath) ;
|
||||||
|
|
||||||
|
auxv = case hasAuxBe verb of {
|
||||||
|
True => verbBe.s ;
|
||||||
|
_ => verbHave.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
har : Tense -> Str = \t -> auxv ! vFin t Act ;
|
||||||
|
ha : Str = auxv ! VI (VInfin Act) ;
|
||||||
|
|
||||||
|
vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> {
|
||||||
|
fin = fin ; inf = inf ++ verb.part
|
||||||
|
} ;
|
||||||
|
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
VPFinite t Simul => case t of {
|
||||||
|
-- Pres | Past => vf (vfin t) [] ; -- the general rule
|
||||||
|
Past => vf (vfin t) [] ; --# notpresent
|
||||||
|
Fut => vf auxFut vinf ; --# notpresent
|
||||||
|
Cond => vf auxCond vinf ; --# notpresent
|
||||||
|
Pres => vf (vfin t) []
|
||||||
|
} ;
|
||||||
|
VPFinite t Anter => case t of { --# notpresent
|
||||||
|
Pres | Past => vf (har t) vsup ; --# notpresent
|
||||||
|
Fut => vf auxFut (ha ++ vsup) ; --# notpresent
|
||||||
|
Cond => vf auxCond (ha ++ vsup) --# notpresent
|
||||||
|
} ; --# notpresent
|
||||||
|
VPImperat => vf (verb.s ! VF (VImper diath)) [] ;
|
||||||
|
VPInfinit Anter => vf [] (ha ++ vsup) ; --# notpresent
|
||||||
|
VPInfinit Simul => vf [] vinf
|
||||||
|
} ;
|
||||||
|
a1 : Polarity => Str = negation ;
|
||||||
|
n2 : Agr => Str = \\a => case verb.vtype of {
|
||||||
|
VRefl => reflPron a ;
|
||||||
|
_ => []
|
||||||
|
} ;
|
||||||
|
a2 : Str = [] ;
|
||||||
|
ext : Str = [] ;
|
||||||
|
en2,ea2,eext : Bool = False -- indicate if the field exists
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- needed for VP conjunction
|
||||||
|
param
|
||||||
|
VPIForm = VPIInf | VPISup ; ---- sup not yet used
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
65
lib/resource-1.4/scandinavian/SentenceScand.gf
Normal file
65
lib/resource-1.4/scandinavian/SentenceScand.gf
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
incomplete concrete SentenceScand of Sentence =
|
||||||
|
CatScand ** open CommonScand, ResScand in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
PredVP np vp = mkClause (np.s ! nominative) np.a vp ;
|
||||||
|
|
||||||
|
PredSCVP sc vp = mkClause sc.s (agrP3 neutrum Sg) vp ;
|
||||||
|
|
||||||
|
ImpVP vp = {
|
||||||
|
s = \\pol,n =>
|
||||||
|
let
|
||||||
|
agr = {gn = gennum utrum n ; p = P2} ;
|
||||||
|
verb = vp.s ! VPImperat ;
|
||||||
|
in
|
||||||
|
verb.fin ++ vp.a1 ! pol ++ verb.inf ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext
|
||||||
|
} ;
|
||||||
|
{-
|
||||||
|
SlashV2 np v2 =
|
||||||
|
mkClause
|
||||||
|
(np.s ! nominative) np.a
|
||||||
|
(predV v2) **
|
||||||
|
{c2 = v2.c2} ;
|
||||||
|
|
||||||
|
SlashVVV2 np vv v2 =
|
||||||
|
mkClause
|
||||||
|
(np.s ! nominative) np.a
|
||||||
|
(insertObj (\\_ => vv.c2 ++ infVP (predV v2) np.a) (predV vv)) **
|
||||||
|
{c2 = v2.c2} ;
|
||||||
|
-}
|
||||||
|
AdvSlash slash adv = {
|
||||||
|
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
||||||
|
c2 = slash.c2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||||
|
|
||||||
|
SlashVS np vs slash =
|
||||||
|
mkClause
|
||||||
|
(np.s ! nominative) np.a
|
||||||
|
(insertObj (\\_ => conjThat ++ slash.s ! Sub) (predV vs)) **
|
||||||
|
{c2 = slash.c2} ;
|
||||||
|
|
||||||
|
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||||
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
|
EmbedVP vp = {s = infMark ++ infVP vp (agrP3 utrum Sg)} ; --- agr
|
||||||
|
|
||||||
|
UseCl t a p cl = {
|
||||||
|
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o
|
||||||
|
} ;
|
||||||
|
UseQCl t a p cl = {
|
||||||
|
s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q
|
||||||
|
} ;
|
||||||
|
UseRCl t a p cl = {
|
||||||
|
s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ;
|
||||||
|
c = cl.c
|
||||||
|
} ;
|
||||||
|
UseSlash t a p cl = {
|
||||||
|
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o ;
|
||||||
|
c2 = cl.c2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvS a s = {s = \\o => a.s ++ s.s ! Inv} ;
|
||||||
|
}
|
||||||
54
lib/resource-1.4/scandinavian/VerbScand.gf
Normal file
54
lib/resource-1.4/scandinavian/VerbScand.gf
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
UseV = predV ;
|
||||||
|
{-
|
||||||
|
ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v) ;
|
||||||
|
ComplV3 v np np2 =
|
||||||
|
insertObj
|
||||||
|
(\\_ => v.c2 ++ np.s ! accusative ++ v.c3 ++ np2.s ! accusative)
|
||||||
|
(predV v) ;
|
||||||
|
-}
|
||||||
|
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 (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
||||||
|
{-
|
||||||
|
ComplV2V v np vp =
|
||||||
|
insertObj
|
||||||
|
(\\a => v.c3 ++ infVP vp a)
|
||||||
|
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||||
|
ComplV2S v np s =
|
||||||
|
insertObj
|
||||||
|
(\\_ => conjThat ++ s.s ! Sub)
|
||||||
|
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||||
|
ComplV2Q v np q =
|
||||||
|
insertObj
|
||||||
|
(\\_ => q.s ! QIndir)
|
||||||
|
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||||
|
ComplV2A v np ap =
|
||||||
|
insertObj
|
||||||
|
(\\_ => ap.s ! agrAdj np.a.gn DIndef)
|
||||||
|
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||||
|
-}
|
||||||
|
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||||
|
|
||||||
|
CompAP ap = ap ;
|
||||||
|
CompNP np = {s = \\_ => np.s ! accusative} ;
|
||||||
|
CompAdv a = {s = \\_ => a.s} ;
|
||||||
|
|
||||||
|
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 =
|
||||||
|
insertObj
|
||||||
|
(\\a => v.s ! VI (VPtPret (agrAdj a.gn DIndef) Nom))
|
||||||
|
(predV verbBecome) ;
|
||||||
|
|
||||||
|
}
|
||||||
2
lib/resource-1.4/swedish/AdjectiveSwe.gf
Normal file
2
lib/resource-1.4/swedish/AdjectiveSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete AdjectiveSwe of Adjective = CatSwe ** AdjectiveScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
2
lib/resource-1.4/swedish/AdverbSwe.gf
Normal file
2
lib/resource-1.4/swedish/AdverbSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete AdverbSwe of Adverb = CatSwe ** AdverbScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
2
lib/resource-1.4/swedish/CatSwe.gf
Normal file
2
lib/resource-1.4/swedish/CatSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete CatSwe of Cat = CommonX ** CatScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
2
lib/resource-1.4/swedish/ConjunctionSwe.gf
Normal file
2
lib/resource-1.4/swedish/ConjunctionSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete ConjunctionSwe of Conjunction = CatSwe ** ConjunctionScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
98
lib/resource-1.4/swedish/DiffSwe.gf
Normal file
98
lib/resource-1.4/swedish/DiffSwe.gf
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
instance DiffSwe of DiffScand = open CommonScand, Prelude in {
|
||||||
|
|
||||||
|
-- Parameters.
|
||||||
|
|
||||||
|
param
|
||||||
|
Gender = Utr | Neutr ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
utrum = Utr ;
|
||||||
|
neutrum = Neutr ;
|
||||||
|
|
||||||
|
gennumN : Gender -> Number -> GenNum = \g,n -> Plg ; -----
|
||||||
|
gennum : Gender -> Number -> GenNum = \g,n ->
|
||||||
|
{-
|
||||||
|
--- debugging Compute 9/11/2007
|
||||||
|
case n of {
|
||||||
|
Sg => case g of {
|
||||||
|
Utr => SgUtr ;
|
||||||
|
Neutr => SgNeutr
|
||||||
|
} ;
|
||||||
|
_ => Plg
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
case <<g,n> : Gender * Number> of {
|
||||||
|
<Utr,Sg> => SgUtr ;
|
||||||
|
<Neutr,Sg> => SgNeutr ;
|
||||||
|
_ => Plg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
detDef : Species = Def ;
|
||||||
|
|
||||||
|
Verb : Type = {
|
||||||
|
s : VForm => Str ;
|
||||||
|
part : Str ;
|
||||||
|
vtype : VType
|
||||||
|
} ;
|
||||||
|
|
||||||
|
hasAuxBe _ = False ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Strings.
|
||||||
|
|
||||||
|
conjThat = "att" ;
|
||||||
|
conjThan = "än" ;
|
||||||
|
conjAnd = "och" ;
|
||||||
|
infMark = "att" ;
|
||||||
|
compMore = "mera" ;
|
||||||
|
|
||||||
|
subjIf = "om" ;
|
||||||
|
|
||||||
|
artIndef : Gender => Str = table {
|
||||||
|
Utr => "en" ;
|
||||||
|
Neutr => "ett"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
verbHave =
|
||||||
|
mkVerb "ha" "har" "ha" "hade" "haft" "havd" "havt" "havda" ** noPart ;
|
||||||
|
verbBe =
|
||||||
|
mkVerb "vara" "är" "var" "var" "varit" "varen" "varet" "varna"
|
||||||
|
** noPart ;
|
||||||
|
verbBecome =
|
||||||
|
mkVerb "bli" "blir" "bli" "blev" "blivit" "bliven" "blivet" "blivna"
|
||||||
|
** noPart ;
|
||||||
|
|
||||||
|
-- auxiliary
|
||||||
|
noPart = {part = []} ;
|
||||||
|
|
||||||
|
auxFut = "ska" ; -- "skall" in ExtSwe
|
||||||
|
auxCond = "skulle" ;
|
||||||
|
|
||||||
|
negation : Polarity => Str = table {
|
||||||
|
Pos => [] ;
|
||||||
|
Neg => "inte"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
genderForms : (x1,x2 : Str) -> Gender => Str = \all,allt ->
|
||||||
|
table {
|
||||||
|
Utr => all ;
|
||||||
|
Neutr => allt
|
||||||
|
} ;
|
||||||
|
|
||||||
|
relPron : GenNum => RCase => Str = \\gn,c => case c of {
|
||||||
|
RNom => "som" ;
|
||||||
|
RGen => "vars" ;
|
||||||
|
RPrep => gennumForms "vilken" "vilket" "vilka" ! gn
|
||||||
|
} ;
|
||||||
|
|
||||||
|
pronSuch = gennumForms "sådan" "sådant" "sådana" ;
|
||||||
|
|
||||||
|
reflPron : Agr -> Str = \a -> case a of {
|
||||||
|
{gn = Plg ; p = P1} => "oss" ;
|
||||||
|
{gn = Plg ; p = P2} => "er" ;
|
||||||
|
{p = P1} => "mig" ;
|
||||||
|
{p = P2} => "dig" ;
|
||||||
|
{p = P3} => "sig"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
2
lib/resource-1.4/swedish/ExtraScandSwe.gf
Normal file
2
lib/resource-1.4/swedish/ExtraScandSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete ExtraScandSwe of ExtraScandAbs = CatSwe ** ExtraScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
3
lib/resource-1.4/swedish/ExtraSwe.gf
Normal file
3
lib/resource-1.4/swedish/ExtraSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe ** {
|
||||||
|
|
||||||
|
}
|
||||||
7
lib/resource-1.4/swedish/ExtraSweAbs.gf
Normal file
7
lib/resource-1.4/swedish/ExtraSweAbs.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
-- Structures special for Swedish. These are not implemented in other
|
||||||
|
-- Scandinavian languages.
|
||||||
|
|
||||||
|
abstract ExtraSweAbs = ExtraScandAbs ** {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
21
lib/resource-1.4/swedish/GrammarSwe.gf
Normal file
21
lib/resource-1.4/swedish/GrammarSwe.gf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||||
|
|
||||||
|
concrete GrammarSwe of Grammar =
|
||||||
|
NounSwe,
|
||||||
|
VerbSwe,
|
||||||
|
AdjectiveSwe,
|
||||||
|
AdverbSwe,
|
||||||
|
NumeralSwe,
|
||||||
|
SentenceSwe,
|
||||||
|
QuestionSwe,
|
||||||
|
RelativeSwe,
|
||||||
|
ConjunctionSwe,
|
||||||
|
PhraseSwe,
|
||||||
|
TextX,
|
||||||
|
IdiomSwe,
|
||||||
|
StructuralSwe
|
||||||
|
** {
|
||||||
|
|
||||||
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
} ;
|
||||||
47
lib/resource-1.4/swedish/IdiomSwe.gf
Normal file
47
lib/resource-1.4/swedish/IdiomSwe.gf
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
concrete IdiomSwe of Idiom = CatSwe **
|
||||||
|
open MorphoSwe, ParadigmsSwe, IrregSwe, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
utr = ParadigmsSwe.utrum ;
|
||||||
|
neutr = ParadigmsSwe.neutrum ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
ImpersCl vp = mkClause "det" (agrP3 neutr Sg) vp ;
|
||||||
|
GenericCl vp = mkClause "man" (agrP3 utr Sg) vp ;
|
||||||
|
|
||||||
|
CleftNP np rs = mkClause "det" (agrP3 neutr Sg)
|
||||||
|
(insertObj (\\_ => rs.s ! np.a)
|
||||||
|
(insertObj (\\_ => np.s ! rs.c) (predV verbBe))) ;
|
||||||
|
|
||||||
|
CleftAdv ad s = mkClause "det" (agrP3 neutr Sg)
|
||||||
|
(insertObj (\\_ => "som" ++ s.s ! Sub)
|
||||||
|
(insertObj (\\_ => ad.s) (predV verbBe))) ;
|
||||||
|
|
||||||
|
|
||||||
|
ExistNP np =
|
||||||
|
mkClause "det" (agrP3 neutr Sg) (insertObj
|
||||||
|
(\\_ => np.s ! accusative) (predV (depV finna_V))) ;
|
||||||
|
|
||||||
|
ExistIP ip = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let
|
||||||
|
cls =
|
||||||
|
(mkClause "det" (agrP3 neutr Sg) (predV (depV finna_V))).s ! t ! a ! p ;
|
||||||
|
who = ip.s ! accusative
|
||||||
|
in table {
|
||||||
|
QDir => who ++ cls ! Inv ;
|
||||||
|
QIndir => who ++ cls ! Sub
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
ProgrVP vp =
|
||||||
|
insertObj (\\a => "att" ++ infVP vp a) (predV (partV hålla_V "på")) ;
|
||||||
|
|
||||||
|
ImpPl1 vp = {s = ["låt oss"] ++ infVP vp {gn = Plg ; p = P1}} ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
185
lib/resource-1.4/swedish/IrregSwe.gf
Normal file
185
lib/resource-1.4/swedish/IrregSwe.gf
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||||
|
|
||||||
|
concrete IrregSwe of IrregSweAbs = CatSwe ** open ParadigmsSwe in {
|
||||||
|
|
||||||
|
flags optimize=values ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
anfalla_V = irregV "anfalla" "anföll" "anfallit" ;
|
||||||
|
angiva_V = irregV "angiva" "angav" "angivit" ;
|
||||||
|
angripa_V = irregV "angripa" "angrep" "angripit" ;
|
||||||
|
anhålla_V = irregV "anhålla" "anhäll" "anhållit" ;
|
||||||
|
antaga_V = irregV "antaga" "antog" "antagit" ;
|
||||||
|
äta_V = irregV "äta" "åt" "ätit" ;
|
||||||
|
återfinna_V = irregV "återfinna" "återfann" "återfunnit" ;
|
||||||
|
avbryta_V = irregV "avbryta" "avbröt" "avbrutit" ;
|
||||||
|
avfalla_V = irregV "avfalla" "avföll" "avfallit" ;
|
||||||
|
avhugga_V = irregV "avhugga" "avhögg" "avhuggit" ;
|
||||||
|
avlida_V = irregV "avlida" "avled" "avlidit" ;
|
||||||
|
avnjuta_V = irregV "avnjuta" "avnjöt" "avnjutit" ;
|
||||||
|
avsitta_V = irregV "avsitta" "avsatt" "avsuttit" ;
|
||||||
|
avskriva_V = irregV "avskriva" "avskrev" "avskrivit" ;
|
||||||
|
avstiga_V = irregV "avstiga" "avsteg" "avstigit" ;
|
||||||
|
bära_V = irregV "bära" "bar" "burit" ;
|
||||||
|
bedraga_V = irregV "bedraga" "bedrog" "bedragit" ;
|
||||||
|
bedriva_V = irregV "bedriva" "bedrev" "bedrivit" ;
|
||||||
|
befinna_V = irregV "befinna" "befann" "befunnit" ;
|
||||||
|
begrava_V = irregV "begrava" "begrov" "begravit" ;
|
||||||
|
behålla_V = irregV "behålla" "behöll" "behållit" ;
|
||||||
|
beljuga_V = irregV "beljuga" "beljög" "beljugit" ;
|
||||||
|
berida_V = irregV "berida" "bered" "beridit" ;
|
||||||
|
besitta_V = irregV "besitta" "besatt" "besuttit" ;
|
||||||
|
beskriva_V = irregV "beskriva" "beskrev" "beskrivit" ;
|
||||||
|
besluta_V = irregV "besluta" "beslöt" "beslutit" ;
|
||||||
|
bestiga_V = irregV "bestiga" "besteg" "bestigit" ;
|
||||||
|
bestrida_V = irregV "bestrida" "bestred" "bestridit" ;
|
||||||
|
bidraga_V = irregV "bidraga" "bidrog" "bidragit" ;
|
||||||
|
bifalla_V = irregV "bifalla" "biföll" "bifallit" ;
|
||||||
|
binda_V = irregV "binda" "band" "bundit" ;
|
||||||
|
bita_V = irregV "bita" "bet" "bitit" ;
|
||||||
|
bjuda_V = irregV "bjuda" "bjöd" "bjudit" ;
|
||||||
|
bliva_V = irregV "bli" "blev" "blivit" ;
|
||||||
|
borttaga_V = irregV "borttaga" "borttog" "borttagit" ;
|
||||||
|
brinna_V = irregV "brinna" "brann" "brunnit" ;
|
||||||
|
brista_V = irregV "brista" "brast" "brustit" ;
|
||||||
|
bryta_V = irregV "bryta" "bröt" "brutit" ;
|
||||||
|
dö_V = irregV "dö" "dog" "dött" ;
|
||||||
|
draga_V = mkV (variants { "dra"; "draga"}) (variants { "drar" ;
|
||||||
|
"drager"}) (variants { "dra" ; "drag" }) "drog" "dragit" "dragen" ;
|
||||||
|
dricka_V = irregV "dricka" "drack" "druckit" ;
|
||||||
|
driva_V = irregV "driva" "drev" "drivit" ;
|
||||||
|
drypa_V = irregV "drypa" "dröp" "drupit" ;
|
||||||
|
duga_V = irregV "duga" "dög" "dugit" ;
|
||||||
|
dyka_V = irregV "dyka" "dök" "dukit" ;
|
||||||
|
erbjuda_V = irregV "erbjuda" "erbjöd" "erbjudit" ;
|
||||||
|
erfara_V = irregV "erfara" "erfor" "erfarit" ;
|
||||||
|
erhålla_V = irregV "erhålla" "erhöll" "erhållit" ;
|
||||||
|
falla_V = irregV "falla" "föll" "fallit" ;
|
||||||
|
fånga_V = irregV "fånga" "fäng" "fångit" ;
|
||||||
|
fara_V = irregV "fara" "for" "farit" ;
|
||||||
|
finna_V = irregV "finna" "fann" "funnit" ;
|
||||||
|
flyga_V = irregV "flyga" "flög" "flugit" ;
|
||||||
|
flyta_V = irregV "flyta" "flöt" "flutit" ;
|
||||||
|
förbehålla_V = irregV "förbehålla" "förbehöll" "förbehållit" ;
|
||||||
|
förbinda_V = irregV "förbinda" "förband" "förbundit" ;
|
||||||
|
förbjuda_V = irregV "förbjuda" "förbjöd" "förbjudit" ;
|
||||||
|
fördriva_V = irregV "fördriva" "fördrev" "fördrivit" ;
|
||||||
|
föreskriva_V = irregV "föreskriva" "föreskrev" "föreskrivit" ;
|
||||||
|
företaga_V = irregV "företaga" "företog" "företagit" ;
|
||||||
|
förfrysa_V = irregV "förfrysa" "förfrös" "förfrusit" ;
|
||||||
|
förlåta_V = irregV "förlåta" "förlät" "förlåtit" ;
|
||||||
|
förnimma_V = irregV "förnimma" "förnamm" "förnummit" ;
|
||||||
|
försitta_V = irregV "försitta" "försatt" "försuttit" ;
|
||||||
|
försvinna_V = irregV "försvinna" "försvann" "försvunnit" ;
|
||||||
|
förtiga_V = irregV "förtiga" "förteg" "förtigit" ;
|
||||||
|
frysa_V = irregV "frysa" "frös" "frusit" ;
|
||||||
|
gå_V = irregV "gå" "gick" "gått" ;
|
||||||
|
göra_V = mkV "göra" "gör" "gör" "gjorde" "gjort" "gjord" ;
|
||||||
|
genomdriva_V = irregV "genomdriva" "genomdrev" "genomdrivit" ;
|
||||||
|
gilla_V = irregV "gilla" "gall" "gillit" ;
|
||||||
|
giva_V = irregV "ge" "gav" "givit" ;
|
||||||
|
gjuta_V = irregV "gjuta" "gjöt" "gjutit" ;
|
||||||
|
glida_V = irregV "glida" "gled" "glidit" ;
|
||||||
|
gnida_V = irregV "gnida" "gned" "gnidit" ;
|
||||||
|
gråta_V = irregV "gråta" "grät" "gråtit" ;
|
||||||
|
gripa_V = irregV "gripa" "grep" "gripit" ;
|
||||||
|
hålla_V = irregV "hålla" "höll" "hållit" ;
|
||||||
|
hinna_V = irregV "hinna" "hann" "hunnit" ;
|
||||||
|
hugga_V = irregV "hugga" "högg" "huggit" ;
|
||||||
|
iakttaga_V = irregV "iakttaga" "iakttog" "iakttagit" ;
|
||||||
|
inbegripa_V = irregV "inbegripa" "inbegrep" "inbegripit" ;
|
||||||
|
inbjuda_V = irregV "inbjuda" "inbjöd" "inbjudit" ;
|
||||||
|
indraga_V = irregV "indraga" "indrog" "indragit" ;
|
||||||
|
innesluta_V = irregV "innesluta" "inneslöt" "inneslutit" ;
|
||||||
|
inskriva_V = irregV "inskriva" "inskrev" "inskrivit" ;
|
||||||
|
intaga_V = irregV "intaga" "intog" "intagit" ;
|
||||||
|
känna_V = irregV "känna" "kände" "känt" ;
|
||||||
|
klämma_V = regV "klämmer" ;
|
||||||
|
kliva_V = irregV "kliva" "klev" "klivit" ;
|
||||||
|
klyva_V = irregV "klyva" "klöv" "kluvit" ;
|
||||||
|
knipa_V = irregV "knipa" "knep" "knipit" ;
|
||||||
|
knyta_V = irregV "knyta" "knöt" "knutit" ;
|
||||||
|
komma_V = irregV "komma" "kom" "kommit" ;
|
||||||
|
krypa_V = irregV "krypa" "kröp" "krupit" ;
|
||||||
|
kunna_V = mkV "kunna" "kan" "kan" "kunde" "kunnat" "känd" ;
|
||||||
|
kvida_V = irregV "kvida" "kved" "kvidit" ;
|
||||||
|
låta_V = irregV "låta" "lät" "låtit" ;
|
||||||
|
leva_V = irregV "leva" "levde" "levt" ;
|
||||||
|
ligga_V = irregV "ligga" "låg" "legat" ;
|
||||||
|
ljuda_V = irregV "ljuda" "ljöd" "ljudit" ;
|
||||||
|
ljuga_V = irregV "ljuga" "ljög" "ljugit" ;
|
||||||
|
ljuta_V = irregV "ljuta" "ljöt" "ljutit" ;
|
||||||
|
lägga_V = irregV "lägga" "lade" "lagt" ;
|
||||||
|
mottaga_V = irregV "mottaga" "mottog" "mottagit" ;
|
||||||
|
nerstiga_V = irregV "nerstiga" "nersteg" "nerstigit" ;
|
||||||
|
niga_V = irregV "niga" "neg" "nigit" ;
|
||||||
|
njuta_V = irregV "njuta" "njöt" "njutit" ;
|
||||||
|
omgiva_V = irregV "omgiva" "omgav" "omgivit" ;
|
||||||
|
överfalla_V = irregV "överfalla" "överföll" "överfallit" ;
|
||||||
|
övergiva_V = irregV "övergiva" "övergav" "övergivit" ;
|
||||||
|
pipa_V = irregV "pipa" "pep" "pipit" ;
|
||||||
|
rida_V = irregV "rida" "red" "ridit" ;
|
||||||
|
rinna_V = irregV "rinna" "rann" "runnit" ;
|
||||||
|
riva_V = irregV "riva" "rev" "rivit" ;
|
||||||
|
ryta_V = irregV "ryta" "röt" "rutit" ;
|
||||||
|
säga_V = irregV "säga" "sade" "sagt" ;
|
||||||
|
se_V = irregV "se" "såg" "sett" ;
|
||||||
|
sitta_V = irregV "sitta" "satt" "suttit" ;
|
||||||
|
sjuda_V = irregV "sjuda" "sjöd" "sjudit" ;
|
||||||
|
sjunga_V = irregV "sjunga" "sjöng" "sjungit" ;
|
||||||
|
sjunka_V = irregV "sjunka" "sjönk" "sjunkit" ;
|
||||||
|
skära_V = mkV "skära" "skär" "skär" "skar" "skurit" "skuren" ;
|
||||||
|
skina_V = irregV "skina" "sken" "skinit" ;
|
||||||
|
skita_V = irregV "skita" "sket" "skitit" ;
|
||||||
|
skjuta_V = irregV "skjuta" "skjöt" "skjutit" ;
|
||||||
|
skrida_V = irregV "skrida" "skred" "skridit" ;
|
||||||
|
skrika_V = irregV "skrika" "skrek" "skrikit" ;
|
||||||
|
skriva_V = irregV "skriva" "skrev" "skrivit" ;
|
||||||
|
skryta_V = irregV "skryta" "skröt" "skrutit" ;
|
||||||
|
slå_V = irregV "slå" "slog" "slagit" ;
|
||||||
|
slinka_V = irregV "slinka" "slank" "slunkit" ;
|
||||||
|
slippa_V = irregV "slippa" "slapp" "sluppit" ;
|
||||||
|
slita_V = irregV "slita" "slet" "slitit" ;
|
||||||
|
sluta_V = irregV "sluta" "slöt" "slutit" ;
|
||||||
|
smörja_V = irregV "smörja" "smorjde" "smort" ;
|
||||||
|
smita_V = irregV "smita" "smet" "smitit" ;
|
||||||
|
snyta_V = irregV "snyta" "snöt" "snutit" ;
|
||||||
|
sova_V = irregV "sova" "sov" "sovit" ;
|
||||||
|
spinna_V = irregV "spinna" "spann" "spunnit" ;
|
||||||
|
spricka_V = irregV "spricka" "sprack" "spruckit" ;
|
||||||
|
sprida_V = irregV "sprida" "spred" "spridit" ;
|
||||||
|
springa_V = irregV "springa" "sprang" "sprungit" ;
|
||||||
|
stå_V = irregV "stå" "stod" "stått" ;
|
||||||
|
sticka_V = irregV "sticka" "stack" "stuckit" ;
|
||||||
|
stiga_V = irregV "stiga" "steg" "stigit" ;
|
||||||
|
stinka_V = irregV "stinka" "stank" "stunkit" ;
|
||||||
|
strida_V = irregV "strida" "stred" "stridit" ;
|
||||||
|
strypa_V = irregV "strypa" "ströp" "strupit" ;
|
||||||
|
suga_V = irregV "suga" "sög" "sugit" ;
|
||||||
|
supa_V = irregV "supa" "söp" "supit" ;
|
||||||
|
svälla_V = irregV "svälla" "svällde" "svällt" ;
|
||||||
|
svida_V = irregV "svida" "sved" "svidit" ;
|
||||||
|
svika_V = irregV "svika" "svek" "svikit" ;
|
||||||
|
sy_V = irregV "sy" "sydde" "sytt" ;
|
||||||
|
taga_V = irregV "taga" "tog" "tagit" ;
|
||||||
|
tiga_V = irregV "tiga" "teg" "tigit" ;
|
||||||
|
tillåta_V = irregV "tillåta" "tillät" "tillåtit" ;
|
||||||
|
tillsluta_V = irregV "tillsluta" "tillslöt" "tillslutit" ;
|
||||||
|
tjuta_V = irregV "tjuta" "tjöt" "tjutit" ;
|
||||||
|
tryta_V = irregV "tryta" "tröt" "trutit" ;
|
||||||
|
tvinga_V = irregV "tvinga" "tvang" "tvungit" ;
|
||||||
|
uppfinna_V = irregV "uppfinna" "uppfann" "uppfunnit" ;
|
||||||
|
uppgiva_V = irregV "uppgiva" "uppgav" "uppgivit" ;
|
||||||
|
upplåta_V = irregV "upplåta" "upplät" "upplåtit" ;
|
||||||
|
uppstiga_V = irregV "uppstiga" "uppsteg" "uppstigit" ;
|
||||||
|
upptaga_V = irregV "upptaga" "upptog" "upptagit" ;
|
||||||
|
utbjuda_V = irregV "utbjuda" "utbjöd" "utbjudit" ;
|
||||||
|
utbrista_V = irregV "utbrista" "utbrast" "utbrustit" ;
|
||||||
|
utesluta_V = irregV "utesluta" "uteslöt" "uteslutit" ;
|
||||||
|
utskriva_V = irregV "utskriva" "utskrev" "utskrivit" ;
|
||||||
|
veta_V = mk6V "veta" "vet" "vet" "visste" "vetat" (variants {}) ;
|
||||||
|
vända_V = irregV "vända" "vände" "vänt" ;
|
||||||
|
vina_V = irregV "vina" "ven" "vinit" ;
|
||||||
|
vinna_V = irregV "vinna" "vann" "vunnit" ;
|
||||||
|
vrida_V = irregV "vrida" "vred" "vridit" ;
|
||||||
|
}
|
||||||
179
lib/resource-1.4/swedish/IrregSweAbs.gf
Normal file
179
lib/resource-1.4/swedish/IrregSweAbs.gf
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
abstract IrregSweAbs = Cat ** {
|
||||||
|
fun
|
||||||
|
anfalla_V : V ;
|
||||||
|
angiva_V : V ;
|
||||||
|
angripa_V : V ;
|
||||||
|
anhĺlla_V : V ;
|
||||||
|
antaga_V : V ;
|
||||||
|
äta_V : V ;
|
||||||
|
ĺterfinna_V : V ;
|
||||||
|
avbryta_V : V ;
|
||||||
|
avfalla_V : V ;
|
||||||
|
avhugga_V : V ;
|
||||||
|
avlida_V : V ;
|
||||||
|
avnjuta_V : V ;
|
||||||
|
avsitta_V : V ;
|
||||||
|
avskriva_V : V ;
|
||||||
|
avstiga_V : V ;
|
||||||
|
bära_V : V ;
|
||||||
|
bedraga_V : V ;
|
||||||
|
bedriva_V : V ;
|
||||||
|
befinna_V : V ;
|
||||||
|
begrava_V : V ;
|
||||||
|
behĺlla_V : V ;
|
||||||
|
beljuga_V : V ;
|
||||||
|
berida_V : V ;
|
||||||
|
besitta_V : V ;
|
||||||
|
beskriva_V : V ;
|
||||||
|
besluta_V : V ;
|
||||||
|
bestiga_V : V ;
|
||||||
|
bestrida_V : V ;
|
||||||
|
bidraga_V : V ;
|
||||||
|
bifalla_V : V ;
|
||||||
|
binda_V : V ;
|
||||||
|
bita_V : V ;
|
||||||
|
bjuda_V : V ;
|
||||||
|
bliva_V : V ;
|
||||||
|
borttaga_V : V ;
|
||||||
|
brinna_V : V ;
|
||||||
|
brista_V : V ;
|
||||||
|
bryta_V : V ;
|
||||||
|
dö_V : V ;
|
||||||
|
draga_V : V ;
|
||||||
|
dricka_V : V ;
|
||||||
|
driva_V : V ;
|
||||||
|
drypa_V : V ;
|
||||||
|
duga_V : V ;
|
||||||
|
dyka_V : V ;
|
||||||
|
erbjuda_V : V ;
|
||||||
|
erfara_V : V ;
|
||||||
|
erhĺlla_V : V ;
|
||||||
|
falla_V : V ;
|
||||||
|
fĺnga_V : V ;
|
||||||
|
fara_V : V ;
|
||||||
|
finna_V : V ;
|
||||||
|
flyga_V : V ;
|
||||||
|
flyta_V : V ;
|
||||||
|
förbehĺlla_V : V ;
|
||||||
|
förbinda_V : V ;
|
||||||
|
förbjuda_V : V ;
|
||||||
|
fördriva_V : V ;
|
||||||
|
föreskriva_V : V ;
|
||||||
|
företaga_V : V ;
|
||||||
|
förfrysa_V : V ;
|
||||||
|
förlĺta_V : V ;
|
||||||
|
förnimma_V : V ;
|
||||||
|
försitta_V : V ;
|
||||||
|
försvinna_V : V ;
|
||||||
|
förtiga_V : V ;
|
||||||
|
frysa_V : V ;
|
||||||
|
gĺ_V : V ;
|
||||||
|
göra_V : V ;
|
||||||
|
genomdriva_V : V ;
|
||||||
|
gilla_V : V ;
|
||||||
|
giva_V : V ;
|
||||||
|
gjuta_V : V ;
|
||||||
|
glida_V : V ;
|
||||||
|
gnida_V : V ;
|
||||||
|
grĺta_V : V ;
|
||||||
|
gripa_V : V ;
|
||||||
|
hĺlla_V : V ;
|
||||||
|
hinna_V : V ;
|
||||||
|
hugga_V : V ;
|
||||||
|
iakttaga_V : V ;
|
||||||
|
inbegripa_V : V ;
|
||||||
|
inbjuda_V : V ;
|
||||||
|
indraga_V : V ;
|
||||||
|
innesluta_V : V ;
|
||||||
|
inskriva_V : V ;
|
||||||
|
intaga_V : V ;
|
||||||
|
känna_V : V ;
|
||||||
|
klämma_V : V ;
|
||||||
|
kliva_V : V ;
|
||||||
|
klyva_V : V ;
|
||||||
|
knipa_V : V ;
|
||||||
|
knyta_V : V ;
|
||||||
|
komma_V : V ;
|
||||||
|
krypa_V : V ;
|
||||||
|
kunna_V : V ;
|
||||||
|
kvida_V : V ;
|
||||||
|
lĺta_V : V ;
|
||||||
|
leva_V : V ;
|
||||||
|
ligga_V : V ;
|
||||||
|
ljuda_V : V ;
|
||||||
|
ljuga_V : V ;
|
||||||
|
ljuta_V : V ;
|
||||||
|
lägga_V : V ;
|
||||||
|
mottaga_V : V ;
|
||||||
|
nerstiga_V : V ;
|
||||||
|
niga_V : V ;
|
||||||
|
njuta_V : V ;
|
||||||
|
omgiva_V : V ;
|
||||||
|
överfalla_V : V ;
|
||||||
|
övergiva_V : V ;
|
||||||
|
pipa_V : V ;
|
||||||
|
rida_V : V ;
|
||||||
|
rinna_V : V ;
|
||||||
|
riva_V : V ;
|
||||||
|
ryta_V : V ;
|
||||||
|
säga_V : V ;
|
||||||
|
se_V : V ;
|
||||||
|
sitta_V : V ;
|
||||||
|
sjuda_V : V ;
|
||||||
|
sjunga_V : V ;
|
||||||
|
sjunka_V : V ;
|
||||||
|
skära_V : V ;
|
||||||
|
skina_V : V ;
|
||||||
|
skita_V : V ;
|
||||||
|
skjuta_V : V ;
|
||||||
|
skrida_V : V ;
|
||||||
|
skrika_V : V ;
|
||||||
|
skriva_V : V ;
|
||||||
|
skryta_V : V ;
|
||||||
|
slĺ_V : V ;
|
||||||
|
slinka_V : V ;
|
||||||
|
slippa_V : V ;
|
||||||
|
slita_V : V ;
|
||||||
|
sluta_V : V ;
|
||||||
|
smörja_V : V ;
|
||||||
|
smita_V : V ;
|
||||||
|
snyta_V : V ;
|
||||||
|
sova_V : V ;
|
||||||
|
spinna_V : V ;
|
||||||
|
spricka_V : V ;
|
||||||
|
sprida_V : V ;
|
||||||
|
springa_V : V ;
|
||||||
|
stĺ_V : V ;
|
||||||
|
sticka_V : V ;
|
||||||
|
stiga_V : V ;
|
||||||
|
stinka_V : V ;
|
||||||
|
strida_V : V ;
|
||||||
|
strypa_V : V ;
|
||||||
|
suga_V : V ;
|
||||||
|
supa_V : V ;
|
||||||
|
svälla_V : V ;
|
||||||
|
svida_V : V ;
|
||||||
|
svika_V : V ;
|
||||||
|
sy_V : V ;
|
||||||
|
taga_V : V ;
|
||||||
|
tiga_V : V ;
|
||||||
|
tillĺta_V : V ;
|
||||||
|
tillsluta_V : V ;
|
||||||
|
tjuta_V : V ;
|
||||||
|
tryta_V : V ;
|
||||||
|
tvinga_V : V ;
|
||||||
|
uppfinna_V : V ;
|
||||||
|
uppgiva_V : V ;
|
||||||
|
upplĺta_V : V ;
|
||||||
|
uppstiga_V : V ;
|
||||||
|
upptaga_V : V ;
|
||||||
|
utbjuda_V : V ;
|
||||||
|
utbrista_V : V ;
|
||||||
|
utesluta_V : V ;
|
||||||
|
utskriva_V : V ;
|
||||||
|
vända_V : V ;
|
||||||
|
veta_V : V ;
|
||||||
|
vina_V : V ;
|
||||||
|
vinna_V : V ;
|
||||||
|
vrida_V : V ;
|
||||||
|
}
|
||||||
10
lib/resource-1.4/swedish/LangSwe.gf
Normal file
10
lib/resource-1.4/swedish/LangSwe.gf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||||
|
|
||||||
|
concrete LangSwe of Lang =
|
||||||
|
GrammarSwe,
|
||||||
|
LexiconSwe
|
||||||
|
** {
|
||||||
|
|
||||||
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
} ;
|
||||||
366
lib/resource-1.4/swedish/LexiconSwe.gf
Normal file
366
lib/resource-1.4/swedish/LexiconSwe.gf
Normal file
@@ -0,0 +1,366 @@
|
|||||||
|
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||||
|
|
||||||
|
concrete LexiconSwe of Lexicon = CatSwe **
|
||||||
|
open Prelude, ParadigmsSwe, IrregSwe in {
|
||||||
|
|
||||||
|
flags
|
||||||
|
optimize=values ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
airplane_N = regGenN "flygplan" neutrum ;
|
||||||
|
answer_V2S = mkV2S (regV "svarar") (mkPrep "till") ;
|
||||||
|
apartment_N = mk2N "lägenhet" "lägenheter" ;
|
||||||
|
apple_N = regGenN "äpple" neutrum ;
|
||||||
|
art_N = mk2N "konst" "konster" ;
|
||||||
|
ask_V2Q = mkV2Q (regV "frågar") noPrep ;
|
||||||
|
baby_N = regGenN "bebis" utrum ;
|
||||||
|
bad_A = irregA "dålig" "sämre" "sämst";
|
||||||
|
bank_N = mk2N "bank" "banker" ;
|
||||||
|
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" "bad" "bett" "bedd") noPrep (mkPrep "att") ;
|
||||||
|
big_A = irregA "stor" "större" "störst";
|
||||||
|
bike_N = mk2N "cykel" "cyklar" ;
|
||||||
|
bird_N = mk2N "fågel" "fåglar" ;
|
||||||
|
black_A = mk2A "svart" "svart" ;
|
||||||
|
blue_A = mk2A "blå" "blått";
|
||||||
|
boat_N = regGenN "båt" utrum ;
|
||||||
|
book_N = mkN "bok" "boken" "böcker" "böckerna" ;
|
||||||
|
boot_N = mk2N "stövel" "stövlar" ;
|
||||||
|
boss_N = mk2N "chef" "chefer" ;
|
||||||
|
boy_N = regGenN "pojke" utrum ;
|
||||||
|
bread_N = regGenN "bröd" neutrum ;
|
||||||
|
break_V2 = dirV2 (partV (mkV "slå" "slår" "slå" "slog" "slagit" "slagen") "sönder") ;
|
||||||
|
broad_A = mk2A "bred" "brett" ;
|
||||||
|
brother_N2 = mkN2 ((mkN "bror" "brodern" "bröder" "bröderna")) (mkPrep "till") ;
|
||||||
|
brown_A = regA "brun" ;
|
||||||
|
butter_N = regGenN "smör" neutrum ;
|
||||||
|
buy_V2 = dirV2 (mk2V "köpa" "köpte") ;
|
||||||
|
camera_N = regGenN "kamera" utrum ;
|
||||||
|
cap_N = regGenN "mössa" utrum ;
|
||||||
|
car_N = regGenN "bil" utrum ;
|
||||||
|
carpet_N = regGenN "matta" utrum ;
|
||||||
|
cat_N = mk2N "katt" "katter" ;
|
||||||
|
ceiling_N = regGenN "tak" neutrum ;
|
||||||
|
chair_N = regGenN "stol" utrum ;
|
||||||
|
cheese_N = regGenN "ost" utrum ;
|
||||||
|
child_N = regGenN "barn" neutrum ;
|
||||||
|
church_N = regGenN "kyrka" utrum ;
|
||||||
|
city_N = mkN "stad" "staden" "städer" "städerna" ;
|
||||||
|
clean_A = regA "ren" ;
|
||||||
|
clever_A = regA "klok" ;
|
||||||
|
close_V2 = dirV2 (mk2V "stänga" "stängde") ;
|
||||||
|
coat_N = regGenN "rock" utrum ;
|
||||||
|
cold_A = regA "kall" ;
|
||||||
|
come_V = komma_V ;
|
||||||
|
computer_N = mk2N "dator" "datorer" ;
|
||||||
|
country_N = mkN "land" "landet" "länder" "länderna" ;
|
||||||
|
cousin_N = mk2N "kusin" "kusiner" ;
|
||||||
|
cow_N = mk2N "ko" "kor" ;
|
||||||
|
die_V = (mkV "dö" "dör" "dö" "dog" "dött" "dödd") ; ----
|
||||||
|
distance_N3 = mkN3 (mk2N "avstånd" "avstånd") (mkPrep "från") (mkPrep "till") ;
|
||||||
|
dirty_A = regA "smutsig" ;
|
||||||
|
doctor_N = mk2N "läkare" "läkare" ;
|
||||||
|
dog_N = regGenN "hund" utrum ;
|
||||||
|
door_N = regGenN "dörr" utrum ;
|
||||||
|
drink_V2 = dirV2 (irregV "dricka" "drack" "druckit") ;
|
||||||
|
easy_A2V = mkA2V (mk2A "lätt" "lätt") (mkPrep "för") ;
|
||||||
|
eat_V2 = dirV2 (irregV "äta" "åt" "ätit") ;
|
||||||
|
empty_A = mkA "tom" "tomt" "tomma" "tomma" "tommare" "tommast" "tommaste" ;
|
||||||
|
enemy_N = regGenN "fiende" neutrum ;
|
||||||
|
factory_N = mk2N "fabrik" "fabriker" ;
|
||||||
|
father_N2 = mkN2 ((mkN "far" "fadern" "fäder" "fäderna")) (mkPrep "till") ;
|
||||||
|
fear_VS = mkVS (regV "fruktar") ;
|
||||||
|
find_V2 = dirV2 (irregV "finna" "fann" "funnit") ;
|
||||||
|
fish_N = mk2N "fisk" "fiskar" ;
|
||||||
|
floor_N = regGenN "golv" neutrum ;
|
||||||
|
forget_V2 = dirV2 (mkV "glömma" "glömmer" "glöm" "glömde" "glömt" "glömd") ;
|
||||||
|
fridge_N = regGenN "kylskåp" neutrum ;
|
||||||
|
friend_N = mkN "vän" "vännen" "vänner" "vännerna" ;
|
||||||
|
fruit_N = mk2N "frukt" "frukter" ;
|
||||||
|
fun_AV = mkAV (regA "rolig") ;
|
||||||
|
garden_N = regGenN "trädgård" utrum ;
|
||||||
|
girl_N = regGenN "flicka" utrum ;
|
||||||
|
glove_N = regGenN "handske" utrum ;
|
||||||
|
gold_N = regGenN "guld" neutrum ;
|
||||||
|
good_A = mkA "god" "gott" "goda" "goda" "bättre" "bäst" "bästa" ;
|
||||||
|
go_V = (mkV "gå" "går" "gå" "gick" "gått" "gången") ;
|
||||||
|
green_A = regA "grön" ;
|
||||||
|
harbour_N = regGenN "hamn" utrum;
|
||||||
|
hate_V2 = dirV2 (regV "hatar") ;
|
||||||
|
hat_N = regGenN "hatt" utrum ;
|
||||||
|
have_V2 = dirV2 (mkV "ha" "har" "ha" "hade" "haft" "haft") ; ---- pp
|
||||||
|
hear_V2 = dirV2 (mkV "höra" "hör" "hör" "hörde" "hört" "hörd") ;
|
||||||
|
hill_N = regGenN "kulle" utrum ;
|
||||||
|
-- hope_VS = mkVS ((regV "önskar")) ;
|
||||||
|
hope_VS = mkVS (depV (regV "hoppar")) ;
|
||||||
|
horse_N = regGenN "häst" utrum ;
|
||||||
|
hot_A = regA "het" ;
|
||||||
|
house_N = regGenN "hus" neutrum ;
|
||||||
|
important_A = regA "viktig" ;
|
||||||
|
industry_N = mk2N "industri" "industrier" ; ---- "ien" ??
|
||||||
|
iron_N = regGenN "järn" neutrum ;
|
||||||
|
king_N = (regGenN "kung" utrum) ;
|
||||||
|
know_V2 = dirV2 (mkV "veta" "vet" "vet" "visste" "vetat" "visst") ;
|
||||||
|
lake_N = mkN "sjö" "sjön" "sjöar" "sjöarna" ;
|
||||||
|
lamp_N = regGenN "lampa" utrum;
|
||||||
|
learn_V2 = dirV2 (reflV (mkV "lära" "lär" "lär" "lärde" "lärt" "lärd")) ;
|
||||||
|
leather_N = mkN "läder" "lädret" "läder" "lädren" ;
|
||||||
|
leave_V2 = dirV2 (regV "lämnar") ;
|
||||||
|
like_V2 = mkV2 (mk2V "tycka" "tyckte") (mkPrep "om") ;
|
||||||
|
listen_V2 = mkV2 (regV "lyssnar") (mkPrep "på") ;
|
||||||
|
live_V = (irregV "leva" "levde" "levt") ; ---- ?
|
||||||
|
long_A = irregA "lång" "längre" "längst" ;
|
||||||
|
lose_V2 = dirV2 (regV "förlora") ;
|
||||||
|
love_N = regGenN "kärlek" utrum ;
|
||||||
|
love_V2 = dirV2 (regV "älska") ;
|
||||||
|
man_N = (mkN "man" "mannen" "män" "männen") ;
|
||||||
|
married_A2 = mkA2 (mk2A "gift" "gift") (mkPrep "med") ;
|
||||||
|
meat_N = regGenN "kött" neutrum ;
|
||||||
|
milk_N = regGenN "mjölk" utrum ; ---- -ar?
|
||||||
|
moon_N = regGenN "måne" utrum ;
|
||||||
|
mother_N2 = mkN2 (mkN "mor" "modern" "mödrar" "mödrarna") (mkPrep "till") ;
|
||||||
|
mountain_N = regGenN "berg" neutrum ;
|
||||||
|
music_N = mk2N "musik" "musiker" ; ---- er ?
|
||||||
|
narrow_A = regA "smal" ;
|
||||||
|
new_A = mkA "ny" "nytt" "nya" "nya" "nyare" "nyast" "nyaste" ;
|
||||||
|
newspaper_N = regGenN "tidning" utrum ;
|
||||||
|
oil_N = regGenN "olja" utrum ;
|
||||||
|
old_A = mkA "gammal" "gammalt" "gamla" "gamla" "äldre" "äldst" "äldsta" ;
|
||||||
|
open_V2 = dirV2 (regV "öppna") ;
|
||||||
|
paint_V2A = mkV2A (regV "måla") noPrep ;
|
||||||
|
paper_N = mkN "papper" "pappret" "papper" "pappren" ;
|
||||||
|
paris_PN = regGenPN "Paris" neutrum ;
|
||||||
|
peace_N = regGenN "fred" utrum ; ---- ar?
|
||||||
|
pen_N = regGenN "penna" utrum ;
|
||||||
|
planet_N = mk2N "planet" "planeter" ;
|
||||||
|
plastic_N = mk2N "plast" "plaster" ;
|
||||||
|
play_V2 = dirV2 (regV "spela") ;
|
||||||
|
policeman_N = mk2N "polis" "poliser" ;
|
||||||
|
priest_N = mk2N "präst" "präster" ;
|
||||||
|
probable_AS = mkAS (regA "sannolik") ;
|
||||||
|
queen_N = regGenN "drottning" utrum ;
|
||||||
|
radio_N = mkN "radio" "radion" "radioapparater" "radioapparaterna" ; -- SAOL
|
||||||
|
rain_V0 = mkV0 (regV "regna") ;
|
||||||
|
read_V2 = dirV2 (mk2V "läsa" "läste") ;
|
||||||
|
red_A = mk2A "röd" "rött" ;
|
||||||
|
religion_N = mk2N "religion" "religioner" ;
|
||||||
|
restaurant_N = mk2N "restaurang" "restauranger" ;
|
||||||
|
river_N = mkN "å" "ån" "åar" "åarna" ;
|
||||||
|
rock_N = mkN "sten" "stenen" "stenar" "stenarna" ;
|
||||||
|
roof_N = regGenN "tak" neutrum ;
|
||||||
|
rubber_N = mkN "gummi" "gummit" "gummin" "gummina" ;
|
||||||
|
run_V = (irregV "springa" "sprang" "sprungit") ;
|
||||||
|
say_VS = mkVS (mkV "säga" "säger" "säg" "sade" "sagt" "sagd") ;
|
||||||
|
school_N = regGenN "skola" utrum;
|
||||||
|
science_N = mk2N "vetenskap" "vetenskaper" ;
|
||||||
|
sea_N = mkN "sjö" "sjön" "sjöar" "sjöarna" ;
|
||||||
|
seek_V2 = dirV2 (mk2V "söka" "sökte") ;
|
||||||
|
see_V2 = dirV2 (mkV "se" "ser" "se" "såg" "sett" "sedd") ;
|
||||||
|
sell_V3 = dirV3 (irregV "sälja" "sålde" "sålt") (mkPrep "till") ;
|
||||||
|
send_V3 = dirV3 (regV "skicka") (mkPrep "till") ;
|
||||||
|
sheep_N = mk2N "får" "får" ;
|
||||||
|
ship_N = regGenN "skepp" neutrum ;
|
||||||
|
shirt_N = regGenN "skjorta" utrum ;
|
||||||
|
shoe_N = mk2N "sko" "skor" ;
|
||||||
|
shop_N = mk2N "affär" "affären" ;
|
||||||
|
short_A = regA "kort" ;
|
||||||
|
silver_N = mkN "silver" "silvret" "silver" "silvren" ;
|
||||||
|
sister_N = mk2N "syster" "systrar" ;
|
||||||
|
sleep_V = (irregV "sova" "sov" "sovit") ;
|
||||||
|
small_A = mkA "liten" "litet" "lilla" "små" "mindre" "minst" "minsta" ;
|
||||||
|
snake_N = regGenN "orm" utrum ;
|
||||||
|
sock_N = regGenN "strumpa" utrum ;
|
||||||
|
speak_V2 = dirV2 (regV "tala") ;
|
||||||
|
star_N = regGenN "stjärna" utrum ;
|
||||||
|
steel_N = regGenN "stål" utrum ;
|
||||||
|
stone_N = mkN "sten" "stenen" "stenar" "stenarna" ;
|
||||||
|
stove_N = regGenN "spis" utrum ;
|
||||||
|
student_N = mk2N "student" "studenter" ;
|
||||||
|
stupid_A = mk3A "dum" "dumt" "dumma" ;
|
||||||
|
sun_N = regGenN "sol" utrum ;
|
||||||
|
switch8off_V2 = dirV2 (partV (irregV "stänga" "stängde" "stängt") "av") ;
|
||||||
|
switch8on_V2 = dirV2 (partV (irregV "slå" "slog" "slagit") "på") ;
|
||||||
|
table_N = regGenN "bord" neutrum ;
|
||||||
|
talk_V3 = mkV3 (regV "prata") (mkPrep "till") (mkPrep "om") ;
|
||||||
|
teacher_N = mk2N "lärare" "lärare" ;
|
||||||
|
teach_V2 = dirV2 (regV "undervisa") ;
|
||||||
|
television_N = mk2N "television" "televisioner" ;
|
||||||
|
thick_A = regA "tjock" ;
|
||||||
|
thin_A = mk2A "tunn" "tunt" ;
|
||||||
|
train_N = regGenN "tåg" neutrum ;
|
||||||
|
travel_V = mk2V "resa" "reste" ;
|
||||||
|
tree_N = regGenN "träd" neutrum ;
|
||||||
|
---- trousers_N = regGenN "trousers" ; ---- pl t !
|
||||||
|
ugly_A = regA "ful" ;
|
||||||
|
understand_V2 = dirV2 (mkV "förstå" "förstår" "förstå" "förstod" "förstått" "förstådd") ;
|
||||||
|
university_N = regGenN "universitet" neutrum ;
|
||||||
|
village_N = mkN "by" "byn" "byar" "byarna" ;
|
||||||
|
wait_V2 = mkV2 (regV "vänta") (mkPrep "på") ;
|
||||||
|
walk_V = (mkV "gå" "går" "gå" "gick" "gått" "gången") ;
|
||||||
|
warm_A = regA "varm" ;
|
||||||
|
war_N = regGenN "krig" neutrum ;
|
||||||
|
watch_V2 = mkV2 (regV "titta") (mkPrep "på") ;
|
||||||
|
water_N = mkN "vatten" "vattnet" "vatten" "vattnen" ;
|
||||||
|
white_A = regA "vit" ;
|
||||||
|
window_N = mkN "fönster" "fönstret" "fönster" "fönstren" ;
|
||||||
|
wine_N = mkN "vin" "vinet" "viner" "vinerna" ; ----
|
||||||
|
win_V2 = dirV2 (irregV "vinna" "vann" "vunnit") ;
|
||||||
|
woman_N = regGenN "kvinna" utrum ;
|
||||||
|
wonder_VQ = mkVQ (regV "undra") ;
|
||||||
|
wood_N = mkN "trä" "träet" "träen" "träena" ; ---- ?
|
||||||
|
write_V2 = dirV2 (irregV "skriva" "skrev" "skrivit") ;
|
||||||
|
yellow_A = regA "gul" ;
|
||||||
|
young_A = irregA "ung" "yngre" "yngst" ;
|
||||||
|
|
||||||
|
do_V2 = dirV2 göra_V ;
|
||||||
|
now_Adv = mkAdv "nu" ;
|
||||||
|
already_Adv = mkAdv "redan" ;
|
||||||
|
song_N = mk2N "sång" "sånger" ;
|
||||||
|
add_V3 = mkV3 (partV (irregV "lägga" "lade" "lagt") "till") noPrep (mkPrep "till") ;
|
||||||
|
number_N = mkN "nummer" "numret" "numren" "numren" ;
|
||||||
|
put_V2 = mkV2 (mkV "sätta" "sätter" "sätt" "satte" "satt" "satt") noPrep ;
|
||||||
|
stop_V = regV "stanna" ;
|
||||||
|
jump_V = regV "hoppa" ;
|
||||||
|
|
||||||
|
left_Ord = {s = "vänstra" ; isDet = True} ;
|
||||||
|
right_Ord = {s = "högra" ; isDet = True} ;
|
||||||
|
far_Adv = mkAdv "långt" ;
|
||||||
|
correct_A = regA "riktig" ;
|
||||||
|
dry_A = regA "torr" ;
|
||||||
|
dull_A = mk2A "slö" "slött";
|
||||||
|
full_A = regA "full" ;
|
||||||
|
heavy_A = irregA "tung" "tyngre" "tyngst" ;
|
||||||
|
near_A = mkA "nära" "nära" "nära" "nära" "närmare" "närmast" "närmaste" ;
|
||||||
|
rotten_A = mk3A "rutten" "ruttet" "ruttna" ;
|
||||||
|
round_A = regA "rund" ;
|
||||||
|
sharp_A = regA "vass" ;
|
||||||
|
smooth_A = regA "slät" ;
|
||||||
|
straight_A = regA "rak" ;
|
||||||
|
wet_A = regA "våt" ;
|
||||||
|
wide_A = mk2A "bred" "brett" ;
|
||||||
|
animal_N = mk2N "djur" "djur" ;
|
||||||
|
ashes_N = mk2N "aska" "askor" ;
|
||||||
|
back_N = mk2N "rygg" "ryggar" ;
|
||||||
|
bark_N = mk2N "bark" "barkar" ;
|
||||||
|
belly_N = mk2N "mage" "magar" ;
|
||||||
|
blood_N = mk2N "blod" "blod" ;
|
||||||
|
bone_N = mk2N "ben" "ben" ;
|
||||||
|
breast_N = mk2N "bröst" "bröst" ;
|
||||||
|
cloud_N = mk2N "moln" "moln" ;
|
||||||
|
day_N = mk2N "dag" "dagar" ;
|
||||||
|
dust_N = mk2N "damm" "damm" ;
|
||||||
|
ear_N = mkN "öra" "örat" "öron" "öronen" ;
|
||||||
|
earth_N = mk2N "jord" "jordar" ;
|
||||||
|
egg_N = mk2N "ägg" "ägg" ;
|
||||||
|
eye_N = mkN "öga" "ögat" "ögon" "ögonen" ;
|
||||||
|
fat_N = mk2N "fett" "fett" ;
|
||||||
|
feather_N = mk2N "fjäder" "fjädrar" ;
|
||||||
|
fingernail_N = mkN "nagel" "nageln" "naglar" "naglarna";
|
||||||
|
fire_N = mk2N "eld" "eldar" ;
|
||||||
|
flower_N = mk2N "blomma" "blommor" ;
|
||||||
|
fog_N = mk2N "dimma" "dimmor" ;
|
||||||
|
foot_N = mk2N "fot" "fötter" ;
|
||||||
|
forest_N = mk2N "skog" "skogar" ;
|
||||||
|
grass_N = mk2N "gräs" "gräs" ;
|
||||||
|
guts_N = mk2N "inälva" "inälvor" ;
|
||||||
|
hair_N = mk2N "hår" "hår" ;
|
||||||
|
hand_N = mk2N "hand" "händer" ;
|
||||||
|
head_N = mkN "huvud" "huvudet" "huvuden" "huvudena" ;
|
||||||
|
heart_N = mkN "hjärta" "hjärtat" "hjärtan" "hjärtana" ;
|
||||||
|
horn_N = mk2N "horn" "horn" ;
|
||||||
|
husband_N = (mk2N "make" "makar") ;
|
||||||
|
ice_N = mk2N "is" "isar" ;
|
||||||
|
knee_N = mkN "knä" "knäet" "knän" "knäna" ;
|
||||||
|
leaf_N = mk2N "löv" "löv" ;
|
||||||
|
leg_N = mk2N "ben" "ben" ;
|
||||||
|
liver_N = mkN "lever" "levern" "levrar" "levrarna";
|
||||||
|
louse_N = mkN "lus" "lusen" "löss" "lössen" ;
|
||||||
|
mouth_N = mkN "mun" "munnen" "munnar" "munnarna" ;
|
||||||
|
name_N = mk2N "namn" "namn" ;
|
||||||
|
neck_N = mk2N "nacke" "nackar" ;
|
||||||
|
night_N = mk2N "natt" "nätter" ;
|
||||||
|
nose_N = mk2N "näsa" "näsor" ;
|
||||||
|
person_N = mk2N "person" "personer" ;
|
||||||
|
rain_N = mk2N "regn" "regn" ;
|
||||||
|
road_N = mk2N "väg" "vägar" ;
|
||||||
|
root_N = mk2N "rot" "rötter" ;
|
||||||
|
rope_N = mk2N "rep" "rep" ;
|
||||||
|
salt_N = mkN "salt" "saltet" "salter" "salterna";
|
||||||
|
sand_N = mk2N "sand" "sander" ;
|
||||||
|
seed_N = mkN "frö" "fröet" "frön" "fröna" ;
|
||||||
|
skin_N = mk2N "skinn" "skinn" ;
|
||||||
|
sky_N = mk2N "himmel" "himlar" ;
|
||||||
|
smoke_N = mk2N "rök" "rökar" ;
|
||||||
|
snow_N = mkN "snö" "snön" "snöer" "snöerna" ;
|
||||||
|
stick_N = mk2N "pinne" "pinnar" ;
|
||||||
|
tail_N = mk2N "svans" "svansar" ;
|
||||||
|
tongue_N = mk2N "tunga" "tungor" ;
|
||||||
|
tooth_N = mk2N "tand" "tänder" ;
|
||||||
|
wife_N = mk2N "fru" "fruar" ;
|
||||||
|
wind_N = mk2N "vind" "vindar" ;
|
||||||
|
wing_N = mk2N "vinge" "vingar" ;
|
||||||
|
worm_N = mk2N "mask" "maskar" ;
|
||||||
|
year_N = mk2N "år" "år" ;
|
||||||
|
bite_V2 = dirV2 (bita_V) ;
|
||||||
|
blow_V = mk2V "blåsa" "blåste" ;
|
||||||
|
burn_V = brinna_V ; -- FIXME: bränna?
|
||||||
|
count_V2 = dirV2 (regV "räkna") ;
|
||||||
|
cut_V2 = dirV2 (skära_V) ;
|
||||||
|
dig_V = mk2V "gräva" "grävde" ;
|
||||||
|
fall_V = falla_V ;
|
||||||
|
fear_V2 = dirV2 (regV "frukta") ;
|
||||||
|
float_V = flyta_V ;
|
||||||
|
flow_V = rinna_V ;
|
||||||
|
fly_V = flyga_V ;
|
||||||
|
freeze_V = frysa_V ;
|
||||||
|
give_V3 = dirV3 giva_V (mkPrep "till");
|
||||||
|
hit_V2 = dirV2 (slå_V) ;
|
||||||
|
hold_V2 = dirV2 (hålla_V) ;
|
||||||
|
hunt_V2 = dirV2 (regV "jaga") ;
|
||||||
|
kill_V2 = dirV2 (regV "döda") ;
|
||||||
|
laugh_V = regV "skratta" ;
|
||||||
|
lie_V = ligga_V ;
|
||||||
|
play_V = mk2V "leka" "lekte" ;
|
||||||
|
pull_V2 = dirV2 (draga_V) ;
|
||||||
|
push_V2 = dirV2 (mk2V "trycka" "tryckte") ;
|
||||||
|
rub_V2 = dirV2 (gnida_V) ;
|
||||||
|
scratch_V2 = dirV2 (regV "klia") ;
|
||||||
|
sew_V = sy_V ;
|
||||||
|
sing_V = sjunga_V ;
|
||||||
|
sit_V = sitta_V ;
|
||||||
|
smell_V = regV "lukta" ;
|
||||||
|
spit_V = regV "spotta" ;
|
||||||
|
split_V2 = dirV2 (klyva_V) ;
|
||||||
|
squeeze_V2 = dirV2 (klämma_V) ;
|
||||||
|
stab_V2 = dirV2 (sticka_V) ;
|
||||||
|
stand_V = stå_V ;
|
||||||
|
suck_V2 = dirV2 (suga_V) ;
|
||||||
|
swell_V = svälla_V ;
|
||||||
|
swim_V = regV "simma" ;
|
||||||
|
think_V = mk2V "tänka" "tänkte" ;
|
||||||
|
throw_V2 = dirV2 (regV "kasta") ;
|
||||||
|
tie_V2 = dirV2 (knyta_V) ;
|
||||||
|
turn_V = vända_V ;
|
||||||
|
vomit_V = mk2V "spy" "spydde" ;
|
||||||
|
wash_V2 = dirV2 (regV "tvätta") ;
|
||||||
|
wipe_V2 = dirV2 (regV "torka") ;
|
||||||
|
|
||||||
|
breathe_V = depV (regV "anda") ;
|
||||||
|
fight_V2 =
|
||||||
|
mkV2 (mkV "slåss" "slåss" "slåss" "slogs" "slagits" "slagen") (mkPrep "med") ;
|
||||||
|
|
||||||
|
grammar_N = mk1N "grammatikerna" ;
|
||||||
|
language_N = mk2N "språk" "språk" ;
|
||||||
|
rule_N = mkN "regel" "regeln" "regler" "reglerna" ;
|
||||||
|
|
||||||
|
john_PN = regPN "Johan" ;
|
||||||
|
question_N = regN "fråga" ;
|
||||||
|
ready_A = regA "färdig" ;
|
||||||
|
reason_N = regN "anledning" ;
|
||||||
|
today_Adv = mkAdv "idag" ;
|
||||||
|
uncertain_A = mk3A "osäker" "osäkert" "osäkra" ;
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
73
lib/resource-1.4/swedish/MorphoSwe.gf
Normal file
73
lib/resource-1.4/swedish/MorphoSwe.gf
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
--# -path=.:../scandinavian:../common:../../prelude
|
||||||
|
|
||||||
|
--1 A Simple Swedish Resource Morphology
|
||||||
|
--
|
||||||
|
-- Aarne Ranta 2002 -- 2005
|
||||||
|
--
|
||||||
|
-- This resource morphology contains definitions needed in the resource
|
||||||
|
-- syntax. To build a lexicon, it is better to use $ParadigmsSwe$, which
|
||||||
|
-- gives a higher-level access to this module.
|
||||||
|
|
||||||
|
resource MorphoSwe = CommonScand, ResSwe ** open Prelude, (Predef=Predef) in {
|
||||||
|
|
||||||
|
|
||||||
|
-- Verbs
|
||||||
|
|
||||||
|
-- Heuristic to infer all participle forms from one.
|
||||||
|
|
||||||
|
oper
|
||||||
|
ptPretAll : Str -> Str * Str = \funnen ->
|
||||||
|
case funnen of {
|
||||||
|
ko +"mmen" => <ko +"mmet", ko + "mna"> ;
|
||||||
|
vun +"nen" => <vun +"net", vun + "na"> ;
|
||||||
|
bjud + "en" => <bjud + "et", bjud + "na"> ;
|
||||||
|
se + "dd" => <se + "tt", se +"dda"> ;
|
||||||
|
tal + "ad" => <tal + "at", tal +"ade"> ;
|
||||||
|
kaen + "d" => <kaen + "t", kaen + "da"> ;
|
||||||
|
lekt => <lekt, lekt + "a">
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ptPretForms : Str -> AFormPos => Case => Str = \funnen -> \\a,c =>
|
||||||
|
let
|
||||||
|
funfun = ptPretAll funnen
|
||||||
|
in
|
||||||
|
mkCase c (case a of {
|
||||||
|
(Strong (SgUtr)) => funnen ;
|
||||||
|
(Strong (SgNeutr)) => funfun.p1 ;
|
||||||
|
_ => funfun.p2
|
||||||
|
}
|
||||||
|
) ;
|
||||||
|
|
||||||
|
-- For $Numeral$.
|
||||||
|
|
||||||
|
param DForm = ental | ton | tiotal ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
LinDigit = {s : DForm => CardOrd => Str} ;
|
||||||
|
|
||||||
|
cardOrd : Str -> Str -> CardOrd => Str = \tre,tredje ->
|
||||||
|
table {
|
||||||
|
NCard _ => tre ;
|
||||||
|
NOrd a => tredje ---- a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
cardReg : Str -> CardOrd => Str = \tio ->
|
||||||
|
cardOrd tio (tio + "nde") ;
|
||||||
|
|
||||||
|
mkTal : (x1,_,_,_,x5 : Str) -> LinDigit =
|
||||||
|
\två, tolv, tjugo, andra, tolfte ->
|
||||||
|
{s = table {
|
||||||
|
ental => cardOrd två andra ;
|
||||||
|
ton => cardOrd tolv tolfte ;
|
||||||
|
tiotal => cardReg tjugo
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
numPl : (CardOrd => Str) -> {s : CardOrd => Str ; n : Number} = \n ->
|
||||||
|
{s = n ; n = Pl} ;
|
||||||
|
|
||||||
|
invNum : CardOrd = NCard Neutr ;
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
2
lib/resource-1.4/swedish/NounSwe.gf
Normal file
2
lib/resource-1.4/swedish/NounSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete NounSwe of Noun = CatSwe ** NounScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
83
lib/resource-1.4/swedish/NumeralSwe.gf
Normal file
83
lib/resource-1.4/swedish/NumeralSwe.gf
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
concrete NumeralSwe of Numeral = CatSwe ** open ResSwe, MorphoSwe in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
|
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||||
|
Sub100, Sub1000, Sub1000000 =
|
||||||
|
{s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
num x = x ;
|
||||||
|
|
||||||
|
n2 = mkTal "två" "tolv" "tjugo" "andra" "tolfte" ;
|
||||||
|
n3 = mkTal "tre" "tretton" "trettio" "tredje" "trettonde" ;
|
||||||
|
n4 = mkTal "fyra" "fjorton" "fyrtio" "fjärde" "fjortonde" ;
|
||||||
|
n5 = mkTal "fem" "femton" "femtio" "femte" "femtonde" ;
|
||||||
|
n6 = mkTal "sex" "sexton" "sextio" "sjätte" "sextonde" ;
|
||||||
|
n7 = mkTal "sju" "sjutton" "sjuttio" "sjunde" "sjuttonde" ;
|
||||||
|
n8 = mkTal "åtta" "arton" "åttio" "åttonde" "artonde" ;
|
||||||
|
n9 = mkTal "nio" "nitton" "nittio" "nionde" "nittonde" ;
|
||||||
|
|
||||||
|
pot01 = {
|
||||||
|
s = \\f => table {
|
||||||
|
NCard g => case g of {Neutr => "ett" ; _ => "en"} ;
|
||||||
|
_ => "första"
|
||||||
|
} ;
|
||||||
|
n = Sg
|
||||||
|
} ;
|
||||||
|
pot0 d = {s = \\f,g => d.s ! f ! g ; n = Pl} ;
|
||||||
|
pot110 = numPl (cardReg "tio") ;
|
||||||
|
pot111 = numPl (cardOrd "elva" "elfte") ;
|
||||||
|
pot1to19 d = numPl (d.s ! ton) ;
|
||||||
|
pot0as1 n = {s = n.s ! ental ; n = n.n} ;
|
||||||
|
pot1 d = numPl (d.s ! tiotal) ;
|
||||||
|
pot1plus d e = {s = \\g => d.s ! tiotal ! invNum ++ e.s ! ental ! g ; n = Pl} ;
|
||||||
|
pot1as2 n = n ;
|
||||||
|
pot2 d =
|
||||||
|
numPl (\\g => d.s ! ental ! invNum ++ cardOrd "hundra" "hundrade" ! g) ;
|
||||||
|
pot2plus d e =
|
||||||
|
{s = \\g => d.s ! ental ! invNum ++ "hundra" ++ e.s ! g ; n = Pl} ;
|
||||||
|
pot2as3 n = n ;
|
||||||
|
pot3 n =
|
||||||
|
numPl (\\g => n.s ! invNum ++ cardOrd "tusen" "tusende" ! g) ;
|
||||||
|
pot3plus n m =
|
||||||
|
{s = \\g => n.s ! invNum ++ "tusen" ++ m.s ! g ; n = Pl} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Dig = TDigit ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
IDig d = d ;
|
||||||
|
|
||||||
|
IIDig d i = {
|
||||||
|
s = \\o => d.s ! NCard neutrum ++ i.s ! o ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
D_0 = mkDig "0" ;
|
||||||
|
D_1 = mk3Dig "1" "1:a" Sg ;
|
||||||
|
D_2 = mk2Dig "2" "2:a" ;
|
||||||
|
D_3 = mkDig "3" ;
|
||||||
|
D_4 = mkDig "4" ;
|
||||||
|
D_5 = mkDig "5" ;
|
||||||
|
D_6 = mkDig "6" ;
|
||||||
|
D_7 = mkDig "7" ;
|
||||||
|
D_8 = mkDig "8" ;
|
||||||
|
D_9 = mkDig "9" ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
|
||||||
|
mkDig : Str -> TDigit = \c -> mk2Dig c (c + ":e") ;
|
||||||
|
|
||||||
|
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
||||||
|
s = table {NCard _ => c ; NOrd _ => o} ;
|
||||||
|
n = n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
TDigit = {
|
||||||
|
n : Number ;
|
||||||
|
s : CardOrd => Str
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
642
lib/resource-1.4/swedish/ParadigmsSwe.gf
Normal file
642
lib/resource-1.4/swedish/ParadigmsSwe.gf
Normal file
@@ -0,0 +1,642 @@
|
|||||||
|
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||||
|
|
||||||
|
--1 Swedish Lexical Paradigms
|
||||||
|
--
|
||||||
|
-- Aarne Ranta 2001 - 2006
|
||||||
|
--
|
||||||
|
-- This is an API for the user of the resource grammar
|
||||||
|
-- for adding lexical items. It gives functions for forming
|
||||||
|
-- expressions of open categories: nouns, adjectives, verbs.
|
||||||
|
--
|
||||||
|
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||||
|
-- accessed through the resource syntax API, $Structural.gf$.
|
||||||
|
--
|
||||||
|
-- The main difference with $MorphoSwe.gf$ is that the types
|
||||||
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
|
-- had the design principle of always having existing forms, rather
|
||||||
|
-- than stems, as string arguments of the paradigms.
|
||||||
|
--
|
||||||
|
-- The structure of functions for each word class $C$ is the following:
|
||||||
|
-- first we give a handful of patterns that aim to cover all
|
||||||
|
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
|
||||||
|
-- escape to construct the most irregular words of type $C$.
|
||||||
|
-- However, this function should only seldom be needed: we have a
|
||||||
|
-- separate module [``IrregSwe`` ../../swedish/IrregSwe],
|
||||||
|
-- which covers many irregular verbs.
|
||||||
|
|
||||||
|
|
||||||
|
resource ParadigmsSwe =
|
||||||
|
open
|
||||||
|
(Predef=Predef),
|
||||||
|
Prelude,
|
||||||
|
CommonScand,
|
||||||
|
ResSwe,
|
||||||
|
MorphoSwe,
|
||||||
|
CatSwe in {
|
||||||
|
|
||||||
|
--2 Parameters
|
||||||
|
--
|
||||||
|
-- To abstract over gender names, we define the following identifiers.
|
||||||
|
|
||||||
|
oper
|
||||||
|
Gender : Type ;
|
||||||
|
|
||||||
|
utrum : Gender ;
|
||||||
|
neutrum : Gender ;
|
||||||
|
|
||||||
|
-- To abstract over number names, we define the following.
|
||||||
|
|
||||||
|
Number : Type ;
|
||||||
|
|
||||||
|
singular : Number ;
|
||||||
|
plural : Number ;
|
||||||
|
|
||||||
|
-- To abstract over case names, we define the following.
|
||||||
|
|
||||||
|
Case : Type ;
|
||||||
|
|
||||||
|
nominative : Case ;
|
||||||
|
genitive : Case ;
|
||||||
|
|
||||||
|
-- Prepositions used in many-argument functions can be constructed from strings.
|
||||||
|
|
||||||
|
mkPrep : Str -> Prep ;
|
||||||
|
noPrep : Prep ; -- empty string
|
||||||
|
|
||||||
|
|
||||||
|
--2 Nouns
|
||||||
|
|
||||||
|
-- The following overloaded paradigm takes care of all noun formation.
|
||||||
|
|
||||||
|
mkN : overload {
|
||||||
|
|
||||||
|
-- The one-argument case takes the singular indefinite form and computes
|
||||||
|
-- the other forms and the gender by a simple heuristic. The heuristic is currently
|
||||||
|
-- to treat all words ending with "a" like "apa-apor", with "e" like "rike-riken",
|
||||||
|
-- and otherwise like "bil-bilar".
|
||||||
|
|
||||||
|
mkN : (apa : Str) -> N ;
|
||||||
|
|
||||||
|
-- The case with a string and gender makes it possible to treat
|
||||||
|
-- "lik" (neutrum) and "pojke" (utrum).
|
||||||
|
|
||||||
|
mkN : (lik : Str) -> Gender -> N ;
|
||||||
|
|
||||||
|
-- Giving two forms - the singular and plural indefinite - is sufficient for
|
||||||
|
-- most nouns. The paradigm deals correctly with the vowel contractions in
|
||||||
|
-- "nyckel - nycklar" such as "pojke - pojkar".
|
||||||
|
|
||||||
|
mkN : (nyckel,nycklar : Str) -> N ;
|
||||||
|
|
||||||
|
-- In the worst case, four forms are needed.
|
||||||
|
|
||||||
|
mkN : (museum,museet,museer,museerna : Str) -> N
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- All the functions above work quite as well to form *compound nouns*,
|
||||||
|
-- such as "fotboll".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--3 Relational nouns
|
||||||
|
--
|
||||||
|
-- Relational nouns ("kung av x") are nouns with a preposition.
|
||||||
|
-- As a special case, we provide regular nouns (formed with one-argument $mkN$)
|
||||||
|
-- with the preposition "av".
|
||||||
|
|
||||||
|
mkN2 : overload {
|
||||||
|
mkN2 : Str -> N2 ;
|
||||||
|
mkN2 : N -> Prep -> N2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Three-place relational nouns ("förbindelse från x till y")
|
||||||
|
-- need two prepositions.
|
||||||
|
|
||||||
|
mkN3 : N -> Prep -> Prep -> N3 ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Relational common noun phrases
|
||||||
|
--
|
||||||
|
-- In some cases, you may want to make a complex $CN$ into a
|
||||||
|
-- relational noun (e.g. "den före detta maken till"). However, $N2$ and
|
||||||
|
-- $N3$ are purely lexical categories. But you can use the $AdvCN$
|
||||||
|
-- and $PrepNP$ constructions to build phrases like this.
|
||||||
|
|
||||||
|
--
|
||||||
|
--3 Proper names and noun phrases
|
||||||
|
--
|
||||||
|
-- Proper names, with a regular genitive, are formed from strings and
|
||||||
|
-- have the default gender utrum.
|
||||||
|
|
||||||
|
mkPN : overload {
|
||||||
|
mkPN : Str -> PN ;
|
||||||
|
mkPN : Str -> Gender -> PN ;
|
||||||
|
|
||||||
|
-- In the worst case, the genitive form is irregular.
|
||||||
|
|
||||||
|
mkPN : (jesus,jesu : Str) -> Gender -> PN
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Adjectives
|
||||||
|
|
||||||
|
-- Adjectives need one to seven forms.
|
||||||
|
|
||||||
|
mkA : overload {
|
||||||
|
|
||||||
|
-- Most adjectives are formed simply by adding endings to a stem.
|
||||||
|
|
||||||
|
mkA : (billig : Str) -> A ;
|
||||||
|
|
||||||
|
-- Some adjectives have a deviant neuter form. The following pattern
|
||||||
|
-- also recognizes the neuter formation "galen-galet" and forms the
|
||||||
|
-- proper plural and comparison forms "galna-galnare-galnast".
|
||||||
|
|
||||||
|
mkA : (bred,brett : Str) -> A ;
|
||||||
|
|
||||||
|
-- Umlaut in comparison forms is
|
||||||
|
|
||||||
|
mkA : (tung,tyngre,tyngst : Str) -> A ;
|
||||||
|
|
||||||
|
-- A few adjectives need 5 forms.
|
||||||
|
mkA : (god,gott,goda,battre,bast : Str) -> A ;
|
||||||
|
|
||||||
|
-- Hardly any other adjective than "liten" needs the full 7 forms.
|
||||||
|
|
||||||
|
mkA : (liten,litet,lilla,sma,mindre,minst,minsta : Str) -> A
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Comparison forms may be compound ("mera svensk" - "mest svensk");
|
||||||
|
-- this behaviour can be forced on any adjective.
|
||||||
|
|
||||||
|
compoundA : A -> A ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--3 Two-place adjectives
|
||||||
|
--
|
||||||
|
-- Two-place adjectives need a preposition for their second argument.
|
||||||
|
|
||||||
|
mkA2 : A -> Prep -> A2 ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Adverbs
|
||||||
|
|
||||||
|
-- Adverbs are not inflected. Most lexical ones have position
|
||||||
|
-- after the verb. Some can be preverbal in subordinate position
|
||||||
|
-- (e.g. "alltid").
|
||||||
|
|
||||||
|
mkAdv : Str -> Adv ; -- här
|
||||||
|
mkAdV : Str -> AdV ; -- alltid
|
||||||
|
|
||||||
|
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||||
|
|
||||||
|
mkAdA : Str -> AdA ;
|
||||||
|
|
||||||
|
--2 Verbs
|
||||||
|
--
|
||||||
|
-- All verbs can be defined by the overloaded paradigm $mkV$.
|
||||||
|
|
||||||
|
mkV : overload {
|
||||||
|
|
||||||
|
-- The 'regular verb' (= one-place) case is inspired by Lexin. It uses the
|
||||||
|
-- present tense indicative form. The value is the first conjugation if the
|
||||||
|
-- argument ends with "ar" ("tala" - "talar" - "talade" - "talat"),
|
||||||
|
-- the second with "er" ("leka" - "leker" - "lekte" - "lekt", with the
|
||||||
|
-- variations like in "gräva", "vända", "tyda", "hyra"), and
|
||||||
|
-- the third in other cases ("bo" - "bor" - "bodde" - "bott").
|
||||||
|
-- It is also possible to give the infinite form to it; they are treated
|
||||||
|
-- as if they were implicitly suffixed by "r". Moreover, deponent verbs
|
||||||
|
-- are recognized from the final "s" ("hoppas").
|
||||||
|
|
||||||
|
mkV : (stämmer : Str) -> V ;
|
||||||
|
|
||||||
|
-- Most irregular verbs need just the conventional three forms.
|
||||||
|
|
||||||
|
mkV : (dricka,drack,druckit : Str) -> V ;
|
||||||
|
|
||||||
|
-- In the worst case, six forms are given.
|
||||||
|
|
||||||
|
mkV : (gå,går,gå,gick,gått,gången : Str) -> V ;
|
||||||
|
|
||||||
|
-- Particle verbs, such as "passa på", are formed by adding a string to a verb.
|
||||||
|
|
||||||
|
mkV : V -> Str -> V
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Deponent verbs.
|
||||||
|
--
|
||||||
|
-- Some words are used in passive forms only, e.g. "hoppas", some as
|
||||||
|
-- reflexive e.g. "ångra sig". Regular deponent verbs are also
|
||||||
|
-- handled by $mkV$ and recognized from the ending "s".
|
||||||
|
|
||||||
|
depV : V -> V ;
|
||||||
|
reflV : V -> V ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Two-place verbs
|
||||||
|
--
|
||||||
|
-- Two-place verbs need a preposition, which default to the 'empty preposition'
|
||||||
|
-- i.e. direct object. (transitive verbs). The simplest case is a regular
|
||||||
|
-- verb (as in $mkV$) with a direct object.
|
||||||
|
-- Notice that, if a particle is needed, it comes from the $V$.
|
||||||
|
|
||||||
|
mkV2 : overload {
|
||||||
|
mkV2 : Str -> V2 ;
|
||||||
|
mkV2 : V -> V2 ;
|
||||||
|
mkV2 : V -> Prep -> V2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Three-place verbs
|
||||||
|
--
|
||||||
|
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||||
|
-- the first one or both can be absent. The simplest case is a regular
|
||||||
|
-- verb (as in $mkV$) with no prepositions.
|
||||||
|
|
||||||
|
mkV3 : overload {
|
||||||
|
mkV3 : Str -> V3 ;
|
||||||
|
mkV3 : V -> V3 ;
|
||||||
|
mkV3 : V -> Prep -> V3 ;
|
||||||
|
mkV3 : V -> Prep -> Prep -> V3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--3 Other complement patterns
|
||||||
|
--
|
||||||
|
-- Verbs and adjectives can take complements such as sentences,
|
||||||
|
-- questions, verb phrases, and adjectives.
|
||||||
|
|
||||||
|
mkV0 : V -> V0 ;
|
||||||
|
mkVS : V -> VS ;
|
||||||
|
mkV2S : V -> Prep -> V2S ;
|
||||||
|
mkVV : V -> VV ;
|
||||||
|
mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
|
mkVA : V -> VA ;
|
||||||
|
mkV2A : V -> Prep -> V2A ;
|
||||||
|
mkVQ : V -> VQ ;
|
||||||
|
mkV2Q : V -> Prep -> V2Q ;
|
||||||
|
|
||||||
|
mkAS : A -> AS ;
|
||||||
|
mkA2S : A -> Prep -> A2S ;
|
||||||
|
mkAV : A -> AV ;
|
||||||
|
mkA2V : A -> Prep -> A2V ;
|
||||||
|
|
||||||
|
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$.
|
||||||
|
-- $V0$ is just $V$.
|
||||||
|
|
||||||
|
V0 : Type ;
|
||||||
|
AS, A2S, AV, A2V : Type ;
|
||||||
|
|
||||||
|
--.
|
||||||
|
--2 Definitions of the paradigms
|
||||||
|
--
|
||||||
|
-- The definitions should not bother the user of the API. So they are
|
||||||
|
-- hidden from the document.
|
||||||
|
|
||||||
|
Gender = ResSwe.Gender ;
|
||||||
|
Number = CommonScand.Number ;
|
||||||
|
Case = CommonScand.Case ;
|
||||||
|
utrum = Utr ;
|
||||||
|
neutrum = Neutr ;
|
||||||
|
singular = Sg ;
|
||||||
|
plural = Pl ;
|
||||||
|
nominative = Nom ;
|
||||||
|
genitive = Gen ;
|
||||||
|
|
||||||
|
mkPrep p = {s = p ; lock_Prep = <>} ;
|
||||||
|
noPrep = mkPrep [] ;
|
||||||
|
|
||||||
|
mkN = overload {
|
||||||
|
mkN : (apa : Str) -> N = regN ;
|
||||||
|
mkN : Str -> Gender -> N = regGenN ;
|
||||||
|
mkN : (nyckel, nycklar : Str) -> N = mk2N ;
|
||||||
|
mkN : (museum,museet,museer,museerna : Str) -> N = mk4N
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mk4N : (museum,museet,museer,museerna : Str) -> N = \apa,apan,apor,aporna -> {
|
||||||
|
s = nounForms apa apan apor aporna ;
|
||||||
|
g = case last apan of {
|
||||||
|
"n" => Utr ;
|
||||||
|
_ => Neutr
|
||||||
|
}
|
||||||
|
} ** {lock_N = <>} ;
|
||||||
|
|
||||||
|
regN : Str -> N = \bil -> regGenN bil g where {
|
||||||
|
g = case <bil : Str> of {
|
||||||
|
_ + "e" => Neutr ;
|
||||||
|
_ => Utr
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regGenN : Str -> Gender -> N = \bil, g -> case g of {
|
||||||
|
Utr => case last bil of {
|
||||||
|
"a" => decl1Noun bil ;
|
||||||
|
_ => decl2Noun bil
|
||||||
|
} ;
|
||||||
|
Neutr => case last bil of {
|
||||||
|
"e" => decl4Noun bil ;
|
||||||
|
_ => decl5Noun bil
|
||||||
|
}
|
||||||
|
} ** {lock_N = <>} ;
|
||||||
|
|
||||||
|
mk1N : Str -> N = \bilarna -> case bilarna of {
|
||||||
|
ap + "orna" => decl1Noun (ap + "a") ;
|
||||||
|
bil + "arna" => decl2Noun bil ;
|
||||||
|
rad + "erna" => decl3Noun rad ;
|
||||||
|
rik + "ena" => decl4Noun (rik + "e") ;
|
||||||
|
husen => decl5Noun (Predef.tk 2 husen)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mk2N : Str -> Str -> N = \bil,bilar ->
|
||||||
|
ifTok N bil bilar (decl5Noun bil) (
|
||||||
|
case Predef.dp 2 bilar of {
|
||||||
|
"or" => case bil of {
|
||||||
|
_ + "a" => decl1Noun bil ; -- apa, apor
|
||||||
|
_ + "o" => mk4N bil (bil + "n") bilar (bilar + "na") ; -- ko,kor
|
||||||
|
_ => mk4N bil (bil + "en") bilar (bilar + "na") -- ros,rosor
|
||||||
|
} ;
|
||||||
|
"ar" => decl2Noun bil ;
|
||||||
|
"er" => case bil of {
|
||||||
|
_ + "or" => mk4N bil (bil + "n") bilar (bilar + "na") ; -- motor,motorn
|
||||||
|
_ => decl3gNoun bil bilar -- fot, fötter
|
||||||
|
} ;
|
||||||
|
"en" => decl4Noun bil ; -- rike, riken
|
||||||
|
_ => mk4N bil (bil + "et") bilar (bilar + "n") -- centrum, centra
|
||||||
|
}) ;
|
||||||
|
|
||||||
|
-- School declensions.
|
||||||
|
|
||||||
|
decl1Noun : Str -> N = \apa ->
|
||||||
|
let ap = init apa in
|
||||||
|
mk4N apa (apa + "n") (ap + "or") (ap + "orna") ;
|
||||||
|
|
||||||
|
decl2Noun : Str -> N = \bil ->
|
||||||
|
let
|
||||||
|
bb : Str * Str = case bil of {
|
||||||
|
br + ("o" | "u" | "ö" | "å") => <bil + "ar", bil + "n"> ;
|
||||||
|
pojk + "e" => <pojk + "ar", bil + "n"> ;
|
||||||
|
hi + "mme" + l@("l" | "r") => <hi + "m" + l + "ar",hi + "m" + l + "en"> ;
|
||||||
|
nyck + "e" + l@("l" | "r") => <nyck + l + "ar",bil + "n"> ;
|
||||||
|
sock + "e" + "n" => <sock + "nar", sock + "nen"> ;
|
||||||
|
_ => <bil + "ar", bil + "en">
|
||||||
|
} ;
|
||||||
|
in mk4N bil bb.p2 bb.p1 (bb.p1 + "na") ;
|
||||||
|
|
||||||
|
decl3Noun : Str -> N = \sak ->
|
||||||
|
case last sak of {
|
||||||
|
"e" => mk4N sak (sak + "n") (sak +"r") (sak + "rna") ;
|
||||||
|
"y" | "å" | "é" | "y" => mk4N sak (sak + "n") (sak +"er") (sak + "erna") ;
|
||||||
|
_ => mk4N sak (sak + "en") (sak + "er") (sak + "erna")
|
||||||
|
} ;
|
||||||
|
decl3gNoun : Str -> Str -> N = \sak,saker ->
|
||||||
|
case last sak of {
|
||||||
|
"e" => mk4N sak (sak + "n") saker (saker + "na") ;
|
||||||
|
"y" | "å" | "é" | "y" => mk4N sak (sak + "n") saker (saker + "na") ;
|
||||||
|
_ => mk4N sak (sak + "en") saker (saker + "na")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
decl4Noun : Str -> N = \rike ->
|
||||||
|
mk4N rike (rike + "t") (rike + "n") (rike + "na") ;
|
||||||
|
|
||||||
|
decl5Noun : Str -> N = \lik ->
|
||||||
|
case Predef.dp 3 lik of {
|
||||||
|
"are" => mk4N lik (lik + "n") lik (init lik + "na") ; -- kikare
|
||||||
|
_ => mk4N lik (lik + "et") lik (lik + "en")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkN2 = overload {
|
||||||
|
mkN2 : Str -> N2 = \s -> mmkN2 (regN s) (mkPrep "av") ;
|
||||||
|
mkN2 : N -> Prep -> N2 = mmkN2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mmkN2 : N -> Prep -> N2 ;
|
||||||
|
regN2 : Str -> Gender -> N2 ;
|
||||||
|
|
||||||
|
|
||||||
|
mmkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ;
|
||||||
|
regN2 n g = mmkN2 (regGenN n g) (mkPrep "av") ;
|
||||||
|
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ;
|
||||||
|
|
||||||
|
mkPN = overload {
|
||||||
|
mkPN : Str -> PN = regPN ;
|
||||||
|
mkPN : Str -> Gender -> PN = regGenPN ;
|
||||||
|
mkPN : (jesus,jesu : Str) -> Gender -> PN = \jesus,jesu,g ->
|
||||||
|
{s = table {Nom => jesus ; Gen => jesu} ; g = g ; lock_PN = <>} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
regPN n = regGenPN n utrum ;
|
||||||
|
regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||||
|
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
||||||
|
makeNP x y n g =
|
||||||
|
{s = table {NPPoss _ => y ; _ => x} ; a = agrP3 g n ; p = P3 ;
|
||||||
|
lock_NP = <>} ;
|
||||||
|
|
||||||
|
mkA = overload {
|
||||||
|
mkA : (billig : Str) -> A = regA ;
|
||||||
|
mkA : (bred,brett : Str) -> A = mk2A ;
|
||||||
|
mkA : (tung,tyngre,tyngst : Str) -> A = irregA ;
|
||||||
|
mkA : (god,gott,goda,battre,bast : Str) -> A =
|
||||||
|
\liten,litet,lilla,mindre,minst ->
|
||||||
|
mk7A liten litet lilla lilla mindre minst (minst + "a") ;
|
||||||
|
mkA : (liten,litet,lilla,sma,mindre,minst,minsta : Str) -> A = mk7A
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
regA : Str -> A ;
|
||||||
|
mk2A : (bred,brett : Str) -> A ;
|
||||||
|
irregA : (tung,tyngre,tyngst : Str) -> A ;
|
||||||
|
mk7A : (liten,litet,lilla,sma,mindre,minst,minsta : Str) -> A ;
|
||||||
|
|
||||||
|
mk7A 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" ;
|
||||||
|
se + "dd" => se + "tt" ;
|
||||||
|
pla + "tt" => pla + "tt" ;
|
||||||
|
gla + "d" => gla + "tt" ;
|
||||||
|
_ => fin + "t"
|
||||||
|
}
|
||||||
|
in
|
||||||
|
mk3A fin fint (fin + "a") ;
|
||||||
|
irregA ung yngre yngst =
|
||||||
|
mk7A ung (ung + "t") (ung + "a") (ung + "a") yngre yngst (yngst+"a") ;
|
||||||
|
|
||||||
|
mk3A ljummen ljummet ljumma =
|
||||||
|
mk7A
|
||||||
|
ljummen ljummet ljumma ljumma
|
||||||
|
(ljumma + "re") (ljumma + "st") (ljumma + "ste") ;
|
||||||
|
mk2A vid vitt = case <vid,vitt> of {
|
||||||
|
<gal + "en", _ + "et"> => mk3A vid vitt (gal + "na") ;
|
||||||
|
_ => mk3A vid vitt (vid + "a")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
compoundA adj = {s = adj.s ; isComp = True ; lock_A = <>} ;
|
||||||
|
|
||||||
|
mkA2 a p = a ** {c2 = p.s ; lock_A2 = <>} ;
|
||||||
|
|
||||||
|
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||||
|
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||||
|
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||||
|
|
||||||
|
mkV = overload {
|
||||||
|
mkV : (stämmer : Str) -> V = regV ;
|
||||||
|
mkV : (dricka,drack,druckit : Str) -> V = irregV ;
|
||||||
|
mkV : (supa,super,sup,söp,supit,supen : Str) -> V = mk6V ;
|
||||||
|
mkV : V -> Str -> V = partV
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mk6V = \finna,finner,finn,fann,funnit,funnen ->
|
||||||
|
let
|
||||||
|
funn = ptPretForms funnen ;
|
||||||
|
funnet = funn ! Strong SgNeutr ! Nom ;
|
||||||
|
funna = funn ! Strong Plg ! Nom
|
||||||
|
in
|
||||||
|
mkVerb finna finner finn fann funnit funnen funnet funna **
|
||||||
|
{part = [] ; vtype=VAct ; lock_V = <>} ;
|
||||||
|
|
||||||
|
regV leker = case leker of {
|
||||||
|
lek + "a" => conj1 leker ; --- bw compat
|
||||||
|
lek + "ar" => conj1 (lek + "a") ;
|
||||||
|
lek + "er" => conj2 (lek + "a") ;
|
||||||
|
bo + "r" => conj3 bo ;
|
||||||
|
ret + "as" => depV (conj1 (ret + "a")) ;
|
||||||
|
n + ("os" | "ys" | "ås" | "ös") => depV (conj3 (init leker)) ;
|
||||||
|
ret + "s" => depV (conj2 (ret + "a")) ;
|
||||||
|
_ => conj3 leker
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mk2V leka lekte = case <leka,lekte> of {
|
||||||
|
<_, _ + "ade"> => conj1 leka ;
|
||||||
|
<_ + "a", _> => conj2 leka ;
|
||||||
|
_ => conj3 leka
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- school conjugations
|
||||||
|
|
||||||
|
conj1 : Str -> V = \tala ->
|
||||||
|
mk6V tala (tala + "r") tala (tala +"de") (tala +"t") (tala +"d") ;
|
||||||
|
|
||||||
|
conj2 : Str -> V = \leka ->
|
||||||
|
let lek = init leka in
|
||||||
|
case last lek of {
|
||||||
|
"l" | "m" | "n" | "v" | "g" =>
|
||||||
|
let gom = case <lek : Tok> of {
|
||||||
|
_ + "mm" => init lek ;
|
||||||
|
_ => lek
|
||||||
|
}
|
||||||
|
in mk6V leka (lek + "er") gom (gom +"de") (gom +"t") (gom +"d") ;
|
||||||
|
"r" =>
|
||||||
|
mk6V leka lek lek (lek +"de") (lek +"t") (lek +"d") ;
|
||||||
|
_ => case lek of {
|
||||||
|
_ + "nd" =>
|
||||||
|
mk6V leka (lek + "er") lek (lek +"e") (init lek +"t") lek ;
|
||||||
|
_ =>
|
||||||
|
mk6V leka (lek + "er") lek (lek +"te") (lek +"t") (lek +"t")
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conj3 : Str -> V = \bo ->
|
||||||
|
mk6V bo (bo + "r") bo (bo +"dde") (bo +"tt") (bo +"dd") ;
|
||||||
|
|
||||||
|
irregV = \sälja, sålde, sålt ->
|
||||||
|
let
|
||||||
|
säljer = case last sälja of {
|
||||||
|
"a" => conj2 sälja ;
|
||||||
|
_ => conj3 sälja
|
||||||
|
} ;
|
||||||
|
såld = case Predef.dp 2 sålt of {
|
||||||
|
"it" => Predef.tk 2 sålt + "en" ;
|
||||||
|
"tt" => Predef.tk 2 sålt + "dd" ;
|
||||||
|
_ => init sålt + "d"
|
||||||
|
}
|
||||||
|
in
|
||||||
|
mk6V sälja (säljer.s ! VF (VPres Act)) (säljer.s ! (VF (VImper Act))) sålde sålt såld
|
||||||
|
** {s1 = [] ; lock_V = <>} ;
|
||||||
|
|
||||||
|
partV v p = {s = v.s ; part = p ; vtype = v.vtype ; lock_V = <>} ;
|
||||||
|
depV v = {s = v.s ; part = v.part ; vtype = VPass ; lock_V = <>} ;
|
||||||
|
reflV v = {s = v.s ; part = v.part ; vtype = VRefl ; lock_V = <>} ;
|
||||||
|
|
||||||
|
mkV2 = overload {
|
||||||
|
mkV2 : (läser : Str) -> V2 = \v -> dirV2 (regV v) ;
|
||||||
|
mkV2 : V -> V2 = dirV2 ;
|
||||||
|
mkV2 : V -> Prep -> V2 = mmkV2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
mmkV2 v p = v ** {c2 = p.s ; lock_V2 = <>} ;
|
||||||
|
dirV2 v = mmkV2 v noPrep ;
|
||||||
|
|
||||||
|
mkV3 = overload {
|
||||||
|
mkV3 : Str -> V3 = \v -> dirdirV3 (regV v) ;
|
||||||
|
mkV3 : V -> V3 = dirdirV3 ;
|
||||||
|
mkV3 : V -> Prep -> V3 = dirV3 ;
|
||||||
|
mkV3 : V -> Prep -> Prep -> V3 = mmkV3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mmkV3 : V -> Prep -> Prep -> V3 ; -- tala, med, om
|
||||||
|
dirV3 : V -> Prep -> V3 ; -- ge, (acc),till
|
||||||
|
dirdirV3 : V -> V3 ; -- ge, (dat), (acc)
|
||||||
|
|
||||||
|
|
||||||
|
mmkV3 v p q = v ** {c2 = p.s ; c3 = q.s ; lock_V3 = <>} ;
|
||||||
|
dirV3 v p = mmkV3 v noPrep p ;
|
||||||
|
dirdirV3 v = dirV3 v noPrep ;
|
||||||
|
|
||||||
|
mkV0 v = v ** {lock_V0 = <>} ;
|
||||||
|
mkVS v = v ** {lock_VS = <>} ;
|
||||||
|
mkVV v = v ** {c2 = "att" ; lock_VV = <>} ;
|
||||||
|
mkVQ v = v ** {lock_VQ = <>} ;
|
||||||
|
|
||||||
|
mkVA v = v ** {lock_VA = <>} ;
|
||||||
|
mkV2A v p = mmkV2 v p ** {lock_V2A = <>} ;
|
||||||
|
|
||||||
|
V0 : Type = V ;
|
||||||
|
-- V2S, V2V, V2Q : Type = V2 ;
|
||||||
|
AS, A2S, AV : Type = A ;
|
||||||
|
A2V : Type = A2 ;
|
||||||
|
|
||||||
|
mkV2S v p = mmkV2 v p ** {lock_V2S = <>} ;
|
||||||
|
mkV2V v p t = mmkV2 v p ** {c3 = "att" ; lock_V2V = <>} ;
|
||||||
|
mkV2Q v p = mmkV2 v p ** {lock_V2Q = <>} ;
|
||||||
|
|
||||||
|
mkAS v = v ** {lock_A = <>} ;
|
||||||
|
mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||||
|
mkAV v = v ** {lock_A = <>} ;
|
||||||
|
mkA2V v p = mkA2 v p ** {lock_A = <>} ;
|
||||||
|
|
||||||
|
----------Obsolete
|
||||||
|
|
||||||
|
-- To form a noun phrase that can also be plural and have an irregular
|
||||||
|
-- genitive, you can use the worst-case function.
|
||||||
|
|
||||||
|
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
regGenPN : Str -> Gender -> PN ;
|
||||||
|
regPN : Str -> PN ; -- utrum
|
||||||
|
|
||||||
|
-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||||
|
|
||||||
|
nounPN : N -> PN ;
|
||||||
|
|
||||||
|
-- Sometimes just the positive forms are irregular.
|
||||||
|
|
||||||
|
mk3A : (galen,galet,galna : Str) -> A ;
|
||||||
|
|
||||||
|
mk6V : (supa,super,sup,söp,supit,supen : Str) -> V ;
|
||||||
|
regV : (talar : Str) -> V ;
|
||||||
|
mk2V : (leka,lekte : Str) -> V ;
|
||||||
|
irregV : (dricka, drack, druckit : Str) -> V ;
|
||||||
|
|
||||||
|
partV : V -> Str -> V ;
|
||||||
|
|
||||||
|
mmkV2 : V -> Prep -> V2 ;
|
||||||
|
|
||||||
|
dirV2 : V -> V2 ;
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
2
lib/resource-1.4/swedish/PhraseSwe.gf
Normal file
2
lib/resource-1.4/swedish/PhraseSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete PhraseSwe of Phrase = CatSwe ** PhraseScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
2
lib/resource-1.4/swedish/QuestionSwe.gf
Normal file
2
lib/resource-1.4/swedish/QuestionSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete QuestionSwe of Question = CatSwe ** QuestionScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
2
lib/resource-1.4/swedish/RelativeSwe.gf
Normal file
2
lib/resource-1.4/swedish/RelativeSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete RelativeSwe of Relative = CatSwe ** RelativeScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
3
lib/resource-1.4/swedish/ResSwe.gf
Normal file
3
lib/resource-1.4/swedish/ResSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
instance ResSwe of ResScand = DiffSwe ** open CommonScand, Prelude in {
|
||||||
|
} ;
|
||||||
|
|
||||||
2
lib/resource-1.4/swedish/SentenceSwe.gf
Normal file
2
lib/resource-1.4/swedish/SentenceSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete SentenceSwe of Sentence = CatSwe ** SentenceScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
121
lib/resource-1.4/swedish/StructuralSwe.gf
Normal file
121
lib/resource-1.4/swedish/StructuralSwe.gf
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
concrete StructuralSwe of Structural = CatSwe **
|
||||||
|
open MorphoSwe, ParadigmsSwe, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
above_Prep = ss "ovanför" ;
|
||||||
|
after_Prep = ss "efter" ;
|
||||||
|
by8agent_Prep = ss "av" ;
|
||||||
|
all_Predet = {s = gennumForms "all" "allt" "alla"} ;
|
||||||
|
almost_AdA, almost_AdN = ss "nästan" ;
|
||||||
|
although_Subj = ss "fast" ;
|
||||||
|
always_AdV = ss "alltid" ;
|
||||||
|
and_Conj = {s1 = [] ; s2 = "och" ; n = Pl} ;
|
||||||
|
because_Subj = ss "eftersom" ;
|
||||||
|
before_Prep = ss "före" ;
|
||||||
|
behind_Prep = ss "bakom" ;
|
||||||
|
between_Prep = ss "mellan" ;
|
||||||
|
both7and_DConj = sd2 "både" "och" ** {n = Pl} ;
|
||||||
|
but_PConj = ss "men" ;
|
||||||
|
by8means_Prep = ss "med" ;
|
||||||
|
can8know_VV, can_VV =
|
||||||
|
mkV "kunna" "kan" "kunn" "kunde" "kunnat" "kunnen" **
|
||||||
|
{c2 = [] ; lock_VV = <>} ;
|
||||||
|
during_Prep = ss "under" ;
|
||||||
|
either7or_DConj = sd2 "antingen" "eller" ** {n = Sg} ;
|
||||||
|
everybody_NP = regNP "alla" "allas" Plg ;
|
||||||
|
every_Det = {s = \\_,_ => "varje" ; n = Sg ; det = DIndef} ;
|
||||||
|
everything_NP = regNP "allting" "alltings" SgNeutr ;
|
||||||
|
everywhere_Adv = ss "överallt" ;
|
||||||
|
few_Det = {s = \\_,_ => "få" ; n = Pl ; det = DDef Indef} ;
|
||||||
|
--- first_Ord = {s = "första" ; isDet = True} ;
|
||||||
|
for_Prep = ss "för" ;
|
||||||
|
from_Prep = ss "från" ;
|
||||||
|
he_Pron = MorphoSwe.mkNP "han" "honom" "hans" "hans" "hans" SgUtr P3 ;
|
||||||
|
here_Adv = ss "här" ;
|
||||||
|
here7to_Adv = ss "hit" ;
|
||||||
|
here7from_Adv = ss "härifrån" ;
|
||||||
|
how_IAdv = ss "hur" ;
|
||||||
|
how8many_IDet = {s = \\_ => ["hur många"] ; n = Pl ; det = DDef Indef} ;
|
||||||
|
if_Subj = ss "om" ;
|
||||||
|
in8front_Prep = ss "framför" ;
|
||||||
|
i_Pron = MorphoSwe.mkNP "jag" "mig" "min" "mitt" "mina" SgUtr P1 ;
|
||||||
|
in_Prep = ss "i" ;
|
||||||
|
it_Pron = MorphoSwe.regNP "det" "dess" SgNeutr ;
|
||||||
|
less_CAdv = ss "mindre" ;
|
||||||
|
many_Det = {s = \\_,_ => "många" ; n = Pl ; det = DDef Indef} ;
|
||||||
|
more_CAdv = ss "mer" ;
|
||||||
|
most_Predet = {s = gennumForms ["den mesta"] ["det mesta"] ["de flesta"]} ;
|
||||||
|
much_Det = {s = \\_,_ => "mycket" ; n = Pl ; det = DDef Indef} ;
|
||||||
|
must_VV =
|
||||||
|
mkV "få" "måste" "få" "fick" "måst" "måst" ** {c2 = [] ; lock_VV = <>} ;
|
||||||
|
no_Utt = ss ["nej"] ;
|
||||||
|
on_Prep = ss "på" ;
|
||||||
|
--- one_Quant = {s = \\_ => genderForms ["en"] ["ett"] ; n = Sg ; det = DIndef} ;
|
||||||
|
only_Predet = {s = \\_ => "bara"} ;
|
||||||
|
or_Conj = {s1 = [] ; s2 = "eller" ; n = Sg} ;
|
||||||
|
otherwise_PConj = ss "annars" ;
|
||||||
|
part_Prep = ss "av" ;
|
||||||
|
please_Voc = ss "tack" ; ---
|
||||||
|
possess_Prep = ss "av" ;
|
||||||
|
quite_Adv = ss "ganska" ;
|
||||||
|
she_Pron = MorphoSwe.mkNP "hon" "henne" "hennes" "hennes" "hennes" SgUtr P3 ;
|
||||||
|
so_AdA = ss "så" ;
|
||||||
|
someSg_Det = {s = \\_ => genderForms "någon" "något" ; n = Sg ; det = DIndef} ;
|
||||||
|
somePl_Det = {s = \\_,_ => "några" ; n = Pl ; det = DIndef} ;
|
||||||
|
somebody_NP = regNP "någon" "någons" SgUtr ;
|
||||||
|
something_NP = regNP "något" "någots" SgNeutr ;
|
||||||
|
somewhere_Adv = ss "någonstans" ;
|
||||||
|
that_Quant =
|
||||||
|
{s = table {
|
||||||
|
Sg => \\_ => genderForms ["den där"] ["det där"] ;
|
||||||
|
Pl => \\_,_ => ["de där"]
|
||||||
|
} ;
|
||||||
|
det = DDef Def
|
||||||
|
} ;
|
||||||
|
there_Adv = ss "där" ;
|
||||||
|
there7to_Adv = ss "dit" ;
|
||||||
|
there7from_Adv = ss "därifrån" ;
|
||||||
|
therefore_PConj = ss "därför" ;
|
||||||
|
they_Pron = MorphoSwe.mkNP "de" "dem" "deras" "deras" "deras" Plg P1 ;
|
||||||
|
this_Quant =
|
||||||
|
{s = table {
|
||||||
|
Sg => \\_ => genderForms ["den här"] ["det här"] ;
|
||||||
|
Pl => \\_,_ => ["de här"]
|
||||||
|
} ;
|
||||||
|
det = DDef Def
|
||||||
|
} ;
|
||||||
|
through_Prep = ss "genom" ;
|
||||||
|
too_AdA = ss "för" ;
|
||||||
|
to_Prep = ss "till" ;
|
||||||
|
under_Prep = ss "under" ;
|
||||||
|
very_AdA = ss "mycket" ;
|
||||||
|
want_VV =
|
||||||
|
mkV "vilja" "vill" "vilj" "ville" "velat" "velad" **
|
||||||
|
{c2 = [] ; lock_VV = <>} ;
|
||||||
|
we_Pron = MorphoSwe.mkNP "vi" "oss" "vår" "vårt" "våra" Plg P1 ;
|
||||||
|
whatSg_IP = {s = \\_ => "vad" ; gn = SgUtr} ; ---- infl
|
||||||
|
whatPl_IP = {s = \\_ => "vad" ; gn = Plg} ; ---- infl
|
||||||
|
when_IAdv = ss "när" ;
|
||||||
|
when_Subj = ss "när" ;
|
||||||
|
where_IAdv = ss "var" ;
|
||||||
|
-- whichPl_IDet = {s = \\_ => "vilka" ; n = Pl ; det = DIndef} ;
|
||||||
|
-- whichSg_IDet = {s = genderForms "vilken" "vilket" ; n = Sg ; det = DIndef} ;
|
||||||
|
whoSg_IP = {s = vem.s ; gn = SgUtr} ;
|
||||||
|
whoPl_IP = {s = \\_ => "vilka" ; gn = Plg} ;
|
||||||
|
why_IAdv = ss "varför" ;
|
||||||
|
without_Prep = ss "utan" ;
|
||||||
|
with_Prep = ss "med" ;
|
||||||
|
yes_Utt = ss ["ja"] ;
|
||||||
|
youSg_Pron = MorphoSwe.mkNP "du" "dig" "din" "ditt" "dina" SgUtr P2 ;
|
||||||
|
youPl_Pron = MorphoSwe.mkNP "ni" "er" "er" "ert" "era" Plg P2 ;
|
||||||
|
youPol_Pron = MorphoSwe.mkNP "ni" "er" "er" "ert" "era" SgUtr P2 ; --- wrong in refl
|
||||||
|
|
||||||
|
-- Auxiliaries that are used repeatedly.
|
||||||
|
|
||||||
|
oper
|
||||||
|
vem = MorphoSwe.mkNP "vem" "vem" "vems" "vems" "vems" SgUtr P3 ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
7
lib/resource-1.4/swedish/Swedish.gf
Normal file
7
lib/resource-1.4/swedish/Swedish.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||||
|
|
||||||
|
concrete Swedish of SwedishAbs =
|
||||||
|
LangSwe,
|
||||||
|
IrregSwe,
|
||||||
|
ExtraSwe
|
||||||
|
** {} ;
|
||||||
5
lib/resource-1.4/swedish/SwedishAbs.gf
Normal file
5
lib/resource-1.4/swedish/SwedishAbs.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
abstract SwedishAbs =
|
||||||
|
Lang,
|
||||||
|
IrregSweAbs,
|
||||||
|
ExtraSweAbs
|
||||||
|
** {} ;
|
||||||
2
lib/resource-1.4/swedish/VerbSwe.gf
Normal file
2
lib/resource-1.4/swedish/VerbSwe.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete VerbSwe of Verb = CatSwe ** VerbScand with
|
||||||
|
(ResScand = ResSwe) ;
|
||||||
Reference in New Issue
Block a user