5 Commits

Author SHA1 Message Date
Inari Listenmaa
e825d92233 (Fao) add particle to verbs e.g. "fara út" 2026-04-01 16:27:14 +02:00
Inari Listenmaa
1e436d84a1 (Ice) handle PNs that consist of multiple words 2026-04-01 16:26:14 +02:00
Inari Listenmaa
84e0e2c08f (Jpn) add GN, LN, SN + constructors 2026-04-01 16:21:58 +02:00
Inari Listenmaa
4c55592af4 make it not crash on mkPN "Jósefína" feminine 2026-04-01 15:41:22 +02:00
Inari Listenmaa
28be4fb450 add existing modules to GrammarHye 2026-04-01 15:28:28 +02:00
8 changed files with 257 additions and 121 deletions

View File

@@ -1,2 +1,6 @@
concrete GrammarHye of Grammar = TenseX ** {
concrete GrammarHye of Grammar =
TenseX,
PhraseHye,
NounHye,
AdjectiveHye ** {
}

View File

@@ -16,4 +16,5 @@ lincat S = {s : Str} ;
lincat LN,SN,GN,PN = {s : Str} ;
linref V = \v -> v.Nonfinite ++ v.particle ;
}

File diff suppressed because it is too large Load Diff

View File

@@ -501,7 +501,9 @@ oper
mkV = overload {
mkV : Str -> V = regV; -- Nonfinite
mkV : Str -> Str -> V = reg2V -- Nonfinite Indicative;Pres;('PSg', P2)
mkV : Str -> Str -> V = reg2V ; -- Nonfinite Indicative;Pres;('PSg', P2)
mkV : V -> Str -> V -- particle verb
= \v,p -> v ** {particle = p}
} ;
mkVV : V -> VV = \v -> lin VV v ;

View File

@@ -92,7 +92,7 @@ oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Adj =
param Tense = Past | Pres ;
param PersNum = PSg Person | PPl ;
param Person = P1 | P3 | P2 ;
oper Verb = {Converb: Str; Imperative_Jussive: Number => Str; Indicative: Tense => PersNum => Str; Nonfinite: Str; Participle: Tense => Str} ; -- 596
oper Verb = {Converb: Str; Imperative_Jussive: Number => Str; Indicative: Tense => PersNum => Str; Nonfinite: Str; Participle: Tense => Str ; particle : Str} ; -- 596
oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14 ->
{ Converb = f1 ;
@@ -118,7 +118,8 @@ oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
Participle = table {
Pres => f13 ;
Past => f14
}
} ;
particle = []
} ;

View File

@@ -249,11 +249,23 @@ resource ParadigmsIce = open
in lin N (nForms2Noun nfs (nForms2Suffix nfs gend) gend) ;
mkPN = overload {
-- this should be merged or swithced with N -> Gender
mkPN : Str -> Gender -> PN =
\name,g -> regPN name g ;
mkPN : Str -> Gender -> PN
= \name,g -> case name of {
head + " " + suf => suffixPN (regPN head g) suf ; -- fallback: use explicit constructors for more precision
_ => regPN name g } ;
mkPN : PN -> Str -> PN -- mkPN (mkPN "Annar" ) "í jólum"
= suffixPN ;
mkPN : Str -> PN -> PN -- mkPN "Sameinuðu" (mkPN "þjóðirnar")
= prefixPN
} ;
foreignPN : Str -> PN = \name -> lin PN {s = \\_ => name ; g = Masc} ;
prefixPN : Str -> PN -> PN = \prefix,pn -> pn ** {
s = \\c => prefix ++ pn.s ! c
} ;
suffixPN : PN -> Str -> PN = \pn,suffix -> pn ** {
s = \\c => pn.s ! c ++ suffix
} ;
oper mkLN : Str -> LN = \s -> lin LN {s=s} ;
@@ -810,7 +822,7 @@ resource ParadigmsIce = open
regPN : Str -> Gender -> PN = \name,g -> case <name,g> of {
<base + "i",Masc> => lin PN {s = caseList name (base + "a") (base + "a") (base + "a") ; g = Masc} ;
<base + "a",Masc> => lin PN {s = caseList name (base + "u") (base + "u") (base + "u") ; g = Masc} ;
<base + "a",g> => lin PN {s = caseList name (base + "u") (base + "u") (base + "u") ; g = g} ;
<base + "ur",Masc> => lin PN {s = caseList name base (base + "i") (base + "s") ; g = Masc} ;
<base + "l",Masc> => lin PN {s = caseList name name name (name + "s") ; g = Masc} ;
<base + "s",Masc> => lin PN {s = caseList name name (name + "i") (name + "ar") ; g = Masc} ;

View File

@@ -83,6 +83,6 @@ flags coding = utf8 ;
-- counter : Str ; counterReplace : Bool ; counterTsu : Bool} ;
N2 = Noun ** {prep : Str; object : Style => Str} ;
N3 = Noun ** {prep1 : Str; prep2 : Str} ;
PN = PropNoun ; -- {s : Style => Str ; anim : Animateness} ;
PN,LN,GN,SN = PropNoun ; -- {s : Style => Str ; anim : Animateness} ;
}

View File

@@ -50,6 +50,10 @@ oper
= \jon,jonsan -> lin PN (personPN jon jonsan)
} ;
mkGN : Str -> GN = \s -> lin GN (regPN s);
mkLN : Str -> LN = \s -> lin LN (regPN s);
mkSN : Str -> SN = \s -> lin SN (regPN s);
mkPron = overload {
mkPron : (kare : Str) -> (Pron1Sg : Bool) -> (anim : Animacy) -> Pron
= \kare,b,a -> lin Pron (regPron kare b a) ;