forked from GitHub/gf-rgl
Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl
This commit is contained in:
@@ -1,2 +1,6 @@
|
|||||||
concrete GrammarHye of Grammar = TenseX ** {
|
concrete GrammarHye of Grammar =
|
||||||
|
TenseX,
|
||||||
|
PhraseHye,
|
||||||
|
NounHye,
|
||||||
|
AdjectiveHye ** {
|
||||||
}
|
}
|
||||||
@@ -16,4 +16,5 @@ lincat S = {s : Str} ;
|
|||||||
|
|
||||||
lincat LN,SN,GN,PN = {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
@@ -501,7 +501,9 @@ oper
|
|||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : Str -> V = regV; -- Nonfinite
|
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 ;
|
mkVV : V -> VV = \v -> lin VV v ;
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Adj =
|
|||||||
param Tense = Past | Pres ;
|
param Tense = Past | Pres ;
|
||||||
param PersNum = PSg Person | PPl ;
|
param PersNum = PSg Person | PPl ;
|
||||||
param Person = P1 | P3 | P2 ;
|
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 =
|
oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
|
||||||
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14 ->
|
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14 ->
|
||||||
{ Converb = f1 ;
|
{ Converb = f1 ;
|
||||||
@@ -118,7 +118,8 @@ oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
|
|||||||
Participle = table {
|
Participle = table {
|
||||||
Pres => f13 ;
|
Pres => f13 ;
|
||||||
Past => f14
|
Past => f14
|
||||||
}
|
} ;
|
||||||
|
particle = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -249,11 +249,23 @@ resource ParadigmsIce = open
|
|||||||
in lin N (nForms2Noun nfs (nForms2Suffix nfs gend) gend) ;
|
in lin N (nForms2Noun nfs (nForms2Suffix nfs gend) gend) ;
|
||||||
|
|
||||||
mkPN = overload {
|
mkPN = overload {
|
||||||
|
|
||||||
-- this should be merged or swithced with N -> Gender
|
-- this should be merged or swithced with N -> Gender
|
||||||
mkPN : Str -> Gender -> PN =
|
mkPN : Str -> Gender -> PN
|
||||||
\name,g -> regPN name g ;
|
= \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} ;
|
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 {
|
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 + "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 + "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 + "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} ;
|
<base + "s",Masc> => lin PN {s = caseList name name (name + "i") (name + "ar") ; g = Masc} ;
|
||||||
|
|||||||
@@ -83,6 +83,6 @@ flags coding = utf8 ;
|
|||||||
-- counter : Str ; counterReplace : Bool ; counterTsu : Bool} ;
|
-- counter : Str ; counterReplace : Bool ; counterTsu : Bool} ;
|
||||||
N2 = Noun ** {prep : Str; object : Style => Str} ;
|
N2 = Noun ** {prep : Str; object : Style => Str} ;
|
||||||
N3 = Noun ** {prep1 : Str; prep2 : Str} ;
|
N3 = Noun ** {prep1 : Str; prep2 : Str} ;
|
||||||
PN = PropNoun ; -- {s : Style => Str ; anim : Animateness} ;
|
PN,LN,GN,SN = PropNoun ; -- {s : Style => Str ; anim : Animateness} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ oper
|
|||||||
= \jon,jonsan -> lin PN (personPN jon jonsan)
|
= \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 = overload {
|
||||||
mkPron : (kare : Str) -> (Pron1Sg : Bool) -> (anim : Animacy) -> Pron
|
mkPron : (kare : Str) -> (Pron1Sg : Bool) -> (anim : Animacy) -> Pron
|
||||||
= \kare,b,a -> lin Pron (regPron kare b a) ;
|
= \kare,b,a -> lin Pron (regPron kare b a) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user