8 Commits

Author SHA1 Message Date
Krasimir Angelov
deb9d40b7e placeholders for morphological functions 2026-04-04 11:18:04 +02:00
Krasimir Angelov
25f422f5ca Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2026-04-03 16:57:43 +02:00
Krasimir Angelov
f0abf5deff added compoundV 2026-04-03 16:55:51 +02:00
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
10 changed files with 291 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) ;

View File

@@ -45,5 +45,7 @@ lincat VPSlash = {present : Aspect => Number => Person => Str;
lincat Cl = {present : Aspect => Str;
aorist : Str;
participle : {aorist : Aspect => Str; perfect : Aspect => Str}} ;
lincat IP = {s : Str} ;
lincat Subj = {s : Str} ;
}

View File

@@ -1086,6 +1086,23 @@ dualV : V -> V -> V = \impf,perf -> lin V
isRefl = impf.isRefl
} ;
compoundV = overload {
compoundV : V -> Str -> V = \v,s -> lin V {
present = \\a,n,p => v.present ! a ! n ! p ++ s ;
aorist = \\n,p => v.aorist ! n ! p ++ s ;
imperfect = \\a,n,p => v.imperfect ! a ! n ! p ++ s ;
imperative = \\a,n => v.imperative ! a ! n ++ s ;
participle = { aorist = \\a,gn => v.participle.aorist ! a ! gn ++ s ;
imperfect = \\gn => v.participle.imperfect ! gn ++ s ;
perfect = \\a => v.participle.perfect ! a ++ s ;
adjectival = \\a => v.participle.adjectival ! a ++ s ;
adverbial = v.participle.adverbial
} ;
noun_from_verb = v.noun_from_verb ++ s ;
isRefl = v.isRefl
}
} ;
mkV2 = overload {
mkV2 : V -> V2 = \v -> lin V2 v ** {c2=noPrep} ;
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 v ** {c2=p} ;
@@ -1142,4 +1159,19 @@ mkVoc : Str -> Voc = \s -> lin Voc {s=s} ;
mkPrep : Str -> Prep = \s -> lin Prep {s=s} ;
noPrep : Prep = lin Prep {s=""} ;
mkIP : Str -> IP = \s -> lin IP {s=s} ;
mkIAdv : Str -> IAdv = \s -> lin IAdv {s=s} ;
mkIQuant : Str -> IQuant = \s -> lin IQuant {s=s} ;
mkIDet : Str -> IDet = \s -> lin IDet {s=s} ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre = False} ;
mkSubj : Str -> Subj = \s -> lin Subj {s=s} ;
mkQuant : Str -> Quant = \s -> lin Quant {s=s; sp=Indef} ;
mkDet : Str -> Det = \s -> lin Det {s=s; n=Sg; sp=Indef} ;
mkConj : Str -> Conj = \s -> lin Conj {s=s} ;
mkPConj : Str -> PConj = \s -> lin PConj {s=s} ;
mkPredet : Str -> Predet = \s -> lin Predet {s=s} ;
mkCAdv : Str -> CAdv = \s -> lin CAdv {s=s; p=""} ;
mkCard : Str -> Card = \s -> lin Card {s=s} ;
mkACard : Str -> ACard = \s -> lin ACard {s=s} ;
}