mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 18:52:50 -06:00
moved stuff from MorphoSwe to ParadigmsSwe (to be continued)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
resource MorphoSwe = ResScand, DiffSwe ** open Prelude, (Predef=Predef) in {
|
||||
|
||||
|
||||
-- Nouns
|
||||
|
||||
oper
|
||||
@@ -24,59 +23,6 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
reg2Noun : Str -> Str -> Noun = \bil,bilar ->
|
||||
let
|
||||
l = last bil ;
|
||||
b = Predef.tk 2 bil ;
|
||||
ar = Predef.dp 2 bilar ;
|
||||
bile = Predef.tk 2 bilar
|
||||
in
|
||||
case ar of {
|
||||
"or" => case l of {
|
||||
"a" => decl1Noun bil ;
|
||||
"r" => decl5Noun bil ;
|
||||
"o" => mkNoun bil (bil + "n") bilar (bilar + "na") ;
|
||||
_ => mkNoun bil (bil + "en") bilar (bilar + "na")
|
||||
} ;
|
||||
"ar" => ifTok Noun bil bilar
|
||||
(decl5Noun bil)
|
||||
(ifTok Noun bile bil
|
||||
(decl2Noun bil)
|
||||
(case l of {
|
||||
"e" => decl2Noun bil ; -- pojke-pojkar
|
||||
_ => mkNoun bil (bile + "en") bilar (bilar + "na") -- mun-munnar
|
||||
}
|
||||
)
|
||||
) ;
|
||||
"er" => case l of {
|
||||
"e" => mkNoun bil (bil + "n") (bil +"r") (bil + "rna") ;
|
||||
"y" | "å" | "é" => decl3Noun bil ;
|
||||
_ => mkNoun bil (bil + "en") bilar (bilar + "na")
|
||||
} ;
|
||||
"en" => ifTok Noun bil bilar (decl5Noun bil) (decl4Noun bil) ; -- ben-ben
|
||||
_ => ifTok Noun bil bilar (
|
||||
case Predef.dp 3 bil of {
|
||||
"are" => let kikar = init bil in
|
||||
mkNoun bil (kikar + "en") bil (kikar + "na") ;
|
||||
_ => decl5Noun bil
|
||||
}
|
||||
)
|
||||
(decl5Noun bil) --- rest case with lots of garbage
|
||||
} ;
|
||||
|
||||
--- this is a very rough heuristic and misses "er".
|
||||
|
||||
regNoun : Str -> Gender -> Noun = \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
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
-- School declensions.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user