mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Norwegian
This commit is contained in:
@@ -42,6 +42,8 @@ When will it be ready? Hopefully around February 2005.
|
||||
|
||||
---------- later history and status:
|
||||
|
||||
26/1 Norwegian added.
|
||||
|
||||
24/1 French complete, as well as the Romance parametrized modules.
|
||||
|
||||
20/1 Main difficulties of French and Romance implemented. Also
|
||||
|
||||
@@ -49,4 +49,5 @@ The documentation of the individual modules:
|
||||
- [ParadigmsEng gfdoc/ParadigmsEng.html]: English lexical paradigms
|
||||
- [ParadigmsFre gfdoc/ParadigmsFre.html]: French lexical paradigms
|
||||
- [ParadigmsGer gfdoc/ParadigmsGer.html]: German lexical paradigms
|
||||
- [ParadigmsNor gfdoc/ParadigmsNor.html]: Norwegian lexical paradigms
|
||||
- [ParadigmsSwe gfdoc/ParadigmsSwe.html]: Swedish lexical paradigms
|
||||
|
||||
2
lib/resource-1.0/norwegian/AdjectiveNor.gf
Normal file
2
lib/resource-1.0/norwegian/AdjectiveNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete AdjectiveNor of Adjective = CatNor ** AdjectiveScand with
|
||||
(ResScand = ResNor) ;
|
||||
2
lib/resource-1.0/norwegian/AdverbNor.gf
Normal file
2
lib/resource-1.0/norwegian/AdverbNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete AdverbNor of Adverb = CatNor ** AdverbScand with
|
||||
(ResScand = ResNor) ;
|
||||
2
lib/resource-1.0/norwegian/CatNor.gf
Normal file
2
lib/resource-1.0/norwegian/CatNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete CatNor of Cat = TenseX ** CatScand with
|
||||
(ResScand = ResNor) ;
|
||||
2
lib/resource-1.0/norwegian/ConjunctionNor.gf
Normal file
2
lib/resource-1.0/norwegian/ConjunctionNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete ConjunctionNor of Conjunction = CatNor ** ConjunctionScand with
|
||||
(ResScand = ResNor) ;
|
||||
74
lib/resource-1.0/norwegian/DiffNor.gf
Normal file
74
lib/resource-1.0/norwegian/DiffNor.gf
Normal file
@@ -0,0 +1,74 @@
|
||||
instance DiffNor of DiffScand = open CommonScand, Prelude in {
|
||||
|
||||
-- Parameters.
|
||||
|
||||
param
|
||||
Gender = Utr Sex | Neutr ;
|
||||
Sex = Masc | Fem ;
|
||||
|
||||
oper
|
||||
utrum = Utr Masc ;
|
||||
neutrum = Neutr ;
|
||||
|
||||
gennum : Gender -> Number -> GenNum = \g,n ->
|
||||
case <g,n> of {
|
||||
<Utr _,Sg> => SgUtr ;
|
||||
<Neutr,Sg> => SgNeutr ;
|
||||
_ => Plg
|
||||
} ;
|
||||
|
||||
detDef : Species = Indef ;
|
||||
|
||||
-- Strings.
|
||||
|
||||
conjThat = "at" ;
|
||||
conjThan = "enn" ;
|
||||
conjAnd = "og" ;
|
||||
infMark = "å" ;
|
||||
|
||||
subjIf = "hvis" ;
|
||||
|
||||
artIndef : Gender => Str = table {
|
||||
Utr Masc => "en" ;
|
||||
Utr Fem => "ei" ;
|
||||
Neutr => "et"
|
||||
} ;
|
||||
|
||||
verbHave =
|
||||
mkVerb "ha" "har" "ha" "hadde" "hatt" nonExist nonExist nonExist ;
|
||||
verbBe =
|
||||
mkVerb "være" "er" "var" "var" "vært" "væren" "været" "værne" ;
|
||||
verbBecome =
|
||||
mkVerb "bli" "blir" "bli" "ble" "blitt" "bliven" "blivet" "blivne" ;
|
||||
|
||||
auxFut = "vil" ; -- "skal" in ExtNor
|
||||
auxCond = "ville" ;
|
||||
|
||||
negation : Polarity => Str = table {
|
||||
Pos => [] ;
|
||||
Neg => "ikke"
|
||||
} ;
|
||||
|
||||
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 => "hvis" ;
|
||||
RPrep => gennumForms "hvilken" "hvilket" "hvilke" ! gn
|
||||
} ;
|
||||
|
||||
pronSuch = gennumForms "sådan" "sådant" "sådanne" ;
|
||||
|
||||
reflPron : Agr -> Str = \a -> case a of {
|
||||
{gn = Plg ; p = P1} => "oss" ;
|
||||
{gn = Plg ; p = P2} => "jer" ;
|
||||
{p = P1} => "meg" ;
|
||||
{p = P2} => "deg" ;
|
||||
{p = P3} => "seg"
|
||||
} ;
|
||||
|
||||
}
|
||||
72
lib/resource-1.0/norwegian/IrregNor.gf
Normal file
72
lib/resource-1.0/norwegian/IrregNor.gf
Normal file
@@ -0,0 +1,72 @@
|
||||
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||
|
||||
-- see: http://frodo.bruderhof.com/norskklassen/commonverbs.htm
|
||||
|
||||
concrete IrregNor of IrregNorAbs = CatNor ** open ParadigmsNor in {
|
||||
|
||||
flags optimize=values ;
|
||||
|
||||
lin be_V = irregV "be" "bad" "bedt" ;
|
||||
lin bite_V = irregV "bite" (variants {"bet" ; "beit"}) "bitt" ;
|
||||
lin bli_V = irregV "bli" (variants {"ble" ; "blei"}) "blitt" ;
|
||||
lin brenne_V = irregV "brenne" (variants {"brant" ; "brente"}) "brent" ;
|
||||
lin bringe_V = irregV "bringe" "brakte" "brakt" ;
|
||||
lin burde_V = irregV "burde" "burde" "burdet" ;
|
||||
lin bære_V = irregV "bære" "bar" "båret" ;
|
||||
lin dra_V = mkV "dra" "drar" "dras" "drog" (variants {"dradd" ; "dratt"}) "dra" ;
|
||||
lin drikke_V = irregV "drikke" "drakk" "drukket" ;
|
||||
lin drive_V = irregV "drive" (variants {"drev" ; "dreiv"}) "drevet" ;
|
||||
lin dø_V = irregV "dø" (variants {"dødde" ; "døde"}) "dødd" ;
|
||||
lin eie_V = irregV "eie" (variants {"eide" ; "åtte"}) (variants {"eid" ; "ått"}) ;
|
||||
lin falle_V = irregV "falle" "falt" "falt" ;
|
||||
lin finne_V = irregV "finne" "fant" "funnet" ;
|
||||
lin fly_V = irregV "fly" (variants {"fløy" ; "flaug"}) (variants {"fløyet";"flydd"}) ;
|
||||
lin flyte_V = irregV "flyte" (variants {"fløte" ; "flaut"}) "flytt" ;
|
||||
lin foretrekke_V = irregV "foretrekke" "foretrakk" "foretrukket" ;
|
||||
lin forlate_V = irregV "forlate" "forlot" "forlatt" ;
|
||||
lin forstå_V = irregV "forstå" "forstod" "forstått" ;
|
||||
lin fortelle_V = irregV "fortelle" "fortalte" "fortalt" ;
|
||||
lin fryse_V = irregV "fryse" "frøs" "frosset" ;
|
||||
lin få_V = irregV "få" "fikk" "fått" ;
|
||||
lin gi_V = irregV "gi" "gav" "gitt" ;
|
||||
lin gjelde_V = irregV "gjelde" (variants {"gjaldt" ; "galdt"}) "gjeldt" ;
|
||||
lin gjøre_V = irregV "gjøre" "gjorde" "gjort" ;
|
||||
lin gni_V = irregV "gni" (variants {"gned" ; "gnei" ; "gnidde"}) "gnidd" ;
|
||||
lin gå_V = irregV "gå" "gikk" "gått" ;
|
||||
lin ha_V = irregV "ha" "hadde" "hatt" ;
|
||||
lin hente_V = irregV "hente" "hentet" "hendt" ;
|
||||
lin hete_V = irregV "hete" (variants {"het" ; "hette"}) "hett" ;
|
||||
lin hjelpe_V = irregV "hjelpe" "hjalp" "hjulpet" ;
|
||||
lin holde_V = irregV "holde" "holdt" "holdt" ;
|
||||
lin komme_V = irregV "komme" "kom" "kommet" ;
|
||||
lin kunne_V = irregV "kunne" "kunne" "kunnet" ;
|
||||
lin la_V = irregV "la" "lot" "latt" ;
|
||||
lin legge_V = irregV "legge" "la" "lagt" ;
|
||||
lin ligge_V = irregV "ligge" "lå" "ligget" ;
|
||||
lin løpe_V = irregV "løpe" "løp" (variants {"løpt" ; "løpet"}) ;
|
||||
lin måtte_V = irregV "måtte" "måtte" "måttet" ;
|
||||
lin renne_V = irregV "renne" "rant" "rent" ;
|
||||
lin se_V = irregV "se" "så" "sett" ;
|
||||
lin selge_V = irregV "selge" "solgte" "solgt" ;
|
||||
lin sette_V = irregV "sette" "satte" "satt" ;
|
||||
lin si_V = irregV "si" "sa" "sagt" ;
|
||||
lin sitte_V = irregV "sitte" "satt" "sittet" ;
|
||||
lin skjære_V = irregV "skjære" "skar" "skåret" ;
|
||||
lin skrive_V = irregV "skrive" "skrev" "skrevet" ;
|
||||
lin skulle_V = irregV "skulle" "skulle" "skullet" ;
|
||||
lin slå_V = irregV "slå" "slo" "slått" ;
|
||||
lin slåss_V = mkV "slåss" "slåss" "slåss" "sloss" "slåss" "slåss" ;
|
||||
lin sove_V = irregV "sove" "sov" "sovet" ;
|
||||
lin springe_V = irregV "springe" "sprang" "sprunget" ;
|
||||
lin spørre_V = irregV "spørre" "spurte" "spurt" ;
|
||||
lin stikke_V = irregV "stikke" "stakk" "stukket" ;
|
||||
lin stå_V = irregV "stå" "stod" "stått" ;
|
||||
lin suge_V = irregV "suge" (variants {"sugde" ; "saug"}) "sugd" ;
|
||||
lin synes_V = irregV "synes" "syntes" (variants {"synes" ; "syns"}) ;
|
||||
lin synge_V = irregV "synge" "sang" "sunget" ;
|
||||
lin ta_V = irregV "ta" "tok" "tatt" ;
|
||||
lin treffe_V = irregV "treffe" "traff" "truffet" ;
|
||||
lin trives_V = irregV "trives" "trivdes" (variants {"trives" ; "trivs"}) ;
|
||||
lin ville_V = irregV "ville" "ville" "villet" ;
|
||||
lin vite_V = mkV "vite" "vet" "vetes" "visste" "visst" "vit" ;
|
||||
}
|
||||
65
lib/resource-1.0/norwegian/IrregNorAbs.gf
Normal file
65
lib/resource-1.0/norwegian/IrregNorAbs.gf
Normal file
@@ -0,0 +1,65 @@
|
||||
abstract IrregNorAbs = Cat ** {
|
||||
fun be_V : V ;
|
||||
fun bite_V : V ;
|
||||
fun bli_V : V ;
|
||||
fun brenne_V : V ;
|
||||
fun bringe_V : V ;
|
||||
fun burde_V : V ;
|
||||
fun bćre_V : V ;
|
||||
fun dra_V : V ;
|
||||
fun drikke_V : V ;
|
||||
fun drive_V : V ;
|
||||
fun dř_V : V ;
|
||||
fun eie_V : V ;
|
||||
fun falle_V : V ;
|
||||
fun finne_V : V ;
|
||||
fun fly_V : V ;
|
||||
fun flyte_V : V ;
|
||||
fun foretrekke_V : V ;
|
||||
fun forlate_V : V ;
|
||||
fun forstĺ_V : V ;
|
||||
fun fortelle_V : V ;
|
||||
fun fryse_V : V ;
|
||||
fun fĺ_V : V ;
|
||||
fun gi_V : V ;
|
||||
fun gjelde_V : V ;
|
||||
fun gjřre_V : V ;
|
||||
fun gni_V : V ;
|
||||
fun gĺ_V : V ;
|
||||
fun ha_V : V ;
|
||||
fun hente_V : V ;
|
||||
fun hete_V : V ;
|
||||
fun hjelpe_V : V ;
|
||||
fun holde_V : V ;
|
||||
fun komme_V : V ;
|
||||
fun kunne_V : V ;
|
||||
fun la_V : V ;
|
||||
fun legge_V : V ;
|
||||
fun ligge_V : V ;
|
||||
fun lřpe_V : V ;
|
||||
fun mĺtte_V : V ;
|
||||
fun renne_V : V ;
|
||||
fun se_V : V ;
|
||||
fun selge_V : V ;
|
||||
fun sette_V : V ;
|
||||
fun si_V : V ;
|
||||
fun sitte_V : V ;
|
||||
fun skjćre_V : V ;
|
||||
fun skrive_V : V ;
|
||||
fun skulle_V : V ;
|
||||
fun slĺ_V : V ;
|
||||
fun slĺss_V : V ;
|
||||
fun sove_V : V ;
|
||||
fun springe_V : V ;
|
||||
fun spřrre_V : V ;
|
||||
fun stikke_V : V ;
|
||||
fun stĺ_V : V ;
|
||||
fun suge_V : V ;
|
||||
fun synes_V : V ;
|
||||
fun synge_V : V ;
|
||||
fun ta_V : V ;
|
||||
fun treffe_V : V ;
|
||||
fun trives_V : V ;
|
||||
fun ville_V : V ;
|
||||
fun vite_V : V ;
|
||||
}
|
||||
20
lib/resource-1.0/norwegian/LangNor.gf
Normal file
20
lib/resource-1.0/norwegian/LangNor.gf
Normal file
@@ -0,0 +1,20 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||
|
||||
concrete LangNor of Lang =
|
||||
NounNor,
|
||||
VerbNor,
|
||||
AdjectiveNor,
|
||||
AdverbNor,
|
||||
NumeralNor,
|
||||
SentenceNor,
|
||||
QuestionNor,
|
||||
RelativeNor,
|
||||
ConjunctionNor,
|
||||
PhraseNor,
|
||||
StructuralNor,
|
||||
LexiconNor
|
||||
** {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
} ;
|
||||
237
lib/resource-1.0/norwegian/LexiconNor.gf
Normal file
237
lib/resource-1.0/norwegian/LexiconNor.gf
Normal file
@@ -0,0 +1,237 @@
|
||||
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||
|
||||
concrete LexiconNor of Lexicon = CatNor ** open ParadigmsNor, IrregNor in {
|
||||
|
||||
flags startcat=Phr ; lexer=textlit ; unlexer=text ;
|
||||
optimize=values ;
|
||||
|
||||
lin
|
||||
airplane_N = mk2N "fly" "flyet" ;
|
||||
answer_V2S = mkV2S (regV "svare") "til" ;
|
||||
apartment_N = mk2N "leilighet" "leiligheten" ;
|
||||
apple_N = mk2N "eple" "eplet" ;
|
||||
art_N = mk2N "kunst" "kunsten" ;
|
||||
ask_V2Q = mkV2Q spørre_V [] ;
|
||||
baby_N = mk2N "baby" "babyen" ;
|
||||
bad_A = regADeg "dårlig" ; ----
|
||||
bank_N = mk2N "bank" "banken" ;
|
||||
beautiful_A = mk3ADeg "vakker" "vakkert" "vakra" ;
|
||||
become_VA = mkVA bli_V ;
|
||||
beer_N = regN "øl" neutrum ;
|
||||
beg_V2V = mkV2V be_V [] "att" ;
|
||||
big_A = irregADeg "stor" "større" "størst";
|
||||
bike_N = mkN "sykkel" "sykkelen" "sykler" "syklene" ;
|
||||
bird_N = mk2N "fugl" "fuglen" ;
|
||||
black_A = mk2ADeg "svart" "svart" ;
|
||||
blue_A = mk2ADeg "blå" "blått";
|
||||
boat_N = regN "båt" masculine ;
|
||||
book_N = mkN "bok" "boka" "bøker" "bøkene" ;
|
||||
boot_N = mkN "støvel" "støvelen" "støvler" "støvlene" ;
|
||||
boss_N = mk2N "sjef" "sjefen" ;
|
||||
boy_N = regN "gutt" masculine ;
|
||||
bread_N = regN "brød" neutrum ;
|
||||
break_V2 = dirV2 (mk2V "knuse" "knuste") ;
|
||||
broad_A = regADeg "bred" ;
|
||||
brother_N2 = mkN2 ( (mkN "bror" "broren" "brødre" "brødrene")) "til" ;
|
||||
brown_A = regADeg "brun" ;
|
||||
butter_N = regN "smør" neutrum ;
|
||||
buy_V2 = dirV2 (mk2V "kjøpe" "kjøpte") ;
|
||||
camera_N = mk2N "kamera" "kameraen" ; ----
|
||||
cap_N = mk2N "lue" "lua" ;
|
||||
car_N = regN "bil" masculine ;
|
||||
carpet_N = regN "matte" feminine ;
|
||||
cat_N = mk2N "katt" "katten" ;
|
||||
ceiling_N = regN "tak" neutrum ;
|
||||
chair_N = regN "stol" masculine ;
|
||||
cheese_N = regN "ost" masculine ;
|
||||
child_N = regN "barn" neutrum ;
|
||||
church_N = regN "kirke" feminine ;
|
||||
city_N = mk2N "by" "byen" ;
|
||||
clean_A = regADeg "rein" ;
|
||||
clever_A = regADeg "klok" ;
|
||||
close_V2 = dirV2 (mk2V "lukke" "lukket") ;
|
||||
coat_N = regN "frakk" masculine ;
|
||||
cold_A = regADeg "kald" ;
|
||||
come_V = komme_V ;
|
||||
computer_N = mk2N "datamaskin" "datamaskinen" ;
|
||||
country_N = mk2N "land" "landet" ;
|
||||
cousin_N = mk2N "fetter" "fetteren" ; ----
|
||||
cow_N = mkN "ku" "kua" "kyr" "kyrne" ; ----
|
||||
die_V = dø_V ;
|
||||
dirty_A = mk3ADeg "skitten" "skittent" "skitne" ; ----
|
||||
distance_N3 = mkN3 (regN "avstand" masculine) "fra" "til" ;
|
||||
doctor_N = mk2N "lege" "legen" ;
|
||||
dog_N = regN "hund" masculine ;
|
||||
door_N = regN "dør" feminine ;
|
||||
drink_V2 = dirV2 drikke_V ;
|
||||
easy_A2V = mkA2V (regA "grei") "før" ;
|
||||
eat_V2 = dirV2 (mk2V "spise" "spiste") ;
|
||||
empty_A = mkADeg "tom" "tomt" "tomme" "tommere" "tommest" ;
|
||||
enemy_N = regN "fiende" masculine ;
|
||||
factory_N = mk2N "fabrikk" "fabrikken" ;
|
||||
father_N2 = mkN2 ( (mkN "far" "faren" "fedre" "fedrene")) "til" ;
|
||||
fear_VS = mkVS (regV "frykte") ;
|
||||
find_V2 = dirV2 (irregV "finne" "fann" "funnet") ;
|
||||
fish_N = mk2N "fisk" "fisken" ;
|
||||
floor_N = regN "golv" neutrum ;
|
||||
forget_V2 = dirV2 (mkV "glemme" "glemmer" "glemmes" "glemte" "glemt" "glem") ;
|
||||
fridge_N = regN "kjøleskap" neutrum ;
|
||||
friend_N = mkN "venn" "vennen" "venner" "vennene" ;
|
||||
fruit_N = mk2N "frukt" "frukten" ;
|
||||
fun_AV = mkAV (mkA "morsom" "morsomt" "morsomme") ;
|
||||
garden_N = regN "hage" masculine ;
|
||||
girl_N = regN "jente" feminine ;
|
||||
glove_N = regN "hanske" masculine ;
|
||||
gold_N = regN "gull" neutrum ;
|
||||
good_A = mkADeg "god" "godt" "gode" "bedre" "best" ;
|
||||
go_V = gå_V ;
|
||||
green_A = mk2ADeg "grønn" "grønt" ;
|
||||
harbour_N = regN "havn" feminine;
|
||||
hate_V2 = dirV2 (regV "hate") ;
|
||||
hat_N = regN "hatt" masculine ;
|
||||
have_V2 = dirV2 ha_V ;
|
||||
hear_V2 = dirV2 (mk2V "høre" "hørte") ;
|
||||
hill_N = regN "haug" masculine ;
|
||||
hope_VS = mkVS (regV "håpe") ;
|
||||
horse_N = regN "hest" masculine ;
|
||||
hot_A = regADeg "heit" ;
|
||||
house_N = regN "hus" neutrum ;
|
||||
important_A = regADeg "viktig" ;
|
||||
industry_N = mk2N "industri" "industrien" ;
|
||||
iron_N = regN "jern" neutrum ;
|
||||
king_N = regN "konge" masculine ;
|
||||
know_V2 = dirV2 vite_V ;
|
||||
lake_N = regN "vann" neutrum ;
|
||||
lamp_N = regN "lampe" feminine ;
|
||||
learn_V2 = dirV2 (mk2V "lære" "lærte") ;
|
||||
leather_N = regN "lær" neutrum ;
|
||||
leave_V2 = dirV2 forlate_V ;
|
||||
like_V2 = dirV2 (mk2V "like" "likte") ;
|
||||
listen_V2 = dirV2 (regV "lytte") ;
|
||||
live_V = mk2V "leve" "levde" ;
|
||||
long_A = irregADeg "lang" "lengre" "lengst" ;
|
||||
lose_V2 = dirV2 (mk2V "tape" "tapte") ;
|
||||
love_N = regN "kjærlighet" masculine ;
|
||||
love_V2 = dirV2 (regV "elske") ;
|
||||
man_N = (mkN "mann" "mannen" "menn" "mennen") ;
|
||||
married_A2 = mkA2 (mk2A "gift" "gift") "med" ;
|
||||
meat_N = regN "kjøtt" neutrum ;
|
||||
milk_N = regN "melk" masculine ;
|
||||
moon_N = regN "måne" masculine ;
|
||||
mother_N2 = mkN2 (mkN "mor" "moren" "mødre" "mødrene") "til" ; ---- fem
|
||||
mountain_N = regN "berg" neutrum ;
|
||||
music_N = mk2N "musikk" "musikken" ;
|
||||
narrow_A = regADeg "smal" ;
|
||||
new_A = mkADeg "ny" "nytt" "nye" "nyere" "nyest" ;
|
||||
newspaper_N = regN "avis" feminine ;
|
||||
oil_N = regN "olje" masculine ;
|
||||
old_A = mkADeg "gammel" "gammelt" "gamle" "eldre" "eldst" ;
|
||||
open_V2 = dirV2 (regV "åpne") ;
|
||||
paint_V2A = mkV2A (regV "male") [] ;
|
||||
paper_N = regN "papir" neutrum ; ----
|
||||
paris_PN = regPN "Paris" neutrum ;
|
||||
peace_N = regN "fred" masculine ;
|
||||
pen_N = regN "penn" masculine ;
|
||||
planet_N = mk2N "planet" "planeten" ;
|
||||
plastic_N = mk2N "plast" "plasten" ;
|
||||
play_V2 = dirV2 (mk2V "spille" "spilte") ;
|
||||
policeman_N = mk2N "politi" "politien" ;
|
||||
priest_N = mk2N "prest" "presten" ;
|
||||
probable_AS = mkAS (regA "sannsynlig") ;
|
||||
queen_N = regN "dronning" feminine ;
|
||||
radio_N = regN "radio" masculine ;
|
||||
rain_V0 = mkV0 (regV "regne") ;
|
||||
read_V2 = dirV2 (mk2V "lese" "leste") ;
|
||||
red_A = regADeg "rød" ;
|
||||
religion_N = mk2N "religion" "religionen" ;
|
||||
restaurant_N = mk2N "restaurant" "restauranten" ;
|
||||
river_N = mk2N "elv" "elva" ;
|
||||
rock_N = regN "stein" masculine ;
|
||||
roof_N = regN "tak" neutrum ;
|
||||
rubber_N = mk2N "gummi" "gummien" ;
|
||||
run_V = springe_V ;
|
||||
say_VS = mkVS si_V ;
|
||||
school_N = regN "skole" feminine;
|
||||
science_N = mk2N "vitenskap" "vitenskapen" ;
|
||||
sea_N = mk2N "sjø" "sjøen" ;
|
||||
seek_V2 = mkV2 (mk2V "lete" "lette") "etter" ;
|
||||
see_V2 = dirV2 se_V ;
|
||||
sell_V3 = dirV3 selge_V "til" ;
|
||||
send_V3 = dirV3 (mk2V "sende" "sendte") "til" ;
|
||||
sheep_N = mk2N "får" "fåret" ;
|
||||
ship_N = regN "skip" neutrum ;
|
||||
shirt_N = regN "skjorte" feminine ;
|
||||
shoe_N = regN "sko" masculine ;
|
||||
shop_N = mk2N "butikk" "butikken" ;
|
||||
short_A = regADeg "kort" ;
|
||||
silver_N = mk2N "sølv" "sølvet";
|
||||
sister_N = mkN "søster" "søsteren" "søstrer" "søstrene" ;
|
||||
sleep_V = irregV "sove" "sov" "sovet" ;
|
||||
small_A = mkADeg "liten" "lite" "små" "mindre" "minst" ; ---- lille
|
||||
snake_N = regN "orm" masculine ;
|
||||
sock_N = regN "strømpe" masculine ;
|
||||
speak_V2 = dirV2 (regV "snakke") ;
|
||||
star_N = regN "stjerne" feminine ;
|
||||
steel_N = regN "stål" neutrum ;
|
||||
stone_N = regN "stein" masculine ;
|
||||
stove_N = regN "komfyr" masculine ;
|
||||
student_N = mk2N "student" "studenten" ;
|
||||
stupid_A = mk3ADeg "dum" "dumt" "dumme" ;
|
||||
sun_N = regN "sol" feminine ;
|
||||
switch8off_V2 = dirV2 (partV (irregV "slå" "slo" "slått") "av") ;
|
||||
switch8on_V2 = dirV2 (partV (irregV "slå" "slo" "slått") "på") ;
|
||||
table_N = regN "bord" neutrum ;
|
||||
talk_V3 = mkV3 (regV "snakke") "til" "om" ;
|
||||
teacher_N = mkN "lærer" "læreren" "lærere" "lærerne" ;
|
||||
teach_V2 = dirV2 (mk2V "undervise" "underviste") ;
|
||||
television_N = mk2N "fjernsyn" "fjernsynet" ;
|
||||
thick_A = mk2ADeg "tykk" "tykt" ;
|
||||
thin_A = mk2ADeg "tynn" "tynt" ;
|
||||
train_N = regN "tog" neutrum ;
|
||||
travel_V = mk2V "reise" "reiste" ;
|
||||
tree_N = mkN "tre" "treet" "trær" "træne" ;
|
||||
---- trousers_N = regN "trousers" ; ---- pl t !
|
||||
ugly_A = mk2ADeg "stygg" "stygt" ;
|
||||
understand_V2 = dirV2 (irregV "forstå" "forstod" "forstått") ;
|
||||
university_N = regN "universitet" neutrum ;
|
||||
village_N = mk2N "grend" "grenda" ;
|
||||
wait_V2 = mkV2 (regV "vente") "på" ;
|
||||
walk_V = (irregV "gå" "gikk" "gått") ;
|
||||
warm_A = regADeg "varm" ;
|
||||
war_N = regN "krig" masculine ;
|
||||
watch_V2 = mkV2 se_V "på" ;
|
||||
water_N = mk2N "vatn" "vatnet" ;
|
||||
white_A = regADeg "hvit" ;
|
||||
window_N = mkN "vindu" "vinduet" "vinduer" "vinduene" ; ---- er?
|
||||
wine_N = mk2N "vin" "vinen" ;
|
||||
win_V2 = dirV2 (irregV "vinne" "vant" "vunnet") ;
|
||||
woman_N = regN "kvinne" feminine ; ---- kvinnen
|
||||
wonder_VQ = mkVQ (regV "undre") ; ---- seg
|
||||
wood_N = mkN "tre" "treet" "trær" "træne" ;
|
||||
write_V2 = dirV2 (irregV "skrive" "skrev" "skrevet") ;
|
||||
yellow_A = regADeg "gul" ;
|
||||
young_A = irregADeg "ung" "yngre" "yngst" ;
|
||||
|
||||
do_V2 = dirV2 (irregV "gjøre" "gjorde" "gjort") ;
|
||||
now_Adv = mkAdv "nå" ;
|
||||
already_Adv = mkAdv "allerede" ;
|
||||
song_N = mk2N "sang" "sangen" ;
|
||||
add_V3 = mkV3 (partV (irregV "legge" "la" "lagt") "til") [] "til" ;
|
||||
number_N = mk2N "nummer" "nummeret" ;
|
||||
put_V2 = mkV2 (irregV "sette" "satte" "satt") [] ;
|
||||
stop_V = regV "stanse" ;
|
||||
jump_V = regV "hoppe" ;
|
||||
{-
|
||||
here_Adv = mkAdv "her" ;
|
||||
here7to_Adv = mkAdv "hit" ;
|
||||
here7from_Adv = mkAdv ["herfra"] ;
|
||||
there_Adv = mkAdv "der" ;
|
||||
there7to_Adv = mkAdv "dit" ;
|
||||
there7from_Adv = mkAdv ["derfra"] ;
|
||||
-}
|
||||
} ;
|
||||
|
||||
-- a" -> e" 86
|
||||
-- ö -> ø 66
|
||||
-- ck -> kk 20
|
||||
-- ä -> e 44
|
||||
2
lib/resource-1.0/norwegian/MathNor.gf
Normal file
2
lib/resource-1.0/norwegian/MathNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete MathNor of Math = CatNor ** MathScand with
|
||||
(ResScand = ResNor) ;
|
||||
182
lib/resource-1.0/norwegian/MorphoNor.gf
Normal file
182
lib/resource-1.0/norwegian/MorphoNor.gf
Normal file
@@ -0,0 +1,182 @@
|
||||
--1 A Simple Norwegian Resource Morphology
|
||||
--
|
||||
-- Aarne Ranta 2002
|
||||
--
|
||||
-- This resource morphology contains definitions needed in the resource
|
||||
-- syntax. It moreover contains copies of the most usual inflectional patterns
|
||||
-- as defined in functional morphology (in the Haskell file $RulesSw.hs$).
|
||||
--
|
||||
-- We use the parameter types and word classes defined for morphology.
|
||||
|
||||
resource MorphoNor = CommonScand, ResNor ** open Prelude, Predef in {
|
||||
|
||||
-- genders
|
||||
|
||||
oper
|
||||
masc = Utr Masc ;
|
||||
fem = Utr Fem ;
|
||||
neutr = Neutr ;
|
||||
|
||||
-- type synonyms
|
||||
|
||||
Subst : Type = {s : Number => Species => Case => Str} ;
|
||||
Adj = Adjective ;
|
||||
|
||||
-- nouns
|
||||
|
||||
mkSubstantive : (_,_,_,_ : Str) -> Subst =
|
||||
\dreng, drengen, drenger, drengene ->
|
||||
{s = nounForms dreng drengen drenger drengene} ;
|
||||
|
||||
extNGen : Str -> Gender = \s -> case last s of {
|
||||
"n" => Utr Masc ;
|
||||
"a" => Utr Fem ;
|
||||
_ => Neutr
|
||||
} ;
|
||||
|
||||
nBil : Str -> Subst = \bil ->
|
||||
mkSubstantive bil (bil + "en") (bil + "er") (bil + "erne") **
|
||||
{h1 = masc} ;
|
||||
|
||||
nUke : Str -> Subst = \uke ->
|
||||
mkSubstantive uke (init uke + "a") (uke + "r") (uke + "ne") **
|
||||
{h1 = fem} ;
|
||||
|
||||
nHus : Str -> Subst = \hus ->
|
||||
mkSubstantive hus (hus + "et") hus (hus + "ene") **
|
||||
{h1 = neutr} ;
|
||||
|
||||
nHotell : Str -> Subst = \hotell ->
|
||||
mkSubstantive hotell (hotell + "et") (hotell + "er") (hotell + "ene") **
|
||||
{h1 = neutr} ;
|
||||
|
||||
|
||||
|
||||
|
||||
-- adjectives
|
||||
|
||||
mkAdject : (_,_,_,_,_ : Str) -> Adj =
|
||||
\stor,stort,store,storre,storst -> {s = table {
|
||||
AF (APosit (Strong SgUtr )) c => mkCase c stor ;
|
||||
AF (APosit (Strong SgNeutr)) c => mkCase c stort ;
|
||||
AF (APosit _) c => mkCase c store ;
|
||||
AF ACompar c => mkCase c storre ;
|
||||
AF (ASuperl SupStrong) c => mkCase c storst ;
|
||||
AF (ASuperl SupWeak) c => mkCase c (storst + "e")
|
||||
}
|
||||
} ;
|
||||
|
||||
aRod : Str -> Adj = \rod ->
|
||||
mkAdject rod (rod + "t") (rod + "e") (rod + "ere") (rod + "est") ;
|
||||
|
||||
aAbstrakt : Str -> Adj = \abstrakt ->
|
||||
mkAdject abstrakt abstrakt (abstrakt + "e") (abstrakt + "ere") (abstrakt + "est") ;
|
||||
|
||||
aRask : Str -> Adj = \rask ->
|
||||
mkAdject rask rask (rask + "e") (rask + "ere") (rask + "est") ;
|
||||
|
||||
aBillig : Str -> Adj = \billig ->
|
||||
mkAdject billig billig (billig + "e") (billig + "ere") (billig + "st") ;
|
||||
|
||||
-- verbs
|
||||
|
||||
Verbum : Type = {s : VForm => Str} ;
|
||||
|
||||
mkVerb6 : (_,_,_,_,_,_ : Str) -> Verbum =
|
||||
\spise,spiser,spises,spiste,spist,spis -> {s = table {
|
||||
VI (VInfin v) => mkVoice v spise ;
|
||||
VF (VPres Act) => spiser ;
|
||||
VF (VPres Pass) => spises ;
|
||||
VF (VPret v) => mkVoice v spiste ;
|
||||
VI (VSupin v) => mkVoice v spist ;
|
||||
VI (VPtPret (Strong (SgUtr | SgNeutr)) c) => mkCase c spist ;
|
||||
VI (VPtPret _ c) => case last spist of {
|
||||
"a" => mkCase c spist ;
|
||||
_ => mkCase c (spist + "e")
|
||||
} ;
|
||||
VF (VImper v) => mkVoice v spis
|
||||
}
|
||||
} ;
|
||||
|
||||
vHusk : Str -> Verbum = \husk ->
|
||||
let huska : Str = husk + "a" ---- variants {husk + "a" ; husk + "et"}
|
||||
in
|
||||
mkVerb6 (husk + "e") (husk + "er") (husk + "es") huska huska husk ;
|
||||
|
||||
vSpis : Str -> Verbum = \spis ->
|
||||
mkVerb6 (spis + "e") (spis + "er") (spis + "es") (spis + "te") (spis + "t") spis ;
|
||||
|
||||
vLev : Str -> Verbum = \lev ->
|
||||
let lever = case last lev of {
|
||||
"r" => lev ;
|
||||
_ => lev + "er"
|
||||
}
|
||||
in
|
||||
mkVerb6 (lev + "e") lever (lev + "es") (lev + "de") (lev + "d") lev ;
|
||||
|
||||
vBo : Str -> Verbum = \bo ->
|
||||
mkVerb6 bo (bo + "r") (bo + "es") (bo + "dde") (bo + "dd") bo ;
|
||||
|
||||
regVerb : Str -> Str -> Verbum = \spise, spiste ->
|
||||
let
|
||||
spis = init spise ;
|
||||
te = dp 2 spiste
|
||||
in
|
||||
case te of {
|
||||
"te" => vSpis spis ;
|
||||
"de" => case last spise of {
|
||||
"e" => vLev spis ;
|
||||
_ => vBo spise
|
||||
} ;
|
||||
_ => vHusk spis
|
||||
} ;
|
||||
|
||||
irregVerb : (drikke,drakk,drukket : Str) -> Verbum =
|
||||
\drikke,drakk,drukket ->
|
||||
let
|
||||
drikk = init drikke ;
|
||||
drikker = case last (init drikke) of {
|
||||
"r" => drikk ;
|
||||
_ => drikke + "r"
|
||||
}
|
||||
in
|
||||
mkVerb6 drikke drikker (drikke + "s") drakk drukket drikk ;
|
||||
|
||||
|
||||
-- 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 = \syv ->
|
||||
cardOrd syv (syv + case last syv of {
|
||||
"n" => "de" ;
|
||||
"e" => "nde" ;
|
||||
_ => "ende"
|
||||
}) ;
|
||||
|
||||
|
||||
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.0/norwegian/NounNor.gf
Normal file
2
lib/resource-1.0/norwegian/NounNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete NounNor of Noun = CatNor ** NounScand with
|
||||
(ResScand = ResNor) ;
|
||||
47
lib/resource-1.0/norwegian/NumeralNor.gf
Normal file
47
lib/resource-1.0/norwegian/NumeralNor.gf
Normal file
@@ -0,0 +1,47 @@
|
||||
concrete NumeralNor of Numeral = CatNor ** open ResScand, MorphoNor 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 "to" "tolv" "tjue" "andre" "tolfte" ;
|
||||
n3 = mkTal "tre" "tretten" "tretti" "tredje" "trettende" ;
|
||||
n4 = mkTal "fire" "fjorten" "førti" "fjerde" "fjortende" ;
|
||||
n5 = mkTal "fem" "femten" "femti" "femte" "femtende" ;
|
||||
n6 = mkTal "seks" "seksten" "seksti" "sjette" "sextende" ;
|
||||
n7 = mkTal "sju" "sytten" "sytti" "syvende" "syttende" ;
|
||||
n8 = mkTal "åtte" "atten" "åtti" "åttende" "attende" ;
|
||||
n9 = mkTal "ni" "nitten" "nitti" "niende" "nittende" ;
|
||||
|
||||
pot01 = {
|
||||
s = \\f => table {
|
||||
NCard g => case g of {Neutr => "ett" ; _ => "en"} ;
|
||||
_ => "første"
|
||||
} ;
|
||||
n = Sg
|
||||
} ;
|
||||
pot0 d = {s = \\f,g => d.s ! f ! g ; n = Pl} ;
|
||||
pot110 = numPl (cardReg "ti") ;
|
||||
pot111 = numPl (cardOrd "elve" "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 "hundre" "hundrede" ! g) ;
|
||||
pot2plus d e =
|
||||
{s = \\g => d.s ! ental ! invNum ++ "hundre" ++ "og" ++ 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" ++ "og" ++ m.s ! g ; n = Pl} ;
|
||||
|
||||
}
|
||||
|
||||
390
lib/resource-1.0/norwegian/ParadigmsNor.gf
Normal file
390
lib/resource-1.0/norwegian/ParadigmsNor.gf
Normal file
@@ -0,0 +1,390 @@
|
||||
--# -path=.:../scandinavian:../common:../abstract:../../prelude
|
||||
|
||||
--1 Norwegian Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2003
|
||||
--
|
||||
-- This is an API to 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 $MorphoNor.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 $IrregularEng$, which covers all irregularly inflected
|
||||
-- words.
|
||||
|
||||
resource ParadigmsNor =
|
||||
open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
CommonScand,
|
||||
ResNor,
|
||||
MorphoNor,
|
||||
CatNor in {
|
||||
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
|
||||
masculine : Gender ;
|
||||
feminine : 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 are just strings.
|
||||
|
||||
Preposition : Type = Str ;
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give all four forms. The gender is computed from the
|
||||
-- last letter of the second form (if "n", then $utrum$, otherwise $neutrum$).
|
||||
|
||||
mkN : (dreng,drengen,drenger,drengene : Str) -> N ;
|
||||
|
||||
-- The regular function takes the singular indefinite form and the gender,
|
||||
-- and computes the other forms by a heuristic.
|
||||
-- If in doubt, use the $cc$ command to test!
|
||||
|
||||
regN : Str -> Gender -> N ;
|
||||
|
||||
-- This function takes the singular indefinite and definite forms; the
|
||||
-- gender is computed from the definite form.
|
||||
|
||||
mk2N : (bil,bilen : Str) -> N ;
|
||||
|
||||
|
||||
--3 Compound nouns
|
||||
--
|
||||
-- All the functions above work quite as well to form compound nouns,
|
||||
-- such as "fotboll".
|
||||
|
||||
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns ("daughter of x") need a preposition.
|
||||
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
|
||||
-- The most common preposition is "av", and the following is a
|
||||
-- shortcut for regular, $nonhuman$ relational nouns with "av".
|
||||
|
||||
regN2 : Str -> Gender -> N2 ;
|
||||
|
||||
-- Use the function $mkPreposition$ or see the section on prepositions below to
|
||||
-- form other prepositions.
|
||||
--
|
||||
-- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
|
||||
|
||||
--3 Relational common noun phrases
|
||||
--
|
||||
-- In some cases, you may want to make a complex $CN$ into a
|
||||
-- relational noun (e.g. "the old town hall of"). 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 as follows
|
||||
|
||||
regPN : Str -> Gender -> PN ; -- John, John's
|
||||
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives need three forms:
|
||||
|
||||
mkA : (galen,galet,galne : Str) -> A ;
|
||||
|
||||
-- For regular adjectives, the other forms are derived.
|
||||
|
||||
regA : Str -> A ;
|
||||
|
||||
-- In most cases, two forms are enough.
|
||||
|
||||
mk2A : (stor,stort : Str) -> A ;
|
||||
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
|
||||
-- Comparison adjectives may need as many as five forms.
|
||||
|
||||
mkADeg : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
|
||||
-- The regular pattern works for many adjectives, e.g. those ending
|
||||
-- with "ig".
|
||||
|
||||
regADeg : Str -> A ;
|
||||
|
||||
-- Just the comparison forms can be irregular.
|
||||
|
||||
irregADeg : (tung,tyngre,tyngst : Str) -> A ;
|
||||
|
||||
-- Sometimes just the positive forms are irregular.
|
||||
|
||||
mk3ADeg : (galen,galet,galna : Str) -> A ;
|
||||
mk2ADeg : (bred,bredt : Str) -> A ;
|
||||
|
||||
-- If comparison is formed by "mer, "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundADeg : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb. Some can be preverbal (e.g. "always").
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdV : Str -> AdV ;
|
||||
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
|
||||
mkAdA : Str -> AdA ;
|
||||
|
||||
--2 Prepositions
|
||||
--
|
||||
-- A preposition is just a string.
|
||||
|
||||
mkPreposition : Str -> Preposition ;
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- The worst case needs six forms.
|
||||
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
|
||||
-- The 'regular verb' function is the first conjugation.
|
||||
|
||||
regV : (snakke : Str) -> V ;
|
||||
|
||||
-- The almost regular verb function needs the infinitive and the preteritum.
|
||||
|
||||
mk2V : (leve,levde : Str) -> V ;
|
||||
|
||||
-- There is an extensive list of irregular verbs in the module $IrregNor$.
|
||||
-- In practice, it is enough to give three forms, as in school books.
|
||||
|
||||
irregV : (drikke, drakk, drukket : Str) -> V ;
|
||||
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "switch on", is given as a string.
|
||||
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
--3 Deponent verbs.
|
||||
--
|
||||
-- Some words are used in passive forms only, e.g. "hoppas", some as
|
||||
-- reflexive e.g. "ångra sig".
|
||||
|
||||
depV : V -> V ;
|
||||
reflV : V -> V ;
|
||||
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
--3 Three-place verbs
|
||||
--
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
|
||||
mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about
|
||||
dirV3 : V -> Str -> V3 ; -- give,_,to
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
|
||||
--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 -> Str -> V2S ;
|
||||
mkVV : V -> VV ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Str -> V2Q ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Str -> A2S ;
|
||||
mkAV : A -> AV ;
|
||||
mkA2V : A -> Str -> A2V ;
|
||||
|
||||
-- Notice: categories $V2S, V2V, V2A, V2Q$ are in v 1.0 treated
|
||||
-- just as synonyms of $V2$, and the second argument is given
|
||||
-- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
|
||||
-- $V0$ is just $V$.
|
||||
|
||||
V0, V2S, V2V, V2A, V2Q : 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 = MorphoNor.Gender ;
|
||||
Number = MorphoNor.Number ;
|
||||
Case = MorphoNor.Case ;
|
||||
masculine = Utr Masc ;
|
||||
feminine = Utr Fem ;
|
||||
neutrum = Neutr ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
nominative = Nom ;
|
||||
genitive = Gen ;
|
||||
|
||||
mkN x y z u = mkSubstantive x y z u ** {g = extNGen y ; lock_N = <>} ;
|
||||
|
||||
regN x g = case last x of {
|
||||
"e" => case g of {
|
||||
Utr Masc => mkN x (x + "n") (x + "r") (x + "ne") ;
|
||||
Utr Fem => mkN x (init x + "a") (x + "r") (x + "ne") ;
|
||||
Neutr => mkN x (x + "t") (x + "r") (init x + "a")
|
||||
} ;
|
||||
_ => case g of {
|
||||
Utr Masc => mkN x (x + "en") (x + "er") (x + "ene") ;
|
||||
Utr Fem => mkN x (x + "a") (x + "er") (x + "ene") ;
|
||||
Neutr => mkN x (x + "et") (x + "") (x + "a")
|
||||
}
|
||||
} ;
|
||||
|
||||
mk2N x y = case last y of {
|
||||
"n" => regN x masculine ;
|
||||
"a" => regN x feminine ;
|
||||
_ => regN x neutrum
|
||||
} ;
|
||||
|
||||
|
||||
mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
|
||||
regN2 n g = mkN2 (regN n g) (mkPreposition "av") ;
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
|
||||
regPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g =
|
||||
{s = table {NPPoss _ => x ; _ => y} ; a = agrP3 g n ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
mkA a b c = (mkAdject a b c [] []) ** {lock_A = <>} ;
|
||||
mk2A a b = mkA a b (a + "e") ;
|
||||
regA a = (regADeg a) ** {lock_A = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
|
||||
mkADeg a b c d e = mkAdject a b c d e ** {lock_A = <>} ;
|
||||
regADeg a = case Predef.dp 2 a of {
|
||||
"ig" => aBillig a ;
|
||||
"sk" => aRask a ;
|
||||
_ => aRod a
|
||||
} ** {lock_A = <>} ;
|
||||
irregADeg a b c = mkAdject a (a + "t") (a + "e") b c ** {lock_A = <>} ;
|
||||
mk3ADeg a b c = mkAdject a b c (a + "ere") (a + "est") ** {lock_A = <>} ;
|
||||
mk2ADeg a b = mkAdject a b (a + "e") (a + "ere") (a + "est") ** {lock_A = <>} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
|
||||
mkPreposition p = p ;
|
||||
|
||||
mkV a b c d e f = mkVerb6 a b c d e f ** {s1 = [] ; vtype = VAct ; lock_V = <>} ;
|
||||
|
||||
regV a = case last a of {
|
||||
"e" => vHusk (init a) ;
|
||||
_ => vBo a
|
||||
} ** {s1 = [] ; vtype = VAct ; lock_V = <>} ;
|
||||
|
||||
mk2V a b = regVerb a b ** {s1 = [] ; vtype = VAct ; lock_V = <>} ;
|
||||
|
||||
irregV x y z = irregVerb x y z
|
||||
** {s1 = [] ; vtype = VAct ; lock_V = <>} ;
|
||||
|
||||
partV v p = {s = \\f => v.s ! f ++ p ; vtype = v.vtype ; lock_V = <>} ;
|
||||
depV v = {s = v.s ; vtype = VPass ; lock_V = <>} ;
|
||||
reflV v = {s = v.s ; vtype = VRefl ; lock_V = <>} ;
|
||||
|
||||
mkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v [] ;
|
||||
|
||||
mkV3 v p q = v ** {c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v [] p ;
|
||||
dirdirV3 v = dirV3 v [] ;
|
||||
|
||||
mkV0 v = v ** {lock_V0 = <>} ;
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkV2S v p = mkV2 v p ** {lock_V2S = <>} ;
|
||||
mkVV v = v ** {c2 = "å" ; lock_VV = <>} ;
|
||||
mkV2V v p t = mkV2 v p ** {s3 = t ; lock_V2V = <>} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkV2Q v p = mkV2 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 = <>} ;
|
||||
|
||||
V0 : Type = V ;
|
||||
V2S, V2V, V2Q, V2A : Type = V2 ;
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
|
||||
|
||||
} ;
|
||||
2
lib/resource-1.0/norwegian/PhraseNor.gf
Normal file
2
lib/resource-1.0/norwegian/PhraseNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete PhraseNor of Phrase = CatNor ** PhraseScand with
|
||||
(ResScand = ResNor) ;
|
||||
2
lib/resource-1.0/norwegian/QuestionNor.gf
Normal file
2
lib/resource-1.0/norwegian/QuestionNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete QuestionNor of Question = CatNor ** QuestionScand with
|
||||
(ResScand = ResNor) ;
|
||||
2
lib/resource-1.0/norwegian/RelativeNor.gf
Normal file
2
lib/resource-1.0/norwegian/RelativeNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete RelativeNor of Relative = CatNor ** RelativeScand with
|
||||
(ResScand = ResNor) ;
|
||||
3
lib/resource-1.0/norwegian/ResNor.gf
Normal file
3
lib/resource-1.0/norwegian/ResNor.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
instance ResNor of ResScand = DiffNor ** open CommonScand, Prelude in {
|
||||
} ;
|
||||
|
||||
2
lib/resource-1.0/norwegian/SentenceNor.gf
Normal file
2
lib/resource-1.0/norwegian/SentenceNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete SentenceNor of Sentence = CatNor ** SentenceScand with
|
||||
(ResScand = ResNor) ;
|
||||
117
lib/resource-1.0/norwegian/StructuralNor.gf
Normal file
117
lib/resource-1.0/norwegian/StructuralNor.gf
Normal file
@@ -0,0 +1,117 @@
|
||||
concrete StructuralNor of Structural = CatNor **
|
||||
open MorphoNor, ParadigmsNor, Prelude in {
|
||||
|
||||
flags optimize=all ;
|
||||
|
||||
lin
|
||||
above_Prep = ss "ovenfor" ;
|
||||
after_Prep = ss "etter" ;
|
||||
by8agent_Prep = ss "av" ;
|
||||
all_Predet = {s = gennumForms "all" "alt" "alle"} ;
|
||||
almost_AdA, almost_AdN = ss "nesten" ;
|
||||
although_Subj = ss ["selv om"] ;
|
||||
always_AdV = ss "altid" ;
|
||||
and_Conj = ss "og" ** {n = Pl} ;
|
||||
because_Subj = ss "fordi" ;
|
||||
before_Prep = ss "før" ;
|
||||
behind_Prep = ss "bakom" ;
|
||||
between_Prep = ss "mellom" ;
|
||||
both7and_DConj = sd2 "både" "og" ** {n = Pl} ;
|
||||
but_PConj = ss "men" ;
|
||||
by8means_Prep = ss "med" ;
|
||||
can8know_VV, can_VV =
|
||||
mkV "kunne" "kan" nonExist "kunne" "kunnet" nonExist **
|
||||
{c2 = [] ; lock_VV = <>} ;
|
||||
during_Prep = ss "under" ;
|
||||
either7or_DConj = sd2 "enten" "eller" ** {n = Sg} ;
|
||||
everybody_NP = regNP "alle" "alles" Plg ;
|
||||
every_Det = {s = \\_,_ => "hver" ; n = Sg ; det = DDef Indef} ;
|
||||
everything_NP = regNP "alt" "alts" SgNeutr ;
|
||||
everywhere_Adv = ss "overalt" ;
|
||||
first_Ord = {s = "første" ; isDet = True} ;
|
||||
from_Prep = ss "fra" ;
|
||||
he_Pron = MorphoNor.mkNP "han" "ham" "hans" "hans" "hans" SgUtr P3 ;
|
||||
here_Adv = ss "her" ;
|
||||
here7to_Adv = ss "hit" ;
|
||||
here7from_Adv = ss "herfra" ;
|
||||
how_IAdv = ss "hvor" ;
|
||||
how8many_IDet = {s = \\_ => ["hur mange"] ; n = Pl ; det = DDef Indef} ;
|
||||
if_Subj = ss "hvis" ;
|
||||
in8front_Prep = ss "foran" ;
|
||||
i_Pron =
|
||||
MorphoNor.mkNP "jeg" "meg" (variants {"min" ; "mi"}) "mit" "mine" SgUtr P1 ; --- mi
|
||||
in_Prep = ss "i" ;
|
||||
it_Pron = MorphoNor.regNP "det" "dets" SgNeutr ;
|
||||
less_CAdv = ss "mindre" ;
|
||||
many_Det = {s = \\_,_ => "mange" ; n = Pl ; det = DDef Indef} ;
|
||||
more_CAdv = ss "mer" ;
|
||||
most_Predet = {s = gennumForms ["den meste"] ["det meste"] ["de fleste"]} ;
|
||||
much_Det = {s = \\_,_ => "mye" ; n = Pl ; det = DDef Indef} ;
|
||||
must_VV =
|
||||
mkV "måtte" "må" "få" "måtte" "måttet" "mått" ** {c2 = [] ; lock_VV = <>} ;
|
||||
no_Phr = ss ["Nei"] ;
|
||||
on_Prep = ss "på" ;
|
||||
one_Quant = {s = \\_ => genderForms ["en"] ["et"] ; n = Sg ; det = DIndef} ; --- ei
|
||||
only_Predet = {s = \\_ => "kun"} ;
|
||||
or_Conj = ss "eller" ** {n = Sg} ;
|
||||
otherwise_PConj = ss "annarledes" ;
|
||||
part_Prep = ss "av" ;
|
||||
please_Voc = ss "takk" ; ---
|
||||
possess_Prep = ss "av" ;
|
||||
quite_Adv = ss "temmelig" ;
|
||||
she_Pron = MorphoNor.mkNP "hun" "henne" "hennes" "hennes" "hennes" SgUtr P3 ;
|
||||
so_AdA = ss "så" ;
|
||||
someSg_Det = {s = \\_ => genderForms "noen" "noe" ; n = Sg ; det = DIndef} ;
|
||||
somePl_Det = {s = \\_,_ => "noen" ; n = Pl ; det = DIndef} ;
|
||||
somebody_NP = regNP "noen" "noens" SgUtr ;
|
||||
something_NP = regNP "noe" "noes" SgNeutr ;
|
||||
somewhere_Adv = ss ["et eller annet sted"] ; ---- ?
|
||||
that_Quant =
|
||||
{s = \\_ => genderForms ["den der"] ["det der"] ; n = Sg ; det = DDef Def} ;
|
||||
that_NP = regNP ["det der"] ["det ders"] SgNeutr ;
|
||||
there_Adv = ss "der" ;
|
||||
there7to_Adv = ss "dit" ;
|
||||
there7from_Adv = ss "derfra" ;
|
||||
therefore_PConj = ss "derfor" ;
|
||||
these_NP = regNP ["de her"] ["det hers"] Plg ;
|
||||
these_Quant = {s = \\_,_ => ["de her"] ; n = Pl ; det = DDef Def} ;
|
||||
they_Pron = MorphoNor.mkNP "de" "dem" "deres" "deres" "deres" Plg P1 ;
|
||||
this_Quant =
|
||||
{s = \\_ => genderForms ["den her"] ["det her"] ; n = Sg ; det = DDef Def} ;
|
||||
this_NP = regNP ["det her"] ["det hers"] SgNeutr ;
|
||||
those_NP = regNP ["de der"] ["de ders"] Plg ;
|
||||
those_Quant = {s = \\_,_ => ["de der"] ; n = Pl ; det = DDef Def} ;
|
||||
through_Prep = ss "gjennom" ;
|
||||
too_AdA = ss "for" ;
|
||||
to_Prep = ss "til" ;
|
||||
under_Prep = ss "under" ;
|
||||
very_AdA = ss "mye" ;
|
||||
want_VV =
|
||||
mkV "ville" "vil" nonExist "ville" "villet" "villed" **
|
||||
{c2 = [] ; lock_VV = <>} ;
|
||||
we_Pron = MorphoNor.mkNP "vi" "oss" "vår" "vårt" "våre" Plg P1 ;
|
||||
whatSg_IP = {s = \\_ => "hva" ; gn = SgUtr} ; ---- infl
|
||||
whatPl_IP = {s = \\_ => "hva" ; gn = Plg} ; ---- infl
|
||||
when_IAdv = ss "når" ;
|
||||
when_Subj = ss "når" ;
|
||||
where_IAdv = ss "hver" ;
|
||||
whichPl_IDet = {s = \\_ => "hvilke" ; n = Pl ; det = DIndef} ;
|
||||
whichSg_IDet = {s = genderForms "hvilken" "hvilket" ; n = Sg ; det = DIndef} ;
|
||||
whoSg_IP = {s = vem.s ; gn = SgUtr} ;
|
||||
whoPl_IP = {s = vem.s ; gn = Plg} ;
|
||||
why_IAdv = ss "hvorfor" ;
|
||||
without_Prep = ss "uten" ;
|
||||
with_Prep = ss "med" ;
|
||||
yes_Phr = ss ["ja"] ;
|
||||
youSg_Pron =
|
||||
MorphoNor.mkNP "du" "deg" (variants {"din" ; "di"}) "dit" "dine" SgUtr P2 ; ----
|
||||
youPl_Pron = MorphoNor.mkNP "dere" "dere" "deres" "deres" "deres" Plg P2 ;
|
||||
youPol_Pron = MorphoNor.mkNP "Dere" "Dere" "Deres" "Deres" "Deres" SgUtr P2 ; --- wrong in refl
|
||||
|
||||
-- Auxiliaries that are used repeatedly.
|
||||
|
||||
oper
|
||||
vem = MorphoNor.mkNP "hvem" "hvem" "hvis" "hvis" "hvis" SgUtr P3 ;
|
||||
|
||||
}
|
||||
|
||||
2
lib/resource-1.0/norwegian/VerbNor.gf
Normal file
2
lib/resource-1.0/norwegian/VerbNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete VerbNor of Verb = CatNor ** VerbScand with
|
||||
(ResScand = ResNor) ;
|
||||
@@ -21,7 +21,7 @@ incomplete concrete AdjectiveScand of Adjective =
|
||||
|
||||
ReflA2 a = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++
|
||||
reflPron (agrP3 Utr Sg) ; ----
|
||||
reflPron (agrP3 utrum Sg) ; ----
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ incomplete concrete PhraseScand of Phrase =
|
||||
UttIP ip = {s = ip.s ! nominative} ; --- Acc also
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = np.s ! accusative} ;
|
||||
UttVP vp = {s = infMark ++ infVP vp (agrP3 Utr Sg)} ;
|
||||
UttVP vp = {s = infMark ++ infVP vp (agrP3 utrum Sg)} ;
|
||||
UttAdv adv = adv ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
|
||||
@@ -46,7 +46,7 @@ lin
|
||||
cheese_N = regN "ost" utrum ;
|
||||
child_N = regN "barn" neutrum ;
|
||||
church_N = regN "kyrka" utrum ;
|
||||
city_N = mk2N "stad" "städer" ;
|
||||
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") ;
|
||||
@@ -55,7 +55,7 @@ lin
|
||||
come_V = (mkV "komma" "kommer" "kom" "kom" "kommit" "kommen") ;
|
||||
computer_N = mk2N "dator" "datorer" ;
|
||||
country_N = mkN "land" "landet" "länder" "länderna" ;
|
||||
cousin_N = mk2N "kusin" "kusinerna" ;
|
||||
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") "från" "till" ;
|
||||
@@ -125,7 +125,6 @@ lin
|
||||
narrow_A = regA "smal" ;
|
||||
new_A = mkA "ny" "nytt" "nya" "nya" "nyare" "nyast" "nyaste" ;
|
||||
newspaper_N = regN "tidning" utrum ;
|
||||
|
||||
oil_N = regN "olja" utrum ;
|
||||
old_A = mkA "gammal" "gammalt" "gamla" "gamla" "äldre" "äldst" "äldsta" ;
|
||||
open_V2 = dirV2 (regV "öppna") ;
|
||||
@@ -141,7 +140,7 @@ lin
|
||||
priest_N = mk2N "präst" "präster" ;
|
||||
probable_AS = mkAS (regA "sannolik") ;
|
||||
queen_N = regN "drottning" utrum ;
|
||||
radio_N = regN "radio" 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" ;
|
||||
|
||||
@@ -13,7 +13,7 @@ lin
|
||||
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" "sextion" "sjätte" "sextonde" ;
|
||||
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" ;
|
||||
@@ -39,7 +39,7 @@ lin
|
||||
{s = \\g => d.s ! ental ! invNum ++ "hundra" ++ e.s ! g ; n = Pl} ;
|
||||
pot2as3 n = n ;
|
||||
pot3 n =
|
||||
numPl (\\g => n.s ! invNum ++ "tusen" ++ cardOrd "tusen" "tusende" ! g) ;
|
||||
numPl (\\g => n.s ! invNum ++ cardOrd "tusen" "tusende" ! g) ;
|
||||
pot3plus n m =
|
||||
{s = \\g => n.s ! invNum ++ "tusen" ++ m.s ! g ; n = Pl} ;
|
||||
|
||||
|
||||
@@ -78,6 +78,11 @@ oper
|
||||
|
||||
mk2N : (nyckel,nycklar : Str) -> N ;
|
||||
|
||||
-- This heuristic takes just the plural definite form and infers the others.
|
||||
-- It does not work if there are changes in the stem.
|
||||
|
||||
mk1N : (bilarna : Str) -> N ;
|
||||
|
||||
|
||||
--3 Compound nouns
|
||||
--
|
||||
@@ -296,6 +301,14 @@ oper
|
||||
}
|
||||
} ** {lock_N = <>} ;
|
||||
|
||||
mk1N 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 bil bilar =
|
||||
ifTok N bil bilar (decl5Noun bil) (
|
||||
case Predef.dp 2 bilar of {
|
||||
@@ -442,14 +455,13 @@ oper
|
||||
depV v = {s = v.s ; vtype = VPass ; lock_V = <>} ;
|
||||
reflV v = {s = v.s ; vtype = VRefl ; lock_V = <>} ;
|
||||
|
||||
mkV2 v p = v ** {s = v.s ; c2 = p ; lock_V2 = <>} ;
|
||||
mkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v [] ;
|
||||
|
||||
mkV3 v p q = v ** {s = v.s ; c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
mkV3 v p q = v ** {c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v [] p ;
|
||||
dirdirV3 v = dirV3 v [] ;
|
||||
|
||||
|
||||
mkV0 v = v ** {lock_V0 = <>} ;
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkVV v = v ** {c2 = "att" ; lock_VV = <>} ;
|
||||
|
||||
@@ -23,7 +23,7 @@ instance SyntaxNor of SyntaxScand = TypesNor **
|
||||
verbFinnas : Verb =
|
||||
mkVerb "finnes" "finner" "finnes" "fantes" "funnets" "fins" ** {s1 = []} ;
|
||||
verbVara = mkVerb "være" "er" nonExist "var" "vært" "vær" ** {s1 = []} ;
|
||||
verbHava = mkVerb "ha" "ha" "has" "hadde" "hatt" "ha" ** {s1 = []} ;
|
||||
verbHava = mkVerb "ha" "har" "has" "hadde" "hatt" "ha" ** {s1 = []} ;
|
||||
|
||||
relPronForms : RelCase => GenNum => Str = table {
|
||||
RNom => \\_ => "som" ;
|
||||
|
||||
@@ -124,12 +124,16 @@ computeTermOpt rec gr = comp where
|
||||
|
||||
S t@(T _ cc) v -> do
|
||||
v' <- comp g v
|
||||
case matchPattern cc v' of
|
||||
Ok (c,g') -> comp (g' ++ g) c
|
||||
_ | isCan v' -> prtBad ("missing case" +++ prt v' +++ "in") t
|
||||
_ -> do
|
||||
t' <- comp g t
|
||||
return $ S t' v' -- if v' is not canonical
|
||||
case v' of
|
||||
FV vs -> do
|
||||
ts' <- mapM (comp g . S t) vs
|
||||
return $ variants ts'
|
||||
_ -> case matchPattern cc v' of
|
||||
Ok (c,g') -> comp (g' ++ g) c
|
||||
_ | isCan v' -> prtBad ("missing case" +++ prt v' +++ "in") t
|
||||
_ -> do
|
||||
t' <- comp g t
|
||||
return $ S t' v' -- if v' is not canonical
|
||||
|
||||
S t v -> do
|
||||
t' <- comp g t
|
||||
|
||||
Reference in New Issue
Block a user