updates from Codex

This commit is contained in:
Krasimir Angelov committed 2026-10-13 08:44:43 +02:00
1 parent badbadc59a
commit a51cc57018
15 files changed
+351 -67

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ concrete CatIce of Cat = CommonX ** open ResIce, Prelude in {
flags optimize=all_subs ; flags optimize=all_subs ;
lincat lincat
GN, LN, SN = {s : Str} ;
--2 Sentences and clauses --2 Sentences and clauses
+100 -1
View File
@@ -1,6 +1,105 @@
--# -path=.:../abstract --# -path=.:../abstract
concrete ConstructionIce of Construction = CatIce ** concrete ConstructionIce of Construction = CatIce **
open SyntaxIce, SymbolicIce, ParadigmsIce, (L = LexiconIce), (E = ExtraIce), (G = GrammarIce), (R = ResIce), (S = StructuralIce), Prelude in { open SyntaxIce, ParadigmsIce, (L = LexiconIce), (G = GrammarIce), (R = ResIce), (S = StructuralIce), Prelude in {
lincat
Timeunit, Hour, Weekday, Month, Monthday, Year = {s : Str} ;
lin
hungry_VP = G.UseComp (G.CompAP (G.PositA (mkA "svangur"))) ;
thirsty_VP = G.UseComp (G.CompAP (G.PositA (mkA "þyrstur"))) ;
tired_VP = G.UseComp (G.CompAP (G.PositA (mkA "þreyttur"))) ;
scared_VP = G.UseComp (G.CompAP (G.PositA (mkA "hræddur"))) ;
ill_VP = G.UseComp (G.CompAP (G.PositA (mkA "veikur"))) ;
ready_VP = G.UseComp (G.CompAP (G.PositA (mkA "tilbúinn"))) ;
has_age_VP card = G.UseComp {s = \\a =>
card.s ! R.Neutr ! R.Nom ++ "ára" ++ (mkA "gamall").s ! R.APosit R.Strong a.n a.g R.Nom
} ;
n_units_AP card unit adj = {s = \\n,g,d,c =>
card.s ! R.Neutr ! R.Nom ++
unit.s ! R.Pl ! R.Free ! R.Strong ! R.Gen ++
adj.s ! R.APosit d n g c
} ;
n_units_of_NP card unit np = {
s = \\_ => card.s ! R.Neutr ! R.Nom ++
unit.s ! R.Pl ! R.Free ! R.Strong ! R.Nom ++ "af" ++ np.s ! R.NCase R.Dat ;
a = np.a ;
isPron = False
} ;
n_unit_CN card unit cn = {
s = \\n,sp,d,c => card.s ! R.Neutr ! c ++
unit.s ! R.Sg ! R.Free ! R.Strong ! R.Gen ++ cn.s ! n ! sp ! d ! c ;
comp = cn.comp ;
g = cn.g
} ;
bottle_of_CN np = containerCN (mkN "flaska") np ;
cup_of_CN np = containerCN (mkN "bolli") np ;
glass_of_CN np = containerCN (mkN "glas") np ;
timeunitAdv card unit = {s = "í" ++ card.s ! R.Neutr ! R.Nom ++ unit.s} ;
timeunitRange c1 c2 unit = {s = "í" ++ c1.s ! R.Neutr ! R.Nom ++ "til" ++ c2.s ! R.Neutr ! R.Nom ++ unit.s} ;
oneHour = ss "eitt" ; twoHour = ss "tvö" ; threeHour = ss "þrjú" ;
fourHour = ss "fjögur" ; fiveHour = ss "fimm" ; sixHour = ss "sex" ;
sevenHour = ss "sjö" ; eightHour = ss "átta" ; nineHour = ss "níu" ;
tenHour = ss "tíu" ; elevenHour = ss "ellefu" ; twelveHour = ss "tólf" ;
thirteenHour = ss "þrettán" ; fourteenHour = ss "fjórtán" ; fifteenHour = ss "fimmtán" ;
sixteenHour = ss "sextán" ; seventeenHour = ss "sautján" ; eighteenHour = ss "átján" ;
nineteenHour = ss "nítján" ; twentyHour = ss "tuttugu" ;
twentyOneHour = ss "tuttugu og eitt" ; twentyTwoHour = ss "tuttugu og tvö" ;
twentyThreeHour = ss "tuttugu og þrjú" ; twentyFourHour = ss "tuttugu og fjögur" ;
timeHour h = {s = "klukkan" ++ h.s} ;
timeHourMinute h m = {s = "klukkan" ++ h.s ++ m.s ! R.Neutr ! R.Nom} ;
weekdayPunctualAdv w = {s = "á" ++ w.s} ;
weekdayHabitualAdv w = {s = "á" ++ w.s ++ "dögum"} ;
weekdayLastAdv w = {s = "síðasta" ++ w.s} ;
weekdayNextAdv w = {s = "næsta" ++ w.s} ;
monthAdv m = {s = "í" ++ m.s} ;
yearAdv y = {s = "árið" ++ y.s} ;
dayMonthAdv d m = {s = d.s ++ m.s} ;
monthYearAdv m y = {s = m.s ++ y.s} ;
dayMonthYearAdv d m y = {s = d.s ++ m.s ++ y.s} ;
intYear i = {s = i.s} ;
intMonthday i = {s = i.s ++ BIND ++ "."} ;
weekdayN w = nameN w.s R.Masc ;
monthN m = nameN m.s R.Masc ;
weekdayPN w = {s = \\_ => w.s ; g = R.Masc} ;
monthPN m = {s = \\_ => m.s ; g = R.Masc} ;
second_Timeunit = ss "sekúndu" ; minute_Timeunit = ss "mínútur" ;
hour_Timeunit = ss "klukkustundir" ; day_Timeunit = ss "daga" ;
week_Timeunit = ss "vikur" ; month_Timeunit = ss "mánuði" ; year_Timeunit = ss "ár" ;
monday_Weekday = ss "mánudag" ; tuesday_Weekday = ss "þriðjudag" ;
wednesday_Weekday = ss "miðvikudag" ; thursday_Weekday = ss "fimmtudag" ;
friday_Weekday = ss "föstudag" ; saturday_Weekday = ss "laugardag" ;
sunday_Weekday = ss "sunnudag" ;
january_Month = ss "janúar" ; february_Month = ss "febrúar" ;
march_Month = ss "mars" ; april_Month = ss "apríl" ; may_Month = ss "maí" ;
june_Month = ss "júní" ; july_Month = ss "júlí" ; august_Month = ss "ágúst" ;
september_Month = ss "september" ; october_Month = ss "október" ;
november_Month = ss "nóvember" ; december_Month = ss "desember" ;
oper
nameN : Str -> R.Gender -> N = \s,g -> lin N {
s = \\_,_,_ => s ;
g = g
} ;
containerCN : N -> NP -> CN = \noun,np -> lin CN {
s = \\n,sp,d,c => noun.s ! n ! sp ! c ;
comp = \\_,_ => "af" ++ np.s ! R.NCase R.Dat ;
g = noun.g
} ;
} }
+2 -1
View File
@@ -14,7 +14,8 @@ concrete GrammarIce of Grammar =
TextX, TextX,
StructuralIce, StructuralIce,
IdiomIce, IdiomIce,
TenseX TenseX,
NamesIce
** open ResIce, Prelude in { ** open ResIce, Prelude in {
flags startcat = Phr ; unlexer = text ; lexer = text ; flags startcat = Phr ; unlexer = text ; lexer = text ;
+6 -9
View File
@@ -27,17 +27,14 @@ concrete IdiomIce of Idiom = CatIce ** open Prelude, ResIce in {
cl = mkClause (ip.s ! Masc ! Nom) vp {g = Masc ; n = ip.n ; p = P3} cl = mkClause (ip.s ! Masc ! Nom) vp {g = Masc ; n = ip.n ; p = P3}
in {s = \\ten,ant,pol,_ => cl.s ! ten ! ant ! pol ! ODir ++ adv.s} ; in {s = \\ten,ant,pol,_ => cl.s ! ten ! ant ! pol ! ODir ++ adv.s} ;
ProgrVP vp = let vvp = predV verbBe in ProgrVP vp = let vvp = predV verbBe in vvp ** {
vvp ** {dirObj = \\a => vp.p ! PPres ++ vp.dirObj ! a} ; dirObj = \\a => "að" ++ infVPPlus vp VPInf Pos a
} ;
ImpPl1 vp = { s = let ImpPl1 vp = {s = infVPPlus vp (VPMood Pres Simul) Pos (gennumperToAgr Masc Pl P1)} ;
agr = gennumperToAgr Masc Pl P1 ;
verb = vp.s ! VPMood Pres Simul ! Pos ! agr
in verb.fin ++ verb.inf ++ vp.dirObj ! agr } ;
ImpP3 np vp = {s = let ImpP3 np vp = {s = verbLet.s ! VPres Active Indicative np.a.n np.a.p ++
verb = vp.s ! VPMood Pres Simul ! Pos ! np.a np.s ! NCase Acc ++ infVPPlus vp VPInf Pos np.a} ;
in verbLet.s ! VPres Active Indicative np.a.n np.a.p ++ np.s ! NCase Acc ++ verb.inf} ;
SelfAdvVP vp = vp ** {dirObj = \\a => vp.dirObj ! a ++ reflPron a.p a.n a.g Nom} ; SelfAdvVP vp = vp ** {dirObj = \\a => vp.dirObj ! a ++ reflPron a.p a.n a.g Nom} ;
+1 -1
View File
@@ -2,6 +2,6 @@
concrete LangIce of Lang = concrete LangIce of Lang =
GrammarIce GrammarIce
,LexiconIce ,LexiconIce
,ConstructionIce
,DocumentationIce --# notpresent ,DocumentationIce --# notpresent
--,ConstructionIce
** {} ; ** {} ;
+14 -3
View File
@@ -499,6 +499,14 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
smá smá (smá + "um") (smá + "rra") ; smá smá (smá + "um") (smá + "rra") ;
in nForms2AForms mas fem neut ; in nForms2AForms mas fem neut ;
-- Indeclinable adjectives are frequent among loanwords, adverbial
-- modifiers used adjectivally, and the first parts of compounds. The
-- old smart paradigm sent these through dSmár/dI, which produced forms
-- such as "fyrirframr" and "a posteriorii".
dInvar : Str -> AForms = \s ->
let forms = nForms8 s s s s s s s s
in nForms2AForms forms forms forms ;
dFarinn : Str -> AForms = \farinn -> dFarinn : Str -> AForms = \farinn ->
let let
farin = init farinn ; farin = init farinn ;
@@ -770,7 +778,7 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
köll = a2ö kall ; köll = a2ö kall ;
kölluð = köll + "uð"; kölluð = köll + "uð";
presInd = tForms6 kalla (kalla + "r") (kalla + "r") (köll + "um") (kall + "ið") kalla ; presInd = tForms6 kalla (kalla + "r") (kalla + "r") (köll + "um") (kall + "ið") kalla ;
pastInd = tForms6 kallaði (kallaði + "r") kallaði (kölluð + "um") (kölluð + "u") (kölluð + "u") ; pastInd = tForms6 kallaði (kallaði + "r") kallaði (kölluð + "um") (kölluð + "uð") (kölluð + "u") ;
presSub = tForms6 (kall + "i") (kall + "ir") (kall + "i") (köll + "um") (kall + "ið") (kall + "i") ; presSub = tForms6 (kall + "i") (kall + "ir") (kall + "i") (köll + "um") (kall + "ið") (kall + "i") ;
pastSub = tForms6 kallaði (kallaði + "r") kallaði (kölluð + "um") (kölluð + "uð") (kölluð + "u") pastSub = tForms6 kallaði (kallaði + "r") kallaði (kölluð + "um") (kölluð + "uð") (kölluð + "u")
in tForms2MForms presInd pastInd presSub pastSub ; in tForms2MForms presInd pastInd presSub pastSub ;
@@ -932,6 +940,8 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
PStrong Pl Neutr c => caseList (pastPartS ! Neutr ! 4) (pastPartS ! Neutr ! 5) (pastPartS ! Neutr ! 6) (pastPartS ! Neutr ! 7) ! c ; PStrong Pl Neutr c => caseList (pastPartS ! Neutr ! 4) (pastPartS ! Neutr ! 5) (pastPartS ! Neutr ! 6) (pastPartS ! Neutr ! 7) ! c ;
PPres => presPart PPres => presPart
} ; } ;
refl = NonReflexive ;
part = [] ;
} ; } ;
-- AR 2019-08-02: deponent verbs use the Middle voice everywhere, instead of Active -- AR 2019-08-02: deponent verbs use the Middle voice everywhere, instead of Active
@@ -1083,11 +1093,12 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
ðiditi : Str -> Str = \stem -> case stem of { ðiditi : Str -> Str = \stem -> case stem of {
-- ði -- ði
_ + #vowel => stem + "ði" ; _ + #vowel => stem + "ði" ;
front + ("f" | "j") => front + "ði" ; _ + "f" => stem + "ði" ;
front + "j" => front + "ði" ;
_ + #vowel + ("r" | "rf" | "rg") => stem + "ði" ; _ + #vowel + ("r" | "rf" | "rg") => stem + "ði" ;
_ + "rr" => stem + "ði" ; -- somethimes - otherwise + "ti", e.g., sperra-sperrti _ + "rr" => stem + "ði" ; -- somethimes - otherwise + "ti", e.g., sperra-sperrti
-- ti -- ti
front@(_ + #consonant) + "t" => front + "i" ; _ + "t" => stem + "i" ;
_ + ("p" | "t" | "k") => stem + "ti" ; _ + ("p" | "t" | "k") => stem + "ti" ;
front@(_ + "r") + "ð" => front + "ti" ; front@(_ + "r") + "ð" => front + "ti" ;
front@(_ + ("l" | "n")) + "d" => front + "ti" ; -- usually otherwise + "di", e.g., ýlda-ýldi, senda-sendi front@(_ + ("l" | "n")) + "d" => front + "ti" ; -- usually otherwise + "di", e.g., ýlda-ýldi, senda-sendi
+17 -4
View File
@@ -219,11 +219,15 @@ concrete NounIce of Noun = CatIce ** open MorphoIce, ResIce, Prelude in {
-- 2 Possessive and partitive constructs -- 2 Possessive and partitive constructs
PossNP cn np = { PossNP cn np = {
s = \\n,s,d,c => case np.isPron of { -- Keep the possessor in the complement field. Besides preserving
True => cn.s ! n ! Suffix ! d ! Nom ++ np.s ! NPPoss n cn.g c ; -- the case of the head, this lets an outer determiner occur directly
False => cn.s ! n ! Free ! d ! c ++ np.s ! NPPoss n cn.g Gen -- after the head ("meðferð hans barnanna", not
-- "meðferð barnanna hans").
s = \\n,s,d,c => cn.s ! n ! s ! d ! c ;
comp = \\n,c => cn.comp ! n ! c ++ case np.isPron of {
True => np.s ! NPPoss n cn.g Gen ;
False => np.s ! NCase Gen
} ; } ;
comp = cn.comp ;
g = cn.g g = cn.g
} ; } ;
@@ -250,4 +254,13 @@ concrete NounIce of Noun = CatIce ** open MorphoIce, ResIce, Prelude in {
} ; } ;
DetDAP det = det ; DetDAP det = det ;
QuantityNP dec mu = {
s = \\_ => case mu.isPre of {
True => mu.s ++ dec.s ! NCard Pl Neutr Nom ;
False => dec.s ! NCard Pl Neutr Nom ++ mu.s
} ;
a = gennumperToAgr Neutr Pl P3 ;
isPron = False
} ;
} }
+48
View File
@@ -101,6 +101,7 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
pot1 d = {s = d.s ! ten ; size = pl} ; pot1 d = {s = d.s ! ten ; size = pl} ;
pot1plus d e = { s = \\ngc => d.s ! ten ! ngc ++ "og" ++ e.s ! unit ! ngc ; size = pl} ; pot1plus d e = { s = \\ngc => d.s ! ten ! ngc ++ "og" ++ e.s ! unit ! ngc ; size = pl} ;
pot1as2 n = n ; pot1as2 n = n ;
pot21 = {s = hundrað ; size = pl} ;
pot2 d = { s = \\ngc => (omitsg (d.s ! unit ! NCard Sg Neutr Nom) d.size) ++ hundrað ! ngc ; size = pl} ; pot2 d = { s = \\ngc => (omitsg (d.s ! unit ! NCard Sg Neutr Nom) d.size) ++ hundrað ! ngc ; size = pl} ;
pot2plus d e = { pot2plus d e = {
s = table { s = table {
@@ -110,6 +111,7 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
size = pl size = pl
} ; } ;
pot2as3 n = n ; pot2as3 n = n ;
pot31 = {s = þúsund ; size = pl} ;
pot3 d = { s = \\ngc => (omitsg (d.s ! NCard Sg Neutr Nom) d.size) ++ þúsund ! ngc ; size = pl} ; pot3 d = { s = \\ngc => (omitsg (d.s ! NCard Sg Neutr Nom) d.size) ++ þúsund ! ngc ; size = pl} ;
pot3plus d e = { pot3plus d e = {
s = table { s = table {
@@ -119,8 +121,39 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
size = pl size = pl
} ; } ;
pot3as4 n = n ; pot3as4 n = n ;
pot3decimal d = {s = \\_ => d.s ! NCard Pl Neutr Nom ++ "þúsund" ; size = pl} ;
pot41 = {s = \\co => case co of {
NCard _ _ c => pot01.s ! unit ! NCard Sg Fem c ++ milljón ! Sg ! c ;
NOrd n g c => (mkRegOrd "milljónast" "milljónust") ! n ! g ! c
} ; size = pl} ;
pot4 d = {s = \\co => d.s ! NCard Pl Fem (cardOrdCase co) ++ case co of {
NCard _ _ c => milljón ! Pl ! c ;
NOrd n g c => (mkRegOrd "milljónast" "milljónust") ! n ! g ! c
} ; size = pl} ;
pot4plus d e = {s = \\co => d.s ! NCard Pl Fem (cardOrdCase co) ++ milljón ! Pl ! (cardOrdCase co) ++
case co of {
NCard n g c => e.s ! NCard n g c ;
NOrd n g c => "og" ++ e.s ! NOrd n g c
} ; size = pl} ;
pot4as5 n = n ; pot4as5 n = n ;
pot4decimal d = {s = \\co => d.s ! NCard Pl Neutr Nom ++ milljón ! Pl ! (cardOrdCase co) ; size = pl} ;
pot51 = {s = \\co => case co of {
NCard _ _ c => pot01.s ! unit ! NCard Sg Masc c ++ milljarður ! Sg ! c ;
NOrd n g c => (mkRegOrd "milljarðast" "milljörðust") ! n ! g ! c
} ; size = pl} ;
pot5 d = {s = \\co => d.s ! NCard Pl Masc (cardOrdCase co) ++ case co of {
NCard _ _ c => milljarður ! Pl ! c ;
NOrd n g c => (mkRegOrd "milljarðast" "milljörðust") ! n ! g ! c
} ; size = pl} ;
pot5plus d e = {s = \\co => d.s ! NCard Pl Masc (cardOrdCase co) ++ milljarður ! Pl ! (cardOrdCase co) ++
case co of {
NCard n g c => e.s ! NCard n g c ;
NOrd n g c => "og" ++ e.s ! NOrd n g c
} ; size = pl} ;
pot5decimal d = {s = \\co => d.s ! NCard Pl Neutr Nom ++ milljarður ! Pl ! (cardOrdCase co) ; size = pl} ;
oper oper
@@ -169,6 +202,21 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
NOrd n g c => (mkRegOrd "þúsundast" "þúsundust") ! n ! g ! c NOrd n g c => (mkRegOrd "þúsundast" "þúsundust") ! n ! g ! c
} ; } ;
milljón : Number => Case => Str = table {
Sg => caseList "milljón" "milljón" "milljón" "milljónar" ;
Pl => caseList "milljónir" "milljónir" "milljónum" "milljóna"
} ;
milljarður : Number => Case => Str = table {
Sg => caseList "milljarður" "milljarð" "milljarði" "milljarðs" ;
Pl => caseList "milljarðar" "milljarða" "milljörðum" "milljarða"
} ;
cardOrdCase : CardOrd -> Case = \co -> case co of {
NCard _ _ c => c ;
NOrd _ _ c => c
} ;
sizeToNumber : Size -> Number = \size -> case size of { sizeToNumber : Size -> Number = \size -> case size of {
sg => Sg ; sg => Sg ;
_ => Pl _ => Pl
+82 -7
View File
@@ -56,6 +56,56 @@ resource ParadigmsIce = open
dative : Case ; dative : Case ;
genitive : Case ; genitive : Case ;
--2 Invariant closed categories
mkPredet : Str -> Predet = \word -> lin Predet {
s = \\_,_,_ => word
} ;
mkCard : Str -> Number -> Card = \word, number -> lin Card {
s = \\_,_ => word ;
n = number
} ;
mkACard : Str -> ACard = \word -> lin ACard {
s = word
} ;
mkIDet : Str -> Number -> IDet = \word, number -> lin IDet {
s = \\_,_ => word ;
n = number
} ;
mkDet : Str -> Number -> Det = \word, number -> lin Det {
s = \\_,_ => word ;
pron = \\_,_ => [] ;
n = number ;
b = Free ;
d = Strong
} ;
mkQuant : Str -> Quant = \word -> lin Quant {
s = \\_,_,_ => word ;
b = Free ;
d = Strong ;
isPron = False
} ;
detFromA : A -> Number -> Det = \adj, number -> lin Det {
s = \\gender, c => adj.s ! APosit Strong number gender c ;
pron = \\_,_ => [] ;
n = number ;
b = Free ;
d = Strong
} ;
quantFromA : A -> Quant = \adj -> lin Quant {
s = \\number, gender, c => adj.s ! APosit Strong number gender c ;
b = Free ;
d = Strong ;
isPron = False
} ;
--2 Nouns --2 Nouns
-- Nouns are constructed by the function $mkN$, which takes a varying -- Nouns are constructed by the function $mkN$, which takes a varying
@@ -293,8 +343,17 @@ resource ParadigmsIce = open
mkA : (_,_,_ : Str) -> A = mk3A ; mkA : (_,_,_ : Str) -> A = mk3A ;
} ; } ;
mk1A : Str -> A = \s -> lin A (aForms2Adjective mk1A : Str -> A = \s -> case s of {
(weakPosit s s) (strongPosit1 s) (compar1 s) (weakSuperl s s) (strongSuperl1 s) (regAAdv1 s)) ; --- AR 2019-08-08: second arguments of weak declensions were [], producing only endings -- These are not Icelandic masculine citation forms and must not be
-- supplied with Icelandic agreement suffixes.
_ + "ar" => invarA s ;
_ + "i" => invarA s ;
_ => lin A (aForms2Adjective
(weakPosit s s) (strongPosit1 s) (compar1 s) (weakSuperl s s) (strongSuperl1 s) (regAAdv1 s))
} ; --- AR 2019-08-08: second arguments of weak declensions were [], producing only endings
invarA : Str -> A = \s -> lin A (aForms2Adjective
(dInvar s) (dInvar s) (dInvar s) (dInvar s) (dInvar s) s) ;
mk2A : (_,_ : Str) -> A = \mas,fem -> case mas of { mk2A : (_,_ : Str) -> A = \mas,fem -> case mas of {
_ + ("ll"|"nn") => mk1A mas ; ---- AR 2019-08-08 ; the case below does not work _ + ("ll"|"nn") => mk1A mas ; ---- AR 2019-08-08 ; the case below does not work
@@ -314,8 +373,8 @@ resource ParadigmsIce = open
_ + "ill" => dLítill s ; _ + "ill" => dLítill s ;
#consonant* + #vowel + ("ll" | "nn") => dSeinn s ; #consonant* + #vowel + ("ll" | "nn") => dSeinn s ;
stem + "ur" => dFalur s (a2ö stem) ; stem + "ur" => dFalur s (a2ö stem) ;
_ + "i" => dI s ; ---- AR 2019-08-02 guess to prevent failure _ + ("r" | "s" | (#consonant + "n")) => dDýr s ;
_ => dSmár s ---- AR 2019-08-02 guess to prevent failure _ => dInvar s
} ; } ;
strongPosit2 : (_,_ : Str) -> AForms = \mas,fem -> case <mas,fem> of { strongPosit2 : (_,_ : Str) -> AForms = \mas,fem -> case <mas,fem> of {
@@ -459,9 +518,16 @@ resource ParadigmsIce = open
plFemNom plFemAcc plFemDat plFemGen plNeutNom plNeutAcc plNeutDat plNeutGen plFemNom plFemAcc plFemDat plFemGen plNeutNom plNeutAcc plNeutDat plNeutGen
weakSgMascNom weakSgMascAccDatGen weakSgFemNom weakSgFemAccDatGen weakSgNeut weakPl flogið) ; weakSgMascNom weakSgMascAccDatGen weakSgFemNom weakSgFemAccDatGen weakSgNeut weakPl flogið) ;
mkV : V -> Str -> V = \v,part -> v ; mkV : V -> Str -> V = \v,part -> v ** {part = v.part ++ part} ;
}; };
prefixV : Str -> V -> V = \prefix, v -> lin V {
s = \\form => prefix + v.s ! form ;
p = \\form => prefix + v.p ! form ;
refl = v.refl ;
part = v.part
} ;
depV : V -> V = \verb -> lin V (deponentVerb verb) ; depV : V -> V = \verb -> lin V (deponentVerb verb) ;
mk1V : Str -> V = \inf -> mk1V : Str -> V = \inf ->
@@ -488,7 +554,10 @@ resource ParadigmsIce = open
oper mkV2S : V -> V2S = \v -> lin V2S (v ** {c2 = mkPrep "" accusative}) ; oper mkV2S : V -> V2S = \v -> lin V2S (v ** {c2 = mkPrep "" accusative}) ;
oper mkV2A : V -> V2A = \v -> lin V2A (v ** {c2 = mkPrep "" accusative}) ; oper mkV2A : V -> V2A = \v -> lin V2A (v ** {c2 = mkPrep "" accusative}) ;
oper reflV : V -> V = \v -> v; oper reflV = overload {
reflV : V -> V = \v -> lin V (v ** {refl = Reflexive Acc}) ;
reflV : V -> Case -> V = \v,c -> lin V (v ** {refl = Reflexive c})
} ;
indsub1 : Str -> MForms = \inf -> case inf of { indsub1 : Str -> MForms = \inf -> case inf of {
@@ -497,7 +566,13 @@ resource ParadigmsIce = open
stem@(front + "ý" + c) + "ja" => cTelja inf stem (ðiditi (front + "ú" + c)) ; stem@(front + "ý" + c) + "ja" => cTelja inf stem (ðiditi (front + "ú" + c)) ;
stem@(front + "æ" + c) + "ja" => cTelja inf stem (ðiditi (front + "á" + c)) ; stem@(front + "æ" + c) + "ja" => cTelja inf stem (ðiditi (front + "á" + c)) ;
stem + "ja" => cTelja inf stem (ðiditi stem) ; stem + "ja" => cTelja inf stem (ðiditi stem) ;
stem + "a" => cDæma inf (stem + "i") (ðiditi stem) -- With only the infinitive available, the productive -aði class is
-- a substantially better default (borðaði, dansaði, kallaði) than
-- the old -di/-ti guess (borðdi, dansdi). Irregular and i-present
-- verbs can still use the multi-principal-part overloads.
stem@(_ + ("r" | "m" | "f" | "gn" | "nd" | "tt")) + "a"
=> cDæma inf (stem + "i") (ðiditi stem) ;
_ + "a" => cKalla inf (ðiditi inf)
} ; } ;
indsub2 : (_,_ : Str) -> MForms = \telja,tel -> case <telja,tel> of { indsub2 : (_,_ : Str) -> MForms = \telja,tel -> case <telja,tel> of {
+1 -2
View File
@@ -20,8 +20,7 @@ concrete PhraseIce of Phrase = CatIce ** open Prelude, ResIce in {
UttAdv adv = adv ; UttAdv adv = adv ;
UttVP vp = let verb = vp.s ! VPInf ! Pos ! {g = Masc ; n = Sg ; p = P3} UttVP vp = {s = infVP vp} ;
in {s = verb.fin ++ verb.a1.p1 ++ verb.inf ++ verb.a1.p2} ;
UttCN cn = {s = cn.s ! Sg ! Free ! Strong ! Nom ++ cn.comp ! Sg ! Nom} ; UttCN cn = {s = cn.s ! Sg ! Free ! Strong ! Nom ++ cn.comp ! Sg ! Nom} ;
+1 -1
View File
@@ -15,7 +15,7 @@ concrete QuestionIce of Question = CatIce ** open ResIce, Prelude in {
in {s = \\ten,ant,pol,_ => cl.s ! ten ! ant ! pol ! ODir} ; in {s = \\ten,ant,pol,_ => cl.s ! ten ! ant ! pol ! ODir} ;
QuestSlash ip cls = { QuestSlash ip cls = {
s = \\ten,ant,pol,_ => ip.s ! Masc ! Nom ++ cls.s ! ten ! ant ! pol ! ODir ++ cls.c2.s s = \\ten,ant,pol,_ => cls.c2.s ++ ip.s ! Masc ! cls.c2.c ++ cls.s ! ten ! ant ! pol ! OQuestion
} ; } ;
QuestIComp icomp np = QuestIComp icomp np =
+21 -9
View File
@@ -37,6 +37,7 @@ resource ResIce = ParamX ** open Prelude in {
Mood = Indicative | Subjunctive ; Mood = Indicative | Subjunctive ;
Voice = Active | Middle ; Voice = Active | Middle ;
Reflexivity = NonReflexive | Reflexive Case ;
PForm = PWeak Number Gender Case | PStrong Number Gender Case | PPres ; PForm = PWeak Number Gender Case | PStrong Number Gender Case | PPres ;
@@ -130,6 +131,8 @@ param
Verb : Type = { Verb : Type = {
s : VForm => Str ; s : VForm => Str ;
p : PForm => Str ; p : PForm => Str ;
part : Str ;
refl : Reflexivity ;
} ; } ;
mkVoice : Voice -> Str -> Str = \v,s -> mkVoice : Voice -> Str -> Str = \v,s ->
@@ -197,6 +200,8 @@ param
PStrong Pl Neutr c => caseList plNeutNom plNeutAcc plNeutDat plNeutGen ! c ; PStrong Pl Neutr c => caseList plNeutNom plNeutAcc plNeutDat plNeutGen ! c ;
PPres => fljúgandi PPres => fljúgandi
} ; } ;
refl = NonReflexive ;
part = [] ;
} ; } ;
VP : Type = { VP : Type = {
@@ -228,21 +233,28 @@ param
} ; } ;
predV : Verb -> VP = \v -> { predV : Verb -> VP = \v -> {
s = \\vpform,pol,agr => case vpform of { s = \\vpform,pol,agr =>
VPInf => vf (v.s ! vInf) [] (negation pol) False ; let verb = case vpform of {
VPImp => vf (v.s ! VImp Active agr.n) [] (negation pol) False ; VPInf => vf (v.s ! vInf) [] (negation pol) False ;
VPMood ten ant => vff v ten ant pol agr VPImp => vf (v.s ! VImp Active agr.n) [] (negation pol) False ;
VPMood ten ant => vff v ten ant pol agr
}
in verb ** {a1 = <verb.a1.p1, verb.a1.p2 ++ v.part>} ;
p = \\pform => v.p ! pform ++ v.part ;
indObj = \\agr => case v.refl of {
NonReflexive => [] ;
Reflexive c => reflPron agr.p agr.n agr.g c
} ; } ;
p = \\pform => v.p ! pform ;
indObj = \\_ => [] ;
dirObj = \\_ => [] ; dirObj = \\_ => [] ;
a2 = [] ; a2 = [] ;
indShift = False ; indShift = case v.refl of {
NonReflexive => False ;
Reflexive _ => True
} ;
dirShift = False dirShift = False
} ; } ;
predVV : { s : VForm => Str ; p : PForm => Str ; sup : Voice => Str ; c2 : Preposition } -> VP = \vv -> predVV : Verb ** {c2 : Preposition} -> VP = \vv -> predV vv ;
predV {s = vv.s ; p = vv.p} ;
negation : Polarity -> Str = \pol -> case pol of { negation : Polarity -> Str = \pol -> case pol of {
+2
View File
@@ -46,6 +46,8 @@ concrete SentenceIce of Sentence = CatIce ** open Prelude, ResIce in {
} ; } ;
} ; } ;
AdvImp adv imp = {s = \\pol,num => adv.s ++ imp.s ! pol ! num} ;
--2 Embedded sentences --2 Embedded sentences
EmbedS ss = {s = "að" ++ ss.s} ; EmbedS ss = {s = "að" ++ ss.s} ;
+48 -22
View File
@@ -141,6 +141,14 @@ concrete StructuralIce of Structural = CatIce **
but_PConj = ss "en" ; but_PConj = ss "en" ;
how_IAdv = ss "hvernig" ; how_IAdv = ss "hvernig" ;
how8much_IAdv = ss "hversu mikið" ; how8much_IAdv = ss "hversu mikið" ;
how8many_IDet = {
s = table {
Masc => caseList "hversu margir" "hversu marga" "hversu mörgum" "hversu margra" ;
Fem => caseList "hversu margar" "hversu margar" "hversu mörgum" "hversu margra" ;
Neutr => caseList "hversu mörg" "hversu mörg" "hversu mörgum" "hversu margra"
} ;
n = Pl
} ;
if_Subj = ss "ef" ; if_Subj = ss "ef" ;
please_Voc = ss "vinsamlegast" ; please_Voc = ss "vinsamlegast" ;
when_Subj = ss "þegar" ; when_Subj = ss "þegar" ;
@@ -158,34 +166,34 @@ concrete StructuralIce of Structural = CatIce **
-- dont be afraid to be awkward :) -- dont be afraid to be awkward :)
he_Pron = mkPronPers "hann" "hann" "honum" "hans" he_Pron = mkPronPers "hann" "hann" "honum" "hans"
"sinn" "sinn" "sínum" "síns" "sinn" "hans" "hans" "hans"
"sín" "sína" "sinni" "sinnar" "sín" "hans" "hans" "hans"
"sitt" "sitt" "sínu" "síns" "sitt" "hans" "hans" "hans"
"sínir" "sína" "sínum" "sinna" "sínir" "hans" "hans" "hans"
"sínar" "sínar" "sín" "sín" Masc Sg P3 ; "sínar" "hans" "hans" "hans" Masc Sg P3 ;
she_Pron = mkPronPers "hún" "hana" "henni" "hennar" she_Pron = mkPronPers "hún" "hana" "henni" "hennar"
"sinn" "sinn" "sínum" "síns" "sinn" "hennar" "hennar" "hennar"
"sín" "sína" "sinni" "sinnar" "sín" "hennar" "hennar" "hennar"
"sitt" "sitt" "sínu" "síns" "sitt" "hennar" "hennar" "hennar"
"sínir" "sína" "sínum" "sinna" "sínir" "hennar" "hennar" "hennar"
"sínar" "sínar" "sín" "sín" Fem Sg P3 ; "sínar" "hennar" "hennar" "hennar" Fem Sg P3 ;
it_Pron = mkPronPers "það" "það" "því" "þess" it_Pron = mkPronPers "það" "það" "því" "þess"
"sinn" "sinn" "sínum" "síns" "sinn" "þess" "þess" "þess"
"sín" "sína" "sinni" "sinnar" "sín" "þess" "þess" "þess"
"sitt" "sitt" "sínu" "síns" "sitt" "þess" "þess" "þess"
"sínir" "sína" "sínum" "sinna" "sínir" "þess" "þess" "þess"
"sínar" "sínar" "sín" "sín" Neutr Sg P3 ; "sínar" "þess" "þess" "þess" Neutr Sg P3 ;
-- "They" depends on gender,i.e. has 3x4 forms for personal pronouns -- "They" depends on gender,i.e. has 3x4 forms for personal pronouns
-- the masculine is given here, neuter and feminine are given in Extra -- the masculine is given here, neuter and feminine are given in Extra
they_Pron = mkPronPers "þeir" "þá" "þeim" "þeirra" they_Pron = mkPronPers "þeir" "þá" "þeim" "þeirra"
"sinn" "sinn" "sínum" "síns" "sinn" "þeirra" "þeirra" "þeirra"
"sín" "sína" "sinni" "sinnar" "sín" "þeirra" "þeirra" "þeirra"
"sitt" "sitt" "sínu" "síns" "sitt" "þeirra" "þeirra" "þeirra"
"sínir" "sína" "sínum" "sinna" "sínir" "þeirra" "þeirra" "þeirra"
"sínar" "sínar" "sín" "sín" Masc Pl P3 ; "sínar" "þeirra" "þeirra" "þeirra" Masc Pl P3 ;
-- the possesive equivalent, vor, is mostly used in elevated style. -- the possesive equivalent, vor, is mostly used in elevated style.
we_Pron = mkPronPers "við" "okkur" "okkur" "okkar" we_Pron = mkPronPers "við" "okkur" "okkur" "okkar"
@@ -212,12 +220,30 @@ concrete StructuralIce of Structural = CatIce **
-- only in the nominative), and hvert/hvað corresponds to what. -- only in the nominative), and hvert/hvað corresponds to what.
whatSg_IP = { whatSg_IP = {
s = \\_ => caseList "hvað" "hvað" "hverju" "hvers" ; s = \\_ => caseList "hvað" "hvað" "hverju" "hvers" ;
n = Pl n = Sg
} ; } ;
whatPl_IP = { whatPl_IP = {
s = \\_ => caseList "hver" "hver" "hverjum" "hverra" ; s = \\_ => caseList "hver" "hver" "hverjum" "hverra" ;
n = Sg n = Pl
} ;
no_Quant = {
s = table {
Sg => table {
Masc => caseList "enginn" "engan" "engum" "engins" ;
Fem => caseList "engin" "enga" "engri" "engrar" ;
Neutr => caseList "ekkert" "ekkert" "engu" "einskis"
} ;
Pl => table {
Masc => caseList "engir" "enga" "engum" "engra" ;
Fem => caseList "engar" "engar" "engum" "engra" ;
Neutr => caseList "engin" "engin" "engum" "engra"
}
} ;
b = Free ;
d = Strong ;
isPron = False
} ; } ;
-- whoPl_IP = mkIP "who" "whom" "whose" plural ; -- whoPl_IP = mkIP "who" "whom" "whose" plural ;
+7 -7
View File
@@ -5,7 +5,7 @@ concrete VerbIce of Verb = CatIce ** open ResIce, Prelude in {
lin lin
UseV v = predV v; UseV v = predV v;
ComplVV vv vp = insertDir (predV vv) (\\_ => vv.c2.s ++ infVP vp) ; ComplVV vv vp = insertDir (predV vv) (\\a => vv.c2.s ++ infVPPlus vp VPInf Pos a) ;
ComplVS vs s = insertDir (predV vs) (\\_ => s.s) ; ComplVS vs s = insertDir (predV vs) (\\_ => s.s) ;
@@ -29,17 +29,17 @@ concrete VerbIce of Verb = CatIce ** open ResIce, Prelude in {
ComplSlash vps np = insertDir vps (\\a => vps.c2.s ++ np.s ! NCase vps.c2.c ++ vps.dirObj ! np.a ); ComplSlash vps np = insertDir vps (\\a => vps.c2.s ++ np.s ! NCase vps.c2.c ++ vps.dirObj ! np.a );
SlashVV vv vps = (insertDir (predV vv) (\\_ => vv.c2.s ++ infVP vps)) ** {c2 = vps.c2} ; SlashVV vv vps = (insertDir (predV vv) (\\a => vv.c2.s ++ infVPPlus vps VPInf Pos a)) ** {c2 = vps.c2} ;
SlashV2VNP v2v np vps = (insertDir SlashV2VNP v2v np vps = (insertDir
(predV v2v) (predV v2v)
(\\_ => v2v.c2.s ++ np.s ! NCase v2v.c2.c ++ v2v.c3.s ++ infVP vps) (\\_ => v2v.c2.s ++ np.s ! NCase v2v.c2.c ++ v2v.c3.s ++ infVPPlus vps VPInf Pos np.a)
) ** {c2 = vps.c2} ; ) ** {c2 = vps.c2} ;
ReflVP vps = (insertInd ReflVP vps = (insertDir
vps vps
(\\a => vps.indObj ! a ++ reflPron a.p a.n a.g vps.c2.c ++ vps.c2.s) (\\a => vps.c2.s ++ reflPron a.p a.n a.g vps.c2.c ++ vps.dirObj ! a)
) ** {indShift = True} ; ) ** {dirShift = True} ;
UseComp comp = insertDir (predV verbBe) (\\a => comp.s ! a) ; UseComp comp = insertDir (predV verbBe) (\\a => comp.s ! a) ;
@@ -88,7 +88,7 @@ concrete VerbIce of Verb = CatIce ** open ResIce, Prelude in {
} ; } ;
insertInd : ResIce.VP -> (Agr => Str) -> ResIce.VP =\vp,obj -> vp ** { insertInd : ResIce.VP -> (Agr => Str) -> ResIce.VP =\vp,obj -> vp ** {
indObj = obj indObj = \\a => vp.indObj ! a ++ obj ! a
} ; } ;
insertAdV : Str -> ResIce.VP -> ResIce.VP = \adv,vp -> vp ** { insertAdV : Str -> ResIce.VP -> ResIce.VP = \adv,vp -> vp ** {