mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl
This commit is contained in:
6
doc/example-tables.gfs
Normal file
6
doc/example-tables.gfs
Normal file
@@ -0,0 +1,6 @@
|
||||
-- gf -run alltenses/LangIce.gfo <example-tables.gfs
|
||||
|
||||
gt MkDocument (NoDefinition "") (InflectionN ?) "" | l | wf -file="example-tables.html"
|
||||
gt MkDocument (NoDefinition "") (InflectionA ?) "" | l | wf -append -file="example-tables.html"
|
||||
gt MkDocument (NoDefinition "") (InflectionV ?) "" | l | wf -append -file="example-tables.html"
|
||||
gt MkDocument (NoDefinition "") (InflectionV2 ?) "" | l | wf -append -file="example-tables.html"
|
||||
@@ -8,18 +8,18 @@ FocusObjS nsubj head -- again might be wrong; more correct to call
|
||||
QuestIAdv advmod head -- "where does John sleep" cf. AdvVP
|
||||
QuestIComp head nsubj -- "where is John": John is clearly nsubj, but is where the head?
|
||||
QuestQVP nsubj head
|
||||
QuestSlash dobj head
|
||||
QuestSlash obj head
|
||||
QuestVP nsubj head
|
||||
IdetCN det head
|
||||
|
||||
PredSCVP csubj head
|
||||
|
||||
ComplSlash head dobj
|
||||
ComplSlashIP head dobj
|
||||
Slash3V3 head dobj
|
||||
SlashV2VNP head dobj xcomp
|
||||
PastPartAgentAP head dobj
|
||||
AdvQVP head dobj
|
||||
ComplSlash head obj
|
||||
ComplSlashIP head obj
|
||||
Slash3V3 head obj
|
||||
SlashV2VNP head obj xcomp
|
||||
PastPartAgentAP head obj
|
||||
AdvQVP head obj
|
||||
|
||||
Slash2V3 head iobj
|
||||
|
||||
@@ -157,12 +157,12 @@ TExclMark head dep -- punctuation in the middle in these three
|
||||
TFullStop head dep
|
||||
TQuestMark head dep
|
||||
|
||||
ComplV2 head dobj -- shortcuts in App
|
||||
ComplV2V head dobj xcomp
|
||||
ComplV3 head iobj dobj ---- could be dobj dobj
|
||||
ComplV2 head obj -- shortcuts in App
|
||||
ComplV2V head obj xcomp
|
||||
ComplV3 head iobj obj ---- could be dobj dobj
|
||||
PassAgentV2 head ncomp -- not sure
|
||||
RelV2 mark nsubj head
|
||||
QuestV2 dobj nsubj head
|
||||
QuestV2 obj nsubj head
|
||||
|
||||
ModCN amod head -- in ResourceDemo
|
||||
RSubjS mark advcl head
|
||||
|
||||
@@ -105,6 +105,10 @@ abstract Extend = Cat ** {
|
||||
|
||||
NominalizeVPSlashNP : VPSlash -> NP -> NP ;
|
||||
|
||||
-- counterpart to ProgrVP, for VPSlash
|
||||
|
||||
ProgrVPSlash : VPSlash -> VPSlash;
|
||||
|
||||
-- existential for mathematics
|
||||
|
||||
ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers
|
||||
|
||||
@@ -17,6 +17,10 @@ fun
|
||||
verb_Category : Category ;
|
||||
adverb_Category : Category ;
|
||||
preposition_Category : Category ;
|
||||
numeral_Category : Category ;
|
||||
pronoun_Category : Category ;
|
||||
determiner_Category : Category ;
|
||||
article_Category : Category ;
|
||||
|
||||
number_ParameterType : ParameterType ;
|
||||
gender_ParameterType : ParameterType ;
|
||||
@@ -65,6 +69,7 @@ fun
|
||||
|
||||
active_Parameter : Parameter ;
|
||||
passive_Parameter : Parameter ;
|
||||
middle_Parameter : Parameter ;
|
||||
|
||||
present_Parameter : Parameter ;
|
||||
past_Parameter : Parameter ;
|
||||
@@ -99,6 +104,9 @@ fun
|
||||
short_Parameter : Parameter ; -- short form of e.g. a Fin infinitive
|
||||
long_Parameter : Parameter ;
|
||||
|
||||
strong_Parameter : Parameter ; -- German adjective declensions
|
||||
weak_Parameter : Parameter ;
|
||||
|
||||
finite_Modifier : Modifier ;
|
||||
transitive_Modifier : Modifier ;
|
||||
nominal_Modifier : Modifier ;
|
||||
|
||||
@@ -367,7 +367,9 @@ resource ParadigmsAra = open
|
||||
mkN : Species -> N -> N
|
||||
= \p,n -> n ** {h = p} ;
|
||||
mkN : (sg,pl : Str) -> Gender -> Species -> N
|
||||
= \sg,pl -> mkFullN (reg sg pl) ;
|
||||
= \sg,pl -> case <sg,pl> of {
|
||||
<x@(_ + "ة") + #vow*, _ + "ات" + #vow*> => mkFullN (sndf x) ; -- extra safety: if someone gives case marking to the constructor, ignore it
|
||||
_ => mkFullN (reg sg pl) } ;
|
||||
mkN : NTable -> Gender -> Species -> N -- TO BE DEPRECATED; kept for backwards-compatibility. For the same behaviour, use either the constructor above, sdfN or sdmN.
|
||||
= mkFullN ;
|
||||
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N -- broken plural
|
||||
|
||||
@@ -40,7 +40,7 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
||||
} ;
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\a,p => ap.s ! a ! p ++ sc.s ! {gn=aform2gennum a; p=p} ;
|
||||
s = \\a,p => ap.s ! a ! p ++ sc.s ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--# -coding=utf8
|
||||
concrete CatBul of Cat = CommonX - [IAdv,AdV,SC] ** open ResBul, Prelude, Predef, (R = ParamX) in {
|
||||
concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (R = ParamX) in {
|
||||
|
||||
lincat
|
||||
-- Tensed/Untensed
|
||||
@@ -46,7 +46,6 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV,SC] ** open ResBul, Prelude, Predef
|
||||
|
||||
IAdv = {s : QForm => Str} ;
|
||||
AdV = {s : Str; p : Polarity} ;
|
||||
SC = {s : Agr => Str} ;
|
||||
|
||||
-- Noun
|
||||
|
||||
|
||||
53209
src/bulgarian/DictBul.gf
53209
src/bulgarian/DictBul.gf
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -193,7 +193,7 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
SentCN cn sc = {s = \\nf => cn.s ! nf ++ sc.s ! agrP3 (gennum cn.g (numNForm nf)); g=cn.g} ;
|
||||
SentCN cn sc = {s = \\nf => cn.s ! nf ++ sc.s; g=cn.g} ;
|
||||
|
||||
ApposCN cn np = {s = \\nf => cn.s ! nf ++ np.s ! RSubj; g=cn.g} ;
|
||||
|
||||
|
||||
@@ -61,11 +61,15 @@ oper
|
||||
mkN002a base = let v0 = tk 2 base;
|
||||
v1 = last (base);
|
||||
g = AMasc NonHuman
|
||||
in {s = mkNoun (v0+"˙"+v1)
|
||||
(v0+"ĺ"+v1+"îâĺ")
|
||||
(v0+"˙"+v1+"ŕ")
|
||||
(v0+"˙"+v1)
|
||||
g ;
|
||||
in {s = table {
|
||||
NF Sg Indef => v0+"˙"+v1 ;
|
||||
NF Sg Def => v0+"˙"+v1+"ŕ" ;
|
||||
NF Pl Indef => v0+"ĺ"+v1+"îâĺ" ;
|
||||
NF Pl Def => v0+"ĺ"+v1+"îâĺňĺ" ;
|
||||
NFSgDefNom => v0+"ĺ"+v1+"ŕ" ;
|
||||
NFPlCount => v0+"˙"+v1+"ŕ" ;
|
||||
NFVocative => v0+"˙"+v1
|
||||
} ;
|
||||
rel = \\_ => base ; relPost = False ;
|
||||
g = g ;
|
||||
lock_N = <>
|
||||
|
||||
@@ -11,7 +11,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
VMedial _ => np.s ! RSubj ;
|
||||
VPhrasal c => linCase c (personPol np.p) ++ np.s ! RObj CPrep}) np.gn np.p vp ;
|
||||
|
||||
PredSCVP sc vp = mkClause (sc.s ! {gn=GSg Masc; p=P3}) (GSg Masc) (NounP3 Pos) vp ;
|
||||
PredSCVP sc vp = mkClause sc.s (GSg Masc) (NounP3 Pos) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\p,gn =>
|
||||
@@ -55,9 +55,9 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
EmbedS s = {s = \\_ => "֌" ++ s.s} ;
|
||||
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = \\agr => daComplex Simul vp.p vp ! Perf ! agr} ;
|
||||
EmbedS s = {s = "֌" ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = daComplex Simul vp.p vp ! Perf ! agrP3 (GSg Masc)} ;
|
||||
|
||||
UseCl t p cl = {
|
||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Main
|
||||
|
||||
@@ -50,6 +50,7 @@ lin
|
||||
PastPartAP = variants {} ; -- VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
PastPartAgentAP = variants {} ; -- VPSlash -> NP -> AP ; -- (opportunity) lost by the company
|
||||
NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ;
|
||||
ProgrVPSlash = variants {} ; -- VPSlash -> VPSlash ;
|
||||
ExistsNP = ExistNP ; -- NP -> Cl ; -- there exists a number / there exist numbers
|
||||
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
|
||||
ExistMassCN cn = ExistNP (MassNP cn) ;
|
||||
|
||||
@@ -6,7 +6,7 @@ src:
|
||||
runghc MkMini.hs
|
||||
|
||||
compdemo:
|
||||
$(compile) Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd
|
||||
$(compile) Afr Ara Bul Cat Chi Dan Dut Eng Est Eus Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Por Ron Rus Snd Spa Swe Tha Urd
|
||||
|
||||
linkdemo:
|
||||
$(compile) -link Afr Bul Cat Chi Dan Dut Eng Est Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd
|
||||
$(compile) -link Afr Ara Bul Cat Chi Dan Dut Eng Est Eus Fin Fre Ger Gre Hin Ice Ita Jpn Lav Mlt Mon Nep Nor Nno Pes Pnb Pol Por Ron Rus Snd Spa Swe Tha Urd
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
src = "Eng"
|
||||
langs = [
|
||||
"Afr","Bul","Cat","Chi","Dan","Dut",
|
||||
"Est","Fin","Fre","Ger","Gre","Hin",
|
||||
"Afr","Ara","Bul","Cat","Chi","Dan","Dut",
|
||||
"Est","Eus","Fin","Fre","Ger","Gre","Hin",
|
||||
"Ice","Ita","Jpn","Lav","Mlt","Mon",
|
||||
"Nep","Nor","Nno","Pes","Pol","Pnb",
|
||||
"Ron","Rus","Snd","Spa","Swe","Tha",
|
||||
"Urd"
|
||||
"Nep","Nor","Nno","Pes","Pol","Por","Pnb",
|
||||
"Ron","Rus","Snd","Spa","Swe","Tha","Urd"
|
||||
]
|
||||
|
||||
file lng = "ResourceDemo" ++ lng ++ ".gf"
|
||||
|
||||
6
src/demo/ResourceDemo.pgf_info
Normal file
6
src/demo/ResourceDemo.pgf_info
Normal file
@@ -0,0 +1,6 @@
|
||||
ResourceDemo is a good place to start investigating linguistic structures in the GF Resource Grammar Library.
|
||||
|
||||
It is a slightly simplified version of the full RGL, aimed for reducing ambiguity and supporting fast parsing.
|
||||
It also supports the display of dependency trees using the UD (Universal Dependencies) schema.
|
||||
(However, for most languages, some dummy 'dep' labels are still in use in the UD trees.)
|
||||
|
||||
@@ -172,6 +172,6 @@ lin
|
||||
numeralDet n = S.mkDet <n : Numeral> ;
|
||||
RSubjS subj a b = mkS (S.mkAdv <subj : Subj> <a : S>) b ;
|
||||
SlashV2 np v2 = mkClSlash np v2 ;
|
||||
SlashPrep cl p = mkClSlash (lin Cl cl) <p : Prep> ;
|
||||
---- SlashPrep cl p = mkClSlash (lin Cl cl) <p : Prep> ;
|
||||
RAdvCN cn p pp = mkCN <lin CN cn : CN> (mkAdv <p : Prep> <pp : NP>) ;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
|
||||
} ;
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\a => ap.s ! a ++ sc.s ! a ;
|
||||
s = \\a => ap.s ! a ++ sc.s ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete CatEng of Cat = CommonX - [Pol,SC,CAdv] ** open ResEng, Prelude in {
|
||||
concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -49,7 +49,6 @@ concrete CatEng of Cat = CommonX - [Pol,SC,CAdv] ** open ResEng, Prelude in {
|
||||
-- Adjective
|
||||
|
||||
AP = {s : Agr => Str ; isPre : Bool} ;
|
||||
SC = {s : Agr => Str} ;
|
||||
|
||||
-- Noun
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ concrete ExtendEng of Extend =
|
||||
ExistsNP, ExistCN, ExistMassCN, ExistPluralCN,
|
||||
FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
|
||||
PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
EmbedSSlash, PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
||||
]
|
||||
@@ -150,7 +150,7 @@ concrete ExtendEng of Extend =
|
||||
isPre = vp.isSimple -- depends on whether there are complements
|
||||
} ;
|
||||
|
||||
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp False Simul CPos a} ;
|
||||
EmbedPresPart vp = {s = infVP VVPresPart vp False Simul CPos (agrP3 Sg)} ;
|
||||
|
||||
PastPartAP vp = {
|
||||
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ vp.ext ;
|
||||
@@ -193,7 +193,7 @@ concrete ExtendEng of Extend =
|
||||
|
||||
PredIAdvVP iadv vp = {s = \\t,a,p,q => iadv.s ++ infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
|
||||
|
||||
EmbedSSlash s = {s = \\_ => "what" ++ s.s ++ s.c2} ;
|
||||
EmbedSSlash s = {s = "what" ++ s.s ++ s.c2} ;
|
||||
|
||||
NominalizeVPSlashNP vpslash np =
|
||||
let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ;
|
||||
@@ -222,6 +222,8 @@ concrete ExtendEng of Extend =
|
||||
lin
|
||||
PassVPSlash vps = passVPSlash (lin VPS vps) [] ;
|
||||
PassAgentVPSlash vps np = passVPSlash (lin VPS vps) ("by" ++ np.s ! NPAcc) ;
|
||||
ProgrVPSlash vp = insertObjc (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a)
|
||||
(predAux auxBe ** {c2 = vp.c2; gapInMiddle = vp.gapInMiddle; missingAdv = vp.missingAdv});
|
||||
|
||||
--- AR 7/3/2013
|
||||
ComplSlashPartLast vps np = case vps.gapInMiddle of {
|
||||
|
||||
@@ -91,7 +91,7 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
isPre = vp.isSimple -- depends on whether there are complements
|
||||
} ;
|
||||
|
||||
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp False Simul CPos a} ; --- agr
|
||||
EmbedPresPart vp = {s = infVP VVPresPart vp False Simul CPos (agrP3 Sg)} ; --- agr
|
||||
|
||||
UttVPShort vp = {s = infVP VVAux vp False Simul CPos (agrP3 Sg)} ;
|
||||
|
||||
|
||||
@@ -24,7 +24,13 @@ PossNP,PartNP {"of"} ADP case nmod
|
||||
@VS Inf Pres PastPart PresPart Past
|
||||
@Quant Sg Pl Sg Pl -- and many more
|
||||
@Det Nom Gen Acc
|
||||
@A Pos PosGen Comp CompGen Sup SupGen
|
||||
@A Posit PosGen Comp CompGen Sup SupGen
|
||||
@"did" Past
|
||||
@"does" PresSg
|
||||
@"do" Pres
|
||||
@"have" Inf
|
||||
@"would" Cond
|
||||
@"not" Neg
|
||||
@"am" PresSg1
|
||||
@"is" PresSg3
|
||||
@"are" PresPl
|
||||
|
||||
@@ -149,7 +149,7 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
||||
} ;
|
||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
|
||||
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ! agrgP3 n cn.g ; g = cn.g} ;
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
||||
|
||||
ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! NCase c ; g = cn.g} ;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
PredVP np vp = mkClause (np.s ! npNom) np.a vp ;
|
||||
|
||||
PredSCVP sc vp = let a = agrP3 Sg in mkClause (sc.s ! a) a vp ;
|
||||
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
@@ -37,9 +37,9 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
(insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = \\_ => conjThat ++ s.s} ;
|
||||
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = \\a => infVP VVInf vp False Simul CPos a} ;
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
|
||||
|
||||
UseCl t p cl = {
|
||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! oDir
|
||||
|
||||
@@ -22,6 +22,10 @@ lin
|
||||
verb_Category = mkN "verb" ;
|
||||
adverb_Category = mkN "adverb" ;
|
||||
preposition_Category = mkN "preposition" ;
|
||||
numeral_Category = mkN "numeral" ;
|
||||
pronoun_Category = mkN "pronoun" ;
|
||||
determiner_Category = mkN "determiner" ;
|
||||
article_Category = mkN "article" ;
|
||||
|
||||
gender_ParameterType = mkN "Gender" ;
|
||||
finite_form_ParameterType = mkN "finite form" ;
|
||||
@@ -55,6 +59,7 @@ lin
|
||||
|
||||
active_Parameter = mkN "active" ;
|
||||
passive_Parameter = mkN "passive" ;
|
||||
middle_Parameter = mkN "middle" ;
|
||||
|
||||
imperative_Parameter = mkN "imperative" ;
|
||||
indicative_Parameter = mkN "indicative" ;
|
||||
@@ -85,9 +90,12 @@ lin
|
||||
predicative_Parameter = mkN "predicative" ;
|
||||
negative_Parameter = mkN "negative" ;
|
||||
|
||||
short_Parameter = mkN "short" ;
|
||||
short_Parameter = mkN "short" ; --- adjective
|
||||
long_Parameter = mkN "long" ;
|
||||
|
||||
strong_Parameter = mkN "strong" ; --- adjective
|
||||
weak_Parameter = mkN "weak" ;
|
||||
|
||||
nounHeading n = ss (n.s ! Sg ! Nom) ;
|
||||
nounPluralHeading n = ss (n.s ! Pl ! Nom) ;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete ConjunctionEst of Conjunction =
|
||||
concrete ConjunctionEst of Conjunction =
|
||||
CatEst ** open ResEst, Coordination, Prelude in {
|
||||
|
||||
flags optimize=all_subs ; coding=utf8;
|
||||
@@ -9,16 +9,14 @@ concrete ConjunctionEst of Conjunction =
|
||||
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
|
||||
ConjCN = conjunctDistrTable NForm ;
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
||||
a = conjAgr (Ag conj.n P3) ss.a ; -- P3 is the maximum
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
-- ConjAP conj ss = conjunctDistrTable2 Bool NForm conj ss ** {
|
||||
ConjAP conj ss = conjunctDistrTableAdj conj ss ** {
|
||||
infl = ss.s2.infl ; ---- was: True, which is of wrong type. AR 1/2/2014
|
||||
lock_AP = <>
|
||||
} ;
|
||||
ConjAP conj ss = conjunctDistrTableAdj conj ss ;
|
||||
|
||||
ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
c = ss.c
|
||||
@@ -30,80 +28,78 @@ concrete ConjunctionEst of Conjunction =
|
||||
ConsS = consrSS comma ;
|
||||
BaseAdv = twoSS ;
|
||||
ConsAdv = consrSS comma ;
|
||||
BaseCN = twoTable NForm ;
|
||||
ConsCN = consrTable NForm comma ;
|
||||
BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a} ;
|
||||
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseAP x y = twoTableAdj x y ;
|
||||
ConsAP xs x = consrTableAdj comma x xs ;
|
||||
-- BaseAP x y = twoTable2 Bool NForm x y ;
|
||||
-- ConsAP xs x = consrTable2 Bool NForm comma xs x ;
|
||||
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[CN] = {s1,s2 : NForm => Str} ;
|
||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : {s : Bool => NForm => Str ; infl : Infl }} ;
|
||||
[AP] = {s1,s2 : {s : Bool => NForm => Str ; infl : Infl }} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
||||
|
||||
|
||||
oper
|
||||
--Modified from prelude/Coordination.gf generic functions
|
||||
twoTableAdj : (_,_ : AP) -> [AP] = \x,y ->
|
||||
lin ListAP {
|
||||
s1 = x ;
|
||||
s2 = y ;
|
||||
lock_ListAP = <>
|
||||
} ;
|
||||
|
||||
s1 = x ;
|
||||
s2 = y
|
||||
} ;
|
||||
|
||||
consrTableAdj : Str -> [AP] -> {s : Bool => NForm => Str ; infl : Infl} -> [AP] = \c,xs,x ->
|
||||
let
|
||||
ap1 = xs.s1 ;
|
||||
ap2 = xs.s2
|
||||
in
|
||||
lin ListAP {s1 =
|
||||
ap1 = xs.s1 ;
|
||||
ap2 = xs.s2
|
||||
in
|
||||
lin ListAP {s1 =
|
||||
{s = \\isMod,nf =>
|
||||
case isMod of {
|
||||
True => case <ap1.infl, ap2.infl> of {
|
||||
<(Participle|Invariable),(Participle|Invariable)> =>
|
||||
ap1.s ! isMod ! (NCase Sg Nom) ++ c ++ ap2.s ! isMod ! (NCase Sg Nom) ; --valmis ja täis kassid
|
||||
<(Participle|Invariable),Regular> =>
|
||||
ap1.s ! isMod ! (NCase Sg Nom) ++ c++ ap2.s ! isMod ! nf ; --valmis ja suured kassid
|
||||
<Regular,(Participle|Invariable)> =>
|
||||
ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! (NCase Sg Nom) ; --suured ja valmis kassid
|
||||
_ => ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! nf --suured ja mustad kassid
|
||||
} ;
|
||||
False => ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! nf --kassid on valmid ja suured
|
||||
} ;
|
||||
infl = Regular ;
|
||||
lock_AP = <> } ;
|
||||
case isMod of {
|
||||
True => case <ap1.infl, ap2.infl> of {
|
||||
<(Participle|Invariable),(Participle|Invariable)> =>
|
||||
ap1.s ! isMod ! (NCase Sg Nom) ++ c ++ ap2.s ! isMod ! (NCase Sg Nom) ; --valmis ja täis kassid
|
||||
<(Participle|Invariable),Regular> =>
|
||||
ap1.s ! isMod ! (NCase Sg Nom) ++ c++ ap2.s ! isMod ! nf ; --valmis ja suured kassid
|
||||
<Regular,(Participle|Invariable)> =>
|
||||
ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! (NCase Sg Nom) ; --suured ja valmis kassid
|
||||
_ => ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! nf --suured ja mustad kassid
|
||||
} ;
|
||||
False => ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! nf --kassid on valmid ja suured
|
||||
} ;
|
||||
infl = Regular } ;
|
||||
s2 = x ;
|
||||
lock_ListAP = <>
|
||||
} ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
conjunctDistrTableAdj : ConjunctionDistr -> [AP] -> AP = \or,xs ->
|
||||
let
|
||||
ap1 = xs.s1 ;
|
||||
ap2 = xs.s2 ;
|
||||
ap2 = xs.s2 ;
|
||||
in
|
||||
lin AP {s = \\isMod,nf =>
|
||||
case isMod of {
|
||||
True => case <ap1.infl, ap2.infl> of {
|
||||
<(Participle|Invariable),(Participle|Invariable)> =>
|
||||
or.s1 ++ ap1.s ! isMod ! (NCase Sg Nom) ++
|
||||
or.s2 ++ ap2.s ! isMod ! (NCase Sg Nom) ;
|
||||
<(Participle|Invariable),Regular> =>
|
||||
or.s1 ++ ap1.s ! isMod ! (NCase Sg Nom) ++
|
||||
or.s2 ++ ap2.s ! isMod ! nf ;
|
||||
<Regular,(Participle|Invariable)> =>
|
||||
or.s1 ++ ap1.s ! isMod ! nf ++
|
||||
or.s2 ++ ap2.s ! isMod ! (NCase Sg Nom) ;
|
||||
_ => or.s1 ++ ap1.s ! isMod ! nf ++ or.s2 ++ ap2.s ! isMod ! nf
|
||||
} ;
|
||||
False => or.s1 ++ ap1.s ! isMod ! nf ++ or.s2 ++ ap2.s ! isMod ! nf
|
||||
} ;
|
||||
infl = Regular ;
|
||||
lock_AP = <>
|
||||
} ;
|
||||
case isMod of {
|
||||
True => case <ap1.infl, ap2.infl> of {
|
||||
<(Participle|Invariable),(Participle|Invariable)> =>
|
||||
or.s1 ++ ap1.s ! isMod ! (NCase Sg Nom) ++
|
||||
or.s2 ++ ap2.s ! isMod ! (NCase Sg Nom) ;
|
||||
<(Participle|Invariable),Regular> =>
|
||||
or.s1 ++ ap1.s ! isMod ! (NCase Sg Nom) ++
|
||||
or.s2 ++ ap2.s ! isMod ! nf ;
|
||||
<Regular,(Participle|Invariable)> =>
|
||||
or.s1 ++ ap1.s ! isMod ! nf ++
|
||||
or.s2 ++ ap2.s ! isMod ! (NCase Sg Nom) ;
|
||||
_ => or.s1 ++ ap1.s ! isMod ! nf ++ or.s2 ++ ap2.s ! isMod ! nf
|
||||
} ;
|
||||
False => or.s1 ++ ap1.s ! isMod ! nf ++ or.s2 ++ ap2.s ! isMod ! nf
|
||||
} ;
|
||||
infl = Regular
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ concrete ExtendFin of Extend =
|
||||
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
||||
,ExistCN, ExistMassCN, ICompAP, ByVP
|
||||
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash
|
||||
,PassVPSlash, PassAgentVPSlash
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarFin) **
|
||||
@@ -160,4 +161,15 @@ lin
|
||||
NPSep => mikaInt ! Sg ! Nom }
|
||||
} ;
|
||||
in {s = appCompl True Pos ss.c2 thatWhich ++ ss.s} ;
|
||||
|
||||
PassVPSlash vp = S.passVP vp vp.c2 ;
|
||||
|
||||
PassAgentVPSlash vp np = {
|
||||
s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = npform2subjcase vp.c2.c} ;
|
||||
s2 = \\b,p,a => np.s ! NPSep ++ vp.s2 ! b ! p ! a ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
vptyp = vp.vptyp ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ concrete LangFin of Lang =
|
||||
LexiconFin
|
||||
, ConstructionFin
|
||||
, DocumentationFin --# notpresent
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = finnish ;
|
||||
, MarkupFin - [stringMark]
|
||||
** {
|
||||
|
||||
} ;
|
||||
|
||||
9
src/finnish/LangFin.labels
Normal file
9
src/finnish/LangFin.labels
Normal file
@@ -0,0 +1,9 @@
|
||||
* {"en","et","ei","emme","ette","eivät","älä","älkää"} PART neg head
|
||||
UseComp {"olen","olet","on","olemme","olette","ovat","olin","olit","oli","olimme","olitte","olivat","olisin","olisit","olisi","olisimme","olisitte","olisivat","ole","olko"} VERB cop head
|
||||
CompAdv {"olen","olet","on","olemme","olette","ovat","olin","olit","oli","olimme","olitte","olivat","olisin","olisit","olisi","olisimme","olisitte","olisivat","ole","olko"} VERB cop head
|
||||
CompAP {"olen","olet","on","olemme","olette","ovat","olin","olit","oli","olimme","olitte","olivat","olisin","olisit","olisi","olisimme","olisitte","olisivat","ole","olko"} VERB cop head
|
||||
CompNP {"olen","olet","on","olemme","olette","ovat","olin","olit","oli","olimme","olitte","olivat","olisin","olisit","olisi","olisimme","olisitte","olisivat","ole","olko"} VERB cop head
|
||||
CompCN {"olen","olet","on","olemme","olette","ovat","olin","olit","oli","olimme","olitte","olivat","olisin","olisit","olisi","olisimme","olisitte","olisivat","ole","olko"} VERB cop head
|
||||
PredVP {"olen","olet","on","olemme","olette","ovat","olin","olit","oli","olimme","olitte","olivat","olisin","olisit","olisi","olisimme","olisitte","olisivat","ole","olko"} AUX aux head
|
||||
ComplVS {"että"} PART mark xcomp
|
||||
|
||||
15
src/finnish/MarkupFin.gf
Normal file
15
src/finnish/MarkupFin.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete MarkupFin of Markup = CatFin, MarkHTMLX ** {
|
||||
|
||||
lin
|
||||
MarkupCN m cn = cn ** {s = \\nf => appMark m (cn.s ! nf)} ;
|
||||
MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ;
|
||||
MarkupAP m ap = ap ** {s = \\b,nf => appMark m (ap.s ! b ! nf)} ;
|
||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||
MarkupS m s = {s = appMark m s.s} ;
|
||||
MarkupUtt m utt = {s = appMark m utt.s} ;
|
||||
MarkupPhr m phr = {s = appMark m phr.s} ;
|
||||
MarkupText m txt = {s = appMark m txt.s} ;
|
||||
|
||||
}
|
||||
@@ -599,6 +599,8 @@ mkVS = overload {
|
||||
<nukk + "e", nuk + "een"> => dRae ukko ukon ;
|
||||
<arp + "i", arv + "en"> => dArpi ukko ukon ;
|
||||
<_ + ("us" | "ys"), _ + "den"> => dLujuus ukko ;
|
||||
<laid + ("u"|"a"|"ä") + "n", laitu + "men">
|
||||
=> dLiitin ukko ukon ; -- laidun,hapan,sydän not caught in previous
|
||||
<_, _ + "n"> => ukot ;
|
||||
_ =>
|
||||
Predef.error (["second argument should end in n, not"] ++ ukon)
|
||||
|
||||
@@ -23,7 +23,7 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, StemFin, (P = Prelude) in
|
||||
PConjConj conj = {s = conj.s2} ;
|
||||
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ np.s ! NPSep} ;
|
||||
VocNP np = {s = P.SOFT_BIND ++ "," ++ np.s ! NPSep} ;
|
||||
|
||||
oper
|
||||
addNegation : P.Bool -> Str = \isNeg -> case isNeg of {P.True => "ei" ; _ => []} ;
|
||||
|
||||
@@ -61,10 +61,10 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin, StemFin in {
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = a.s ++ s.s} ;
|
||||
ExtAdvS a s = {s = a.s ++ "," ++ s.s} ;
|
||||
ExtAdvS a s = {s = a.s ++ SOFT_BIND ++ "," ++ s.s} ;
|
||||
|
||||
RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; ---- mikä
|
||||
RelS s r = {s = s.s ++ SOFT_BIND ++ "," ++ r.s ! agrP3 Sg} ; ---- mikä
|
||||
|
||||
SSubjS a subj b = {s = a.s ++ "," ++ subj.s ++ b.s} ;
|
||||
SSubjS a subj b = {s = a.s ++ SOFT_BIND ++ "," ++ subj.s ++ b.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ lin
|
||||
MkSymb s = s ;
|
||||
|
||||
BaseSymb = infixSS "ja" ;
|
||||
ConsSymb = infixSS "," ;
|
||||
ConsSymb = infixSS (SOFT_BIND ++ ",") ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
||||
}
|
||||
) ;
|
||||
|
||||
ComplVS v s = insertExtrapos ("," ++ etta_Conj ++ s.s) (predSV v) ;
|
||||
ComplVQ v q = insertExtrapos ("," ++ q.s) (predSV v) ;
|
||||
ComplVS v s = insertExtrapos (SOFT_BIND ++ "," ++ etta_Conj ++ s.s) (predSV v) ;
|
||||
ComplVQ v q = insertExtrapos (SOFT_BIND ++ "," ++ q.s) (predSV v) ;
|
||||
ComplVA v ap =
|
||||
insertObj
|
||||
(\\_,b,agr =>
|
||||
@@ -39,9 +39,9 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
||||
(predSV v) ;
|
||||
|
||||
SlashV2S v s =
|
||||
insertExtrapos ("," ++ etta_Conj ++ s.s) (predSV v) ** {c2 = v.c2} ;
|
||||
insertExtrapos (SOFT_BIND ++ "," ++ etta_Conj ++ s.s) (predSV v) ** {c2 = v.c2} ;
|
||||
SlashV2Q v q =
|
||||
insertExtrapos ("," ++ q.s) (predSV v) ** {c2 = v.c2} ;
|
||||
insertExtrapos (SOFT_BIND ++ "," ++ q.s) (predSV v) ** {c2 = v.c2} ;
|
||||
SlashV2V v vp =
|
||||
insertObj (\\_,b,a => infVP v.sc b a vp (vvtype2infform v.vi)) (predSV v) ** {c2 = v.c2} ;
|
||||
SlashV2A v ap =
|
||||
|
||||
@@ -18,7 +18,7 @@ lin
|
||||
bad_A = prefA (mkADeg (regA "mauvais") (regA "pire")) ;
|
||||
bank_N = regGenN "banque" feminine ;
|
||||
beautiful_A =
|
||||
prefA (compADeg (mkA "beau" "bel" "beaux" "belle" "bellement")) ;
|
||||
prefA (compADeg (mkA "beau" "bel" "belle" "beaux" "bellement")) ;
|
||||
become_VA = mkVA devenir_V ;
|
||||
beer_N = regGenN "bière" feminine ;
|
||||
beg_V2V = mkV2V (regV "demander") accusative dative ;
|
||||
@@ -129,11 +129,11 @@ lin
|
||||
music_N = regGenN "musique" feminine ;
|
||||
narrow_A = regA "étroit" ;
|
||||
new_A =
|
||||
prefA (compADeg (mkA "nouveau" "nouvel" "nouveaux" "nouvelle" "nouvellement")) ;
|
||||
prefA (compADeg (mkA "nouveau" "nouvel" "nouvelle" "nouveaux" "nouvellement")) ;
|
||||
newspaper_N = regGenN "journal" masculine ;
|
||||
oil_N = regGenN "huile" feminine ;
|
||||
old_A =
|
||||
prefA (compADeg (mkA "vieux" "vieil" "vieux" "vieille" "vieillement")) ;
|
||||
prefA (compADeg (mkA "vieux" "vieil" "vieille" "vieux" "vieillement")) ;
|
||||
open_V2 = ouvrir_V2 ;
|
||||
paint_V2A = mkV2A (v2V peindre_V2) accusative (mkPrep "en") ;
|
||||
paper_N = regGenN "papier" masculine ;
|
||||
|
||||
@@ -73,7 +73,7 @@ oper
|
||||
-- Here are some patterns. First one that describes the worst case.
|
||||
|
||||
mkAdj' : (_,_,_,_,_ : Str) -> Adj ;
|
||||
mkAdj' vieux vieil vieuxs vieille vieillement = {
|
||||
mkAdj' vieux vieil vieille vieuxs vieillement = {
|
||||
s = table {
|
||||
ASg Masc _ => pre {#voyelle => vieil ; "h" => vieil ; _ => vieux} ;
|
||||
ASg Fem _ => vieille ;
|
||||
@@ -83,7 +83,7 @@ oper
|
||||
} ;
|
||||
|
||||
mkAdj : (_,_,_,_ : Str) -> Adj ;
|
||||
mkAdj bleu bleus bleue bleuement = mkAdj' bleu bleu bleus bleue bleuement ;
|
||||
mkAdj bleu bleue bleus bleuement = mkAdj' bleu bleu bleue bleus bleuement ;
|
||||
|
||||
-- Then the regular and invariant patterns.
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ oper
|
||||
} ;
|
||||
|
||||
mk4A masc fem mascpl aa = mk5A masc masc fem mascpl aa ;
|
||||
mk5A masc masc fem mascpl aa = compADeg {s = \\_ => (mkAdj' masc masc mascpl fem aa).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
||||
mk5A masc mascv fem mascpl aa = compADeg {s = \\_ => (mkAdj' masc mascv fem mascpl aa).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
||||
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
|
||||
prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
|
||||
adjCopula a cop = a ** {copTyp = cop} ;
|
||||
|
||||
@@ -89,7 +89,7 @@ concrete CatGer of Cat =
|
||||
V, VS, VQ = ResGer.Verb ; -- = {s : VForm => Str} ;
|
||||
VV = Verb ** {isAux : Bool} ;
|
||||
V2, VA, V2A, V2S, V2Q = Verb ** {c2 : Preposition} ;
|
||||
V2V = Verb ** {c2 : Preposition ; isAux : Bool} ;
|
||||
V2V = Verb ** {c2 : Preposition ; isAux : Bool ; ctrl : Control} ;
|
||||
V3 = Verb ** {c2, c3 : Preposition} ;
|
||||
|
||||
A = {s : Degree => AForm => Str} ;
|
||||
@@ -106,13 +106,17 @@ concrete CatGer of Cat =
|
||||
Tense = {s : Str ; t : ResGer.Tense ; m : Mood} ;
|
||||
|
||||
linref
|
||||
NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
||||
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
||||
|
||||
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ;
|
||||
ClSlash = \cls -> cls.s ! MIndic ! Pres ! Simul ! Pos ! Main ++ cls.c2.s ;
|
||||
|
||||
VP = \vp -> useInfVP False vp ;
|
||||
VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ;
|
||||
|
||||
AP = \ap -> ap.s ! APred ++ ap.ext ;
|
||||
AP = \ap -> ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.ext ;
|
||||
A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ;
|
||||
|
||||
V, VS, VQ, VA = \v -> useInfVP False (predV v) ;
|
||||
V2, V2A, V2Q, V2S = \v -> useInfVP False (predV v) ++ v.c2.s ;
|
||||
|
||||
@@ -10,7 +10,7 @@ lin
|
||||
hungry_VP = mkVP (mkA "hungrig") ;
|
||||
thirsty_VP = mkVP (mkA "durstig") ;
|
||||
tired_VP = mkVP (mkA "müde") ;
|
||||
scared_VP = mkVP have_V2 (mkNP (mkN "Angst" "Angsten" feminine)) ;
|
||||
scared_VP = mkVP have_V2 (mkNP (mkN "Angst" "Ängste" feminine)) ;
|
||||
ill_VP = mkVP (mkA "krank") ;
|
||||
ready_VP = mkVP (mkA "bereit") ;
|
||||
|
||||
|
||||
@@ -16980,7 +16980,7 @@ lin
|
||||
heldin_N = mkN "Heldin" "Heldinnen" feminine ;
|
||||
heldisch_A = mk3A "heldisch" "heldischer" "heldischste" ;
|
||||
helena_N = mkN "Helena" "Helenas" feminine ;
|
||||
helfen_V = irregV "helfen" "helft" "half" "hälfe" "geholfen" ;
|
||||
helfen_V = irregV "helfen" "hilft" "half" "hälfe" "geholfen" ;
|
||||
helfensteiner_N = mkN "Helfensteiner" "Helfensteiner" masculine ;
|
||||
helfer_N = mkN "Helfer" "Helfer" masculine ;
|
||||
helferlein_N = mkN "Helferlein" "Helferlein" neuter ;
|
||||
@@ -26112,7 +26112,7 @@ lin
|
||||
nachgruebeln_V = prefixV "nach" (regV "grübeln") ;
|
||||
nachhaken_5_V = prefixV "nach" (regV "haken") ;
|
||||
nachhaltig_A = mk3A "nachhaltig" "nachhaltiger" "nachhaltigste" ;
|
||||
nachhelfen_6_V = prefixV "nach" (irregV "helfen" "helft" "half" "hälfe" "geholfen") ;
|
||||
nachhelfen_6_V = prefixV "nach" (irregV "helfen" "hilft" "half" "hälfe" "geholfen") ;
|
||||
nachher_Adv = mkAdv "nachher" ;
|
||||
nachhilfe_N = mkN "Nachhilfe" "Nachhilfen" feminine ;
|
||||
nachhut_N = mkN "Nachhut" "Nachhuten" feminine ;
|
||||
|
||||
@@ -256,8 +256,8 @@ lin
|
||||
abgehen_V = prefixV "ab" (irregV "gehen" "geht" "ging" "ginge" "gegangen") ;
|
||||
abgenzern_V2 = dirV2 (prefixV "ab" (regV "genzern")) ;
|
||||
abgeraten_von_V2 = prepV2 (prefixV "ab" (irregV "geraten" "gerät" "geriet" "geriete" "geraten")) von_Prep ;
|
||||
abgewoehnen_rV2 = reflV2 (prefixV "ab" (regV "gewöhnen")) accusative accPrep ;
|
||||
abgewoehnen_rVV = reflVV (prefixV "ab" (regV "gewöhnen")) accusative ;
|
||||
abgewoehnen_rV2 = reflV2 (prefixV "ab" (regV "gewöhnen")) dative accPrep ;
|
||||
abgewoehnen_rVV = reflVV (prefixV "ab" (regV "gewöhnen")) dative ;
|
||||
abgraebeln_V = prefixV "ab" (regV "gräbeln") ;
|
||||
abgraten_V2 = dirV2 (prefixV "ab" (regV "graten")) ;
|
||||
abgrenzen_V2 = dirV2 (prefixV "ab" (regV "grenzen")) ;
|
||||
@@ -338,9 +338,9 @@ lin
|
||||
absahnen_V2 = dirV2 (prefixV "ab" (regV "sahnen")) ;
|
||||
abschachern_dat_V3 = accdatV3 (prefixV "ab" (regV "schachern")) ;
|
||||
abschaffen_V2 = dirV2 (prefixV "ab" (regV "schaffen")) ;
|
||||
abschauen_bei_rV3 = reflV3 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) accusative accPrep bei_Prep ;
|
||||
abschauen_bei_rV3 = reflV3 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) dative accPrep bei_Prep ;
|
||||
abschauen_bei_V3 = dirV3 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) bei_Prep ;
|
||||
abschauen_rV2 = reflV2 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) accusative accPrep ;
|
||||
abschauen_rV2 = reflV2 (prefixV "ab" (irregV "schauen" "schaut" "schaute" "schaute" "geschaut")) dative accPrep ;
|
||||
abschenken_V2 = dirV2 (prefixV "ab" (regV "schenken")) ;
|
||||
abschenken_V = prefixV "ab" (regV "schenken") ;
|
||||
abschicken_V2 = dirV2 (prefixV "ab" (regV "schicken")) ;
|
||||
@@ -350,7 +350,7 @@ lin
|
||||
abschliessen_V2 = dirV2 (prefixV "ab" (irregV "schließen" "schließt" "schloss" "schlösse" "geschlossen")) ;
|
||||
abschmettern_V2 = dirV2 (prefixV "ab" (irregV "schmettern" "schmettert" "schmetterte" "schmetterte" "geschmettert")) ;
|
||||
abschmieren_V = prefixV "ab" (regV "schmieren") ;
|
||||
abschminken_rV2 = reflV2 (prefixV "ab" (regV "schminken")) accusative accPrep ;
|
||||
abschminken_rV2 = reflV2 (prefixV "ab" (regV "schminken")) dative accPrep ;
|
||||
abschminken_V2 = dirV2 (prefixV "ab" (regV "schminken")) ;
|
||||
abschmirgeln_V2 = dirV2 (prefixV "ab" (regV "schmirgeln")) ;
|
||||
abschmuecken_V2 = dirV2 (prefixV "ab" (regV "schmücken")) ;
|
||||
@@ -580,7 +580,7 @@ lin
|
||||
anfreunden_mit_rV2 = reflV2 (prefixV "an" (regV "freunden")) accusative mit_Prep ;
|
||||
anfuehlen_V2 = dirV2 (prefixV "an" (regV "fühlen")) ;
|
||||
anfuehlen_wie_rV2 = reflV2 (prefixV "an" (regV "fühlen")) accusative (mkPrep "wie" nominative) ;
|
||||
angeben_mit_V2 = prepV2 (prefixV "an" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) mit_Prep ;
|
||||
angeben_mit_V2 = prepV2 (prefixV "an" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) mit_Prep ;
|
||||
angehen_sV = dassV (prefixV "an" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) ;
|
||||
angehen_V2 = dirV2 (prefixV "an" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) ;
|
||||
angehoeren_dat_V2 = mkV2 (prefixV "an" (regV "gehören")) datPrep ;
|
||||
@@ -797,9 +797,9 @@ lin
|
||||
auffassen_als_V3 = dirV3 (prefixV "auf" (regV "fassen")) (mkPrep "als" accusative) ;
|
||||
auffrieren_V = prefixV "auf" (irregV "frieren" "friert" "fror" "fröre" "gefroren") ;
|
||||
auffuehren_V2 = dirV2 (prefixV "auf" (regV "führen")) ;
|
||||
aufgeben_V2 = dirV2 (prefixV "auf" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) ;
|
||||
aufgeben_V = prefixV "auf" (irregV "geben" "gebt" "gab" "gäbe" "gegeben") ;
|
||||
aufgeben_VV = mkVV (prefixV "auf" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) ;
|
||||
aufgeben_V2 = dirV2 (prefixV "auf" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) ;
|
||||
aufgeben_V = prefixV "auf" (irregV "geben" "gibt" "gab" "gäbe" "gegeben") ;
|
||||
aufgeben_VV = mkVV (prefixV "auf" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) ;
|
||||
aufgehen_dat_V2 = mkV2 (prefixV "auf" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) datPrep ;
|
||||
aufgehen_V = prefixV "auf" (irregV "gehen" "geht" "ging" "ginge" "gegangen") ;
|
||||
aufhaengen_V2 = dirV2 (prefixV "auf" (regV "hängen")) ;
|
||||
@@ -925,7 +925,7 @@ lin
|
||||
ausbuexen_von_V2 = prepV2 (prefixV "aus" (regV "büxen")) von_Prep ;
|
||||
ausbuexen_V = prefixV "aus" (regV "büxen") ;
|
||||
ausdehnen_rV = reflV (prefixV "aus" (regV "dehnen")) accusative ;
|
||||
ausdenken_rV2 = reflV2 (prefixV "aus" (irregV "denken" "denkt" "dachte" "dächte" "gedacht")) accusative accPrep ;
|
||||
ausdenken_rV2 = reflV2 (prefixV "aus" (irregV "denken" "denkt" "dachte" "dächte" "gedacht")) dative accPrep ;
|
||||
ausdruecken_rVA = reflVA (prefixV "aus" (regV "drücken")) accusative ;
|
||||
ausdruecken_V2 = dirV2 (prefixV "aus" (regV "drücken")) ;
|
||||
-- ausdruecken_V = prefixV "aus" (irregV "drücken" "drückt" "drückte" "drückte" "gedrückt") ;
|
||||
@@ -938,7 +938,7 @@ lin
|
||||
ausfuehren_V2 = dirV2 (prefixV "aus" (regV "führen")) ;
|
||||
ausfuehren_VS = mkVS (prefixV "aus" (regV "führen")) ;
|
||||
ausfuellen_V2 = dirV2 (prefixV "aus" (regV "füllen")) ;
|
||||
ausgeben_V2 = dirV2 (prefixV "aus" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) ;
|
||||
ausgeben_V2 = dirV2 (prefixV "aus" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) ;
|
||||
ausgehen_mit_V2 = prepV2 (prefixV "aus" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) mit_Prep ;
|
||||
ausgehen_V = prefixV "aus" (irregV "gehen" "geht" "ging" "ginge" "gegangen") ;
|
||||
ausgleichen_durch_V3 = dirV3 (prefixV "aus" (irregV "gleichen" "gleicht" "glich" "gliche" "geglichen")) durch_Prep ;
|
||||
@@ -1032,8 +1032,8 @@ lin
|
||||
aussortieren_V2 = dirV2 (prefixV "aus" (regV "sortieren")) ;
|
||||
ausspeichern_V2 = dirV2 (prefixV "aus" (regV "speichern")) ;
|
||||
ausspionieren_V2 = dirV2 (prefixV "aus" (regV "spionieren")) ;
|
||||
aussprechen_V2 = dirV2 (prefixV "aus" (irregV "sprechen" "sprecht" "sprach" "spräche" "gesprochen")) ;
|
||||
aussprechen_VS = mkVS (prefixV "aus" (irregV "sprechen" "sprecht" "sprach" "spräche" "gesprochen")) ;
|
||||
aussprechen_V2 = dirV2 (prefixV "aus" (irregV "sprechen" "spricht" "sprach" "spräche" "gesprochen")) ;
|
||||
aussprechen_VS = mkVS (prefixV "aus" (irregV "sprechen" "spricht" "sprach" "spräche" "gesprochen")) ;
|
||||
ausspucken_vor_V2 = prepV2 (prefixV "aus" (regV "spucken")) (mkPrep "vor" dative) ;
|
||||
ausspucken_V = prefixV "aus" (regV "spucken") ;
|
||||
ausstatten_mit_V3 = dirV3 (prefixV "aus" (regV "statten")) mit_Prep ;
|
||||
@@ -1194,7 +1194,7 @@ lin
|
||||
behandeln_als_V3 = dirV3 (regV "behandeln") (mkPrep "als" accusative) ;
|
||||
behandeln_mit_V3 = dirV3 (regV "behandeln") mit_Prep ;
|
||||
behaupten_VS = mkVS (irregV "behaupten" "behauptet" "behauptete" "behaupte" "behauptet") ;
|
||||
behelfen_mit_rV2 = reflV2 (irregV "behelfen" "behilft" "behalf" "behalf" "beholfen") accusative mit_Prep ;
|
||||
behelfen_mit_rV2 = reflV2 (irregV "behelfen" "behilft" "behalf" "behalf" "beholfen") dative mit_Prep ;
|
||||
behelligen_mit_V3 = dirV3 (regV "behelligen") mit_Prep ;
|
||||
beherbergen_V2 = dirV2 (regV "beherbergen") ;
|
||||
beherrschen_V2 = dirV2 (regV "beherrschen") ;
|
||||
@@ -1358,8 +1358,8 @@ lin
|
||||
besorgen_dat_V3 = accdatV3 (regV "besorgen") ;
|
||||
besorgen_V2 = dirV2 (regV "besorgen") ;
|
||||
bespassen_V2 = dirV2 (regV "bespaßen") ;
|
||||
besprechen_mit_V3 = dirV3 (irregV "besprechen" "besprecht" "besprach" "bespräche" "besprochen") mit_Prep ;
|
||||
besprechen_plV2 = pldirV2 (irregV "besprechen" "besprecht" "besprach" "bespräche" "besprochen") ;
|
||||
besprechen_mit_V3 = dirV3 (irregV "besprechen" "bespricht" "besprach" "bespräche" "besprochen") mit_Prep ;
|
||||
besprechen_plV2 = pldirV2 (irregV "besprechen" "bespricht" "besprach" "bespräche" "besprochen") ;
|
||||
bespruehen_mit_V3 = dirV3 (regV "besprühen") mit_Prep ;
|
||||
bespruehen_V2 = dirV2 (regV "besprühen") ;
|
||||
besseren_rV = reflV (regV "besseren") accusative ;
|
||||
@@ -1902,7 +1902,7 @@ lin
|
||||
einen_V2 = dirV2 (regV "einen") ;
|
||||
einfallen_dat_sV2 = dassV2 (prefixV "ein" (irregV "fallen" "fallt" "fiel" "fiele" "gefallen")) datPrep ;
|
||||
einfallen_in_V2 = prepV2 (prefixV "ein" (irregV "fallen" "fallt" "fiel" "fiele" "gefallen")) (mkPrep "in" accusative) ;
|
||||
einfangen_rV2 = reflV2 (prefixV "ein" (irregV "fangen" "fängt" "fing" "fing" "gefangen")) accusative accPrep ;
|
||||
einfangen_rV2 = reflV2 (prefixV "ein" (irregV "fangen" "fängt" "fing" "fing" "gefangen")) dative accPrep ;
|
||||
einfangen_V2 = dirV2 (prefixV "ein" (irregV "fangen" "fängt" "fing" "fing" "gefangen")) ;
|
||||
einfinden_loc_rV2 = reflV2 (prefixV "ein" (irregV "finden" "findet" "fand" "fände" "gefunden")) accusative loc_Prep ;
|
||||
einfloessen_dat_V2S = mkV2S (prefixV "ein" (irregV "flößen" "flößt" "flöße" "flöße" "geflößt")) datPrep ;
|
||||
@@ -1913,7 +1913,7 @@ lin
|
||||
einfuegen_rV = reflV (prefixV "ein" (regV "fügen")) accusative ;
|
||||
einfuehren_in_V3 = dirV3 (prefixV "ein" (regV "führen")) (mkPrep "in" accusative) ;
|
||||
einfuehren_V2 = dirV2 (prefixV "ein" (regV "führen")) ;
|
||||
eingeben_in_V3 = dirV3 (prefixV "ein" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) (mkPrep "in" accusative) ;
|
||||
eingeben_in_V3 = dirV3 (prefixV "ein" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) (mkPrep "in" accusative) ;
|
||||
eingehen_in_V2 = prepV2 (prefixV "ein" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) (mkPrep "in" accusative) ;
|
||||
eingehen_V = prefixV "ein" (irregV "gehen" "geht" "ging" "ginge" "gegangen") ;
|
||||
eingemeinden_V2 = dirV2 (prefixV "ein" (irregV "gemeinden" "gemeindet" "gemeindete" "gemeindete" "gemeindet")) ;
|
||||
@@ -2146,8 +2146,8 @@ lin
|
||||
entsichern_V2 = dirV2 (irregV "entsichern" "entsichert" "entsicherte" "entsicherte" "entsichert") ;
|
||||
entsorgen_V2 = dirV2 (irregV "entsorgen" "entsorgt" "entsorgte" "entsorgte" "entsorgt") ;
|
||||
entspannen_rV = reflV (irregV "entspannen" "entspannt" "entspannte" "entspannte" "entspannt") accusative ;
|
||||
entsprechen_dat_V2 = mkV2 (irregV "entsprechen" "entsprecht" "entsprach" "entspräche" "entsprochen") datPrep ;
|
||||
entsprechen_rcV = reciV (irregV "entsprechen" "entsprecht" "entsprach" "entspräche" "entsprochen") dative ;
|
||||
entsprechen_dat_V2 = mkV2 (irregV "entsprechen" "entspricht" "entsprach" "entspräche" "entsprochen") datPrep ;
|
||||
entsprechen_rcV = reciV (irregV "entsprechen" "entspricht" "entsprach" "entspräche" "entsprochen") dative ;
|
||||
entspringen_loc_V2 = prepV2 (irregV "entspringen" "entspringt" "entsprang" "entspränge" "entsprungen") loc_Prep ;
|
||||
entstaatlichen_V2 = dirV2 (irregV "entstaatlichen" "entstaatlicht" "entstaatlichte" "entstaatlichte" "entstaatlicht") ;
|
||||
entstammen_gen_V2 = mkV2 (irregV "entstammen" "entstammt" "entstammte" "entstammte" "entstammt") genPrep ;
|
||||
@@ -2210,7 +2210,7 @@ lin
|
||||
ergaenzen_mit_V3 = dirV3 (irregV "ergänzen" "ergänzt" "ergänzte" "ergänzte" "ergänzt") mit_Prep ;
|
||||
ergattern_V2 = dirV2 (irregV "ergattern" "ergattert" "ergatterte" "ergattere" "ergattert") ;
|
||||
ergaunern_V2 = dirV2 (irregV "ergaunern" "ergaunert" "ergaunerte" "ergaunerte" "ergaunert") ;
|
||||
ergeben_dat_rV2 = reflV2 (irregV "ergeben" "ergebt" "ergab" "ergäbe" "ergeben") accusative datPrep ;
|
||||
ergeben_dat_rV2 = reflV2 (irregV "ergeben" "ergibt" "ergab" "ergäbe" "ergeben") accusative datPrep ;
|
||||
ergetzen_am_V2 = prepV2 (irregV "ergetzen" "ergetzt" "ergetzte" "ergetzte" "ergetzt") (mkPrep "an" dative) ;
|
||||
ergiessen_in_V2 = prepV2 (irregV "ergießen" "ergießt" "ergoss" "ergösse" "ergossen") (mkPrep "in" accusative) ;
|
||||
ergiessen_ueber_V2 = prepV2 (irregV "ergießen" "ergießt" "ergoss" "ergösse" "ergossen") (mkPrep "über" accusative) ;
|
||||
@@ -2266,7 +2266,7 @@ lin
|
||||
erleichtern_rV = reflV (irregV "erleichtern" "erleichtert" "erleichterte" "erleichtere" "erleichtert") accusative ;
|
||||
erleiden_V2 = dirV2 (irregV "erleiden" "erleidet" "erlitt" "erlitte" "erlitten") ;
|
||||
erlernen_V2 = dirV2 (irregV "erlernen" "erlernt" "erlernte" "erlernte" "erlernt") ;
|
||||
erlesen_rV2 = reflV2 (irregV "erlesen" "erlest" "erlas" "erläse" "erlesen") accusative accPrep ;
|
||||
erlesen_rV2 = reflV2 (irregV "erlesen" "erlest" "erlas" "erläse" "erlesen") dative accPrep ;
|
||||
erleuchten_V2 = dirV2 (irregV "erleuchten" "erleuchtet" "erleuchtete" "erleuchtete" "erleuchtet") ;
|
||||
erloeschen_V = irregV "erlöschen" "erlöscht" "erlosch" "erlösche" "erloschen" ;
|
||||
erloesen_V2 = dirV2 (irregV "erlösen" "erlöst" "erlöste" "erlöste" "erlöst") ;
|
||||
@@ -2369,7 +2369,7 @@ lin
|
||||
erwaermen_V2 = dirV2 (irregV "erwärmen" "erwärmt" "erwärmte" "erwärmte" "erwärmt") ;
|
||||
erwahren_V2 = dirV2 (irregV "erwahren" "erwahrt" "erwahrte" "erwahrte" "erwahrt") ;
|
||||
erwarten_V2 = dirV2 (irregV "erwarten" "erwartet" "erwartete" "erwarte" "erwartet") ;
|
||||
erwarten_von_rV3 = reflV3 (irregV "erwarten" "erwartet" "erwartete" "erwarte" "erwartet") accusative accPrep von_Prep ;
|
||||
erwarten_von_rV3 = reflV3 (irregV "erwarten" "erwartet" "erwartete" "erwarte" "erwartet") dative accPrep von_Prep ;
|
||||
erweichen_V2 = dirV2 (irregV "erweichen" "erweicht" "erweichte" "erweichte" "erweicht") ;
|
||||
erweisen_dat_V3 = accdatV3 (irregV "erweisen" "erweist" "erwies" "erwiese" "erwiesen") ;
|
||||
erweitern_V2 = dirV2 (irregV "erweitern" "erweitert" "erweiterte" "erweiterte" "erweitert") ;
|
||||
@@ -2761,7 +2761,7 @@ lin
|
||||
gebaerden_als_rV2 = reflV2 (irregV "gebärden" "gebärdet" "gebärdete" "gebärdete" "gebärdet") accusative (mkPrep "als" nominative) ;
|
||||
gebaerden_wie_rV2 = reflV2 (irregV "gebärden" "gebärdet" "gebärdete" "gebärdete" "gebärdet") accusative (mkPrep "wie" nominative) ;
|
||||
gebaeren_V2 = dirV2 (irregV "gebären" "gebärt" "gebar" "gebäre" "geboren") ;
|
||||
geben_dat_V3 = accdatV3 (irregV "geben" "gebt" "gab" "gäbe" "gegeben") ;
|
||||
geben_dat_V3 = accdatV3 (irregV "geben" "gibt" "gab" "gäbe" "gegeben") ;
|
||||
gebieten_dat_V2V = mkV2V (irregV "gebieten" "gebietet" "gebot" "geböte" "geboten") datPrep ;
|
||||
gebrauchen_V2 = dirV2 (irregV "gebrauchen" "gebraucht" "gebrauchte" "gebrauchte" "gebraucht") ;
|
||||
gebuehren_dat_sV2 = dassV2 (irregV "gebühren" "gebührt" "gebührte" "gebührte" "gebührt") datPrep ;
|
||||
@@ -2826,7 +2826,7 @@ lin
|
||||
gestatten_dat_V2S = mkV2S (irregV "gestatten" "gestattet" "gestattete" "gestattete" "gestattet") datPrep ;
|
||||
gestatten_dat_V3 = accdatV3 (irregV "gestatten" "gestattet" "gestattete" "gestattete" "gestattet") ;
|
||||
gestikulieren_V = regV "gestikulieren" ;
|
||||
getrauen_rVV = reflVV (irregV "getrauen" "getraut" "getraute" "getraute" "getraut") dative ;
|
||||
getrauen_rVV = reflVV (irregV "getrauen" "getraut" "getraute" "getraute" "getraut") accusative ;
|
||||
gettoisieren_V2 = dirV2 (regV "gettoisieren") ;
|
||||
gewaehren_dat_V3 = accdatV3 (irregV "gewähren" "gewährt" "gewährte" "gewährte" "gewährt") ;
|
||||
gewaehrleisten_dat_V2S = mkV2S (irregV "gewährleisten" "gewährleistet" "gewährleistete" "gewährleistete" "gewährleistet") datPrep ;
|
||||
@@ -2904,7 +2904,7 @@ lin
|
||||
grausen_sV2 = dassV2 (regV "grausen") accPrep ;
|
||||
grausen_V2 = dirV2 (regV "grausen") ;
|
||||
greifen_dir_V2 = prepV2 (irregV "greifen" "greift" "griff" "griffe" "gegriffen") dir_Prep ;
|
||||
greifen_rV2 = reflV2 (irregV "greifen" "greift" "griff" "griffe" "gegriffen") accusative accPrep ;
|
||||
greifen_rV2 = reflV2 (irregV "greifen" "greift" "griff" "griffe" "gegriffen") dative accPrep ;
|
||||
greinen_V = regV "greinen" ;
|
||||
grenzen_an_V2 = prepV2 (regV "grenzen") (mkPrep "an" accusative) ;
|
||||
grienen_V = regV "grienen" ;
|
||||
@@ -3019,8 +3019,8 @@ lin
|
||||
heissen_V3 = dirV3 (irregV "heißen" "heißt" "hieß" "hieße" "geheißen") accPrep ;
|
||||
heizen_V2 = dirV2 (regV "heizen") ;
|
||||
heizen_V = regV "heizen" ;
|
||||
helfen_dat_V2V = mkV2V (irregV "helfen" "hilft" "half" "hälfe" "geholfen") datPrep ;
|
||||
helfen_dat_bei_V3 = mkV3 (irregV "helfen" "hilft" "half" "hülfe" "geholfen") datPrep bei_Prep ;
|
||||
-- helfen_V = irregV "helfen" "helft" "half" "hälfe" "geholfen" ;
|
||||
hellen_es_esV = esV (regV "hellen") ;
|
||||
hellenisieren_V2 = dirV2 (regV "hellenisieren") ;
|
||||
hemmen_sV2 = dassV2 (regV "hemmen") accPrep ;
|
||||
@@ -3041,7 +3041,7 @@ lin
|
||||
herausarbeiten_VS = mkVS (prefixV "heraus" (regV "arbeiten")) ;
|
||||
herausfinden_V2 = dirV2 (prefixV "heraus" (irregV "finden" "findet" "fand" "fände" "gefunden")) ;
|
||||
herausfinden_VS = mkVS (prefixV "heraus" (irregV "finden" "findet" "fand" "fände" "gefunden")) ;
|
||||
herausgeben_V2 = dirV2 (prefixV "heraus" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) ;
|
||||
herausgeben_V2 = dirV2 (prefixV "heraus" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) ;
|
||||
herauskommen_aus_V2 = prepV2 (prefixV "heraus" (irregV "kommen" "kommt" "kam" "käme" "gekommen")) aus_Prep ;
|
||||
herauskommen_sV = dassV (prefixV "heraus" (irregV "kommen" "kommt" "kam" "käme" "gekommen")) ;
|
||||
herauskristallisieren_rV = reflV (prefixV "heraus" (regV "kristallisieren")) accusative ;
|
||||
@@ -3677,7 +3677,7 @@ lin
|
||||
krakeelen_V = regV "krakeelen" ;
|
||||
krakeelen_VS = mkVS (regV "krakeelen") ;
|
||||
krakeln_dir_V3 = dirV3 (regV "krakeln") dir_Prep ;
|
||||
krallen_rV2 = reflV2 (regV "krallen") accusative accPrep ;
|
||||
krallen_rV2 = reflV2 (regV "krallen") dative accPrep ;
|
||||
kramen_aus_V3 = dirV3 (regV "kramen") aus_Prep ;
|
||||
kramen_in_nach_V3 = mkV3 (regV "kramen") (mkPrep "in" accusative) nach_Prep ;
|
||||
kranken_am_V2 = prepV2 (regV "kranken") (mkPrep "an" dative) ;
|
||||
@@ -3843,12 +3843,12 @@ lin
|
||||
leiden_V2 = dirV2 (irregV "leiden" "leidet" "litt" "litte" "gelitten") ;
|
||||
leidtun_dat_sV2 = dassV2 (prefixV "leid" (irregV "tun" "tut" "tat" "täte" "getan")) datPrep ;
|
||||
leidtun_dat_V2 = mkV2 (prefixV "leid" (irregV "tun" "tut" "tat" "täte" "getan")) datPrep ;
|
||||
leihen_bei_rV3 = reflV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") accusative accPrep bei_Prep ;
|
||||
leihen_bei_rV3 = reflV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") dative accPrep bei_Prep ;
|
||||
leihen_dat_V3 = accdatV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") ;
|
||||
leihen_im_rV3 = reflV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") accusative accPrep (mkPrep "in" dative) ;
|
||||
leihen_von_rV3 = reflV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") accusative accPrep von_Prep ;
|
||||
leihen_im_rV3 = reflV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") dative accPrep (mkPrep "in" dative) ;
|
||||
leihen_von_rV3 = reflV3 (irregV "leihen" "leiht" "lieh" "liehe" "geliehen") dative accPrep von_Prep ;
|
||||
leimen_V2 = dirV2 (regV "leimen") ;
|
||||
leisten_rV2 = reflV2 (irregV "leisten" "leistet" "leistete" "leiste" "geleistet") accusative accPrep ;
|
||||
leisten_rV2 = reflV2 (irregV "leisten" "leistet" "leistete" "leiste" "geleistet") dative accPrep ;
|
||||
leisten_V2 = dirV2 (irregV "leisten" "leistet" "leistete" "leiste" "geleistet") ;
|
||||
leitartikeln_V = regV "leitartikeln" ;
|
||||
leiten_V2 = dirV2 (irregV "leiten" "leitet" "leitete" "leite" "geleitet") ;
|
||||
@@ -4057,7 +4057,7 @@ lin
|
||||
miterleben_VS = mkVS (prefixV "mit" (irregV "erleben" "erlebt" "erlebte" "erlebte" "erlebt")) ;
|
||||
mitessen_mit_V2 = prepV2 (prefixV "mit" (irregV "essen" "isst" "aß" "aß" "gegessen")) mit_Prep ;
|
||||
mitfuehlen_mit_V2 = prepV2 (prefixV "mit" (regV "fühlen")) mit_Prep ;
|
||||
mitgeben_V2 = dirV2 (prefixV "mit" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) ;
|
||||
mitgeben_V2 = dirV2 (prefixV "mit" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) ;
|
||||
mitgehen_mit_V2 = prepV2 (prefixV "mit" (irregV "gehen" "geht" "ging" "ging" "gegangen")) mit_Prep ;
|
||||
mitkommen_mit_V2 = prepV2 (prefixV "mit" (irregV "kommen" "kommt" "kam" "käme" "gekommen")) mit_Prep ;
|
||||
mitmischen_bei_V2 = prepV2 (prefixV "mit" (regV "mischen")) bei_Prep ;
|
||||
@@ -4137,13 +4137,13 @@ lin
|
||||
nachforschen_VQ = mkVQ (prefixV "nach" (regV "forschen")) ;
|
||||
nachfuehlen_dat_V2S = mkV2S (prefixV "nach" (regV "fühlen")) datPrep ;
|
||||
nachfuehlen_dat_V3 = accdatV3 (prefixV "nach" (regV "fühlen")) ;
|
||||
nachgeben_dat_V2 = mkV2 (prefixV "nach" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) datPrep ;
|
||||
nachgeben_dat_V2 = mkV2 (prefixV "nach" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) datPrep ;
|
||||
nachgehen_dat_V2 = mkV2 (prefixV "nach" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) datPrep ;
|
||||
nachgruebeln_ueber_V2 = prepV2 (prefixV "nach" (regV "grübeln")) (mkPrep "über" dative) ;
|
||||
nachhaken_bei_V2 = prepV2 (prefixV "nach" (regV "haken")) bei_Prep ;
|
||||
nachhaken_V = prefixV "nach" (regV "haken") ;
|
||||
nachhelfen_dat_V2 = mkV2 (prefixV "nach" (irregV "helfen" "helft" "half" "hälfe" "geholfen")) datPrep ;
|
||||
nachhelfen_dat_V2V = mkV2V (prefixV "nach" (irregV "helfen" "helft" "half" "hälfe" "geholfen")) datPrep ;
|
||||
nachhelfen_dat_V2 = mkV2 (prefixV "nach" (irregV "helfen" "hilft" "half" "hälfe" "geholfen")) datPrep ;
|
||||
nachhelfen_dat_V2V = mkV2V (prefixV "nach" (irregV "helfen" "hilft" "half" "hälfe" "geholfen")) datPrep ;
|
||||
nachkarten_V = prefixV "nach" (regV "karten") ;
|
||||
nachlassen_dat_V3 = accdatV3 (prefixV "nach" (irregV "lassen" "lasst" "ließ" "ließe" "gelassen")) ;
|
||||
nachlassen_im_V2 = prepV2 (prefixV "nach" (irregV "lassen" "lasst" "ließ" "ließe" "gelassen")) (mkPrep "in" dative) ;
|
||||
@@ -4780,9 +4780,9 @@ lin
|
||||
reimen_auf_V3 = dirV3 (regV "reimen") (mkPrep "auf" accusative) ;
|
||||
reimen_V2 = dirV2 (regV "reimen") ;
|
||||
reinchecken_in_V2 = prepV2 (prefixV "rein" (regV "checken")) (mkPrep "in" accusative) ;
|
||||
reinchecken_rV2 = reflV2 (prefixV "rein" (regV "checken")) accusative accPrep ;
|
||||
reinchecken_rV2 = reflV2 (prefixV "rein" (regV "checken")) dative accPrep ;
|
||||
reinigen_V2 = dirV2 (regV "reinigen") ;
|
||||
reinpfeifen_rV2 = reflV2 (prefixV "rein" (irregV "pfeifen" "pfeift" "pfiff" "priffe" "reingepfiffen")) accusative accPrep ;
|
||||
reinpfeifen_rV2 = reflV2 (prefixV "rein" (irregV "pfeifen" "pfeift" "pfiff" "priffe" "reingepfiffen")) dative accPrep ;
|
||||
reinziehen_in_V3 = dirV3 (prefixV "rein" (irregV "ziehen" "zieht" "zog" "zöge" "gezogen")) (mkPrep "in" accusative) ;
|
||||
reisen_dir_V2 = prepV2 (regV "reisen") dir_Prep ;
|
||||
reissen_V2 = dirV2 (irregV "reißen" "reißt" "riss" "risse" "gerissen") ;
|
||||
@@ -5012,8 +5012,8 @@ lin
|
||||
schelten_V2 = dirV2 (irregV "schelten" "schilt" "schalt" "schölte" "gescholten") ;
|
||||
schematisieren_V2 = dirV2 (regV "schematisieren") ;
|
||||
schenken_dat_V3 = accdatV3 (regV "schenken") ;
|
||||
schenken_rV2 = reflV2 (regV "schenken") accusative accPrep ;
|
||||
schenken_rVV = reflVV (regV "schenken") accusative ;
|
||||
schenken_rV2 = reflV2 (regV "schenken") dative accPrep ;
|
||||
schenken_rVV = reflVV (regV "schenken") dative ;
|
||||
scheppen_V2 = dirV2 (regV "scheppen") ;
|
||||
scheppern_V = regV "scheppern" ;
|
||||
scheren_2_V = regV "scheren" ;
|
||||
@@ -5357,8 +5357,8 @@ lin
|
||||
spannen_VS = mkVS (regV "spannen") ;
|
||||
sparen_an_V2 = prepV2 (regV "sparen") (mkPrep "an" accusative) ;
|
||||
sparen_mit_V2 = prepV2 (regV "sparen") mit_Prep ;
|
||||
sparen_rV2 = reflV2 (regV "sparen") accusative accPrep ;
|
||||
sparen_rVV = reflVV (regV "sparen") accusative ;
|
||||
sparen_rV2 = reflV2 (regV "sparen") dative accPrep ;
|
||||
sparen_rVV = reflVV (regV "sparen") dative ;
|
||||
sparen_V2 = dirV2 (regV "sparen") ;
|
||||
spassen_mit_V2 = prepV2 (regV "spaßen") mit_Prep ;
|
||||
spassen_VS = mkVS (regV "spaßen") ;
|
||||
@@ -5867,8 +5867,8 @@ lin
|
||||
ueberfliegen_V2 = dirV2 (irregV "überfliegen" "überfliegt" "überflog" "überflögee" "überflogen") ;
|
||||
ueberfordern_V2 = dirV2 (irregV "überfordern" "überfordert" "überforderte" "überforderte" "überfordert") ;
|
||||
ueberfuehren_gen_V3 = mkV3 (irregV "überführen" "überführt" "überführte" "überführte" "überführt") genPrep accPrep ;
|
||||
uebergeben_dat_V3 = accdatV3 (irregV "übergeben" "übergebt" "übergab" "übergäbe" "übergeben") ;
|
||||
uebergeben_rV = reflV (irregV "übergeben" "übergebt" "übergab" "übergäbe" "übergeben") accusative ;
|
||||
uebergeben_dat_V3 = accdatV3 (irregV "übergeben" "übergibt" "übergab" "übergäbe" "übergeben") ;
|
||||
uebergeben_rV = reflV (irregV "übergeben" "übergibt" "übergab" "übergäbe" "übergeben") accusative ;
|
||||
uebergehen_V2 = dirV2 (irregV "übergehen" "übergeht" "überging" "überginge" "übergegangen") ;
|
||||
uebergehen_VS = mkVS (irregV "übergehen" "übergeht" "überging" "überginge" "übergegangen") ;
|
||||
ueberholen_V2 = dirV2 (irregV "überholen" "überholt" "überholte" "überholte" "überholt") ;
|
||||
@@ -5938,7 +5938,7 @@ lin
|
||||
umfriedigen_V2 = dirV2 (irregV "umfriedigen" "umfriedigt" "umfriedigte" "umfriedigte" "umfriedigt") ;
|
||||
umfunktionieren_zu_V3 = dirV3 (prefixV "um" (regV "funktionieren")) zu_Prep ;
|
||||
umgarnen_V2 = dirV2 (regV "umgarnen") ;
|
||||
umgeben_mit_V3 = dirV3 (irregV "umgeben" "umgebt" "umgab" "umgäbe" "umgeben") mit_Prep ;
|
||||
umgeben_mit_V3 = dirV3 (irregV "umgeben" "umgibt" "umgab" "umgäbe" "umgeben") mit_Prep ;
|
||||
umgehen_V2 = dirV2 (irregV "umgehen" "umgeht" "umging" "umging" "umgangen") ;
|
||||
umgestalten_V2 = dirV2 (prefixV "um" (irregV "gestalten" "gestaltet" "gestaltete" "gestaltete" "gestaltet")) ;
|
||||
umhinkoennen_VV = mkVV (prefixV "umhin" (irregV "können" "kann" "konnte" "konnte" "gekonnt")) ;
|
||||
@@ -6198,7 +6198,7 @@ lin
|
||||
vergammeln_V = irregV "vergammeln" "vergammelt" "vergammelte" "vergammelte" "vergammelt" ;
|
||||
vergasen_V2 = dirV2 (irregV "vergasen" "vergast" "vergaste" "vergaste" "vergast") ;
|
||||
vergattern_zu_V3 = dirV3 (irregV "vergattern" "vergatternt" "vergatterte" "vergatterte" "vergattert") zu_Prep ;
|
||||
vergeben_dat_V2S = mkV2S (irregV "vergeben" "vergebt" "vergab" "vergäbe" "vergeben") datPrep ;
|
||||
vergeben_dat_V2S = mkV2S (irregV "vergeben" "vergibt" "vergab" "vergäbe" "vergeben") datPrep ;
|
||||
vergegenstaendlichen_V2 = dirV2 (irregV "vergegenständlichen" "vergegenständlicht" "vergegenständlichte" "vergegenständlichte" "vergegenständlicht") ;
|
||||
vergegenwaertigen_dat_V2S = mkV2S (irregV "vergegenwärtigen" "vergegenwärtigt" "vergegenwärtigte" "vergegenwärtigte" "vergegenwärtigt") datPrep ;
|
||||
vergegenwaertigen_dat_V3 = accdatV3 (irregV "vergegenwärtigen" "vergegenwärtigt" "vergegenwärtigte" "vergegenwärtigte" "vergegenwärtigt") ;
|
||||
@@ -6492,7 +6492,7 @@ lin
|
||||
verspielen_rV = reflV (irregV "verspielen" "verspielt" "verspielte" "verspielte" "verspielt") accusative ;
|
||||
verspielen_V2 = dirV2 (irregV "verspielen" "verspielt" "verspielte" "verspielte" "verspielt") ;
|
||||
verspotten_V2 = dirV2 (irregV "verspotten" "verspottet" "verspottete" "verspotte" "verspottet") ;
|
||||
versprechen_dat_V2V = mkV2V (irregV "versprechen" "versprecht" "versprach" "verspräche" "versprochen") datPrep ;
|
||||
versprechen_dat_V2V = mkV2V (irregV "versprechen" "verspricht" "versprach" "verspräche" "versprochen") datPrep ;
|
||||
versprengen_V2 = dirV2 (irregV "versprengen" "versprengt" "versprengte" "versprengte" "versprengt") ;
|
||||
verspueren_V2 = dirV2 (irregV "verspüren" "verspürt" "verspürte" "verspürte" "verspürt") ;
|
||||
verstaatlichen_V2 = dirV2 (irregV "verstaatlichen" "verstaatlicht" "verstaatlichte" "verstaatlichte" "verstaatlicht") ;
|
||||
@@ -6638,7 +6638,7 @@ lin
|
||||
vorbeugen_dat_V2 = mkV2 (prefixV "vor" (regV "beugen")) datPrep ;
|
||||
vorfallen_sV = dassV (irregV "vorfallen" "fallt" "fiel" "fiele" "gefallen") ;
|
||||
vorfuehlen_bei_V2 = prepV2 (prefixV "vor" (regV "fühlen")) bei_Prep ;
|
||||
vorgeben_VV = mkVV (prefixV "vor" (irregV "geben" "gebt" "gab" "gäbe" "gegeben")) ;
|
||||
vorgeben_VV = mkVV (prefixV "vor" (irregV "geben" "gibt" "gab" "gäbe" "gegeben")) ;
|
||||
vorgehen_sV = dassV (prefixV "vor" (irregV "gehen" "geht" "ging" "ginge" "gegangen")) ;
|
||||
vorhaben_VV = mkVV (prefixV "vor" (irregV "haben" "hat" "hatte" "hatte" "gehabt")) ;
|
||||
vorhergehen_dat_V2 = mkV2 (prefixV "vor" (irregV "hergehen" "hergeht" "hergehte" "hergehte" "gehergeht")) datPrep ;
|
||||
|
||||
@@ -2882,6 +2882,7 @@ fun
|
||||
heissen_V3 : V3 ;
|
||||
heizen_V2 : V2 ;
|
||||
heizen_V : V ;
|
||||
helfen_dat_V2V : V2V ;
|
||||
helfen_dat_bei_V3 : V3 ;
|
||||
hellen_es_esV : V ;
|
||||
hellenisieren_V2 : V2 ;
|
||||
|
||||
@@ -13,7 +13,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
ConjVPI = conjunctDistrTable Bool ;
|
||||
|
||||
ComplVPIVV v vpi =
|
||||
insertInf (vpi.s ! v.isAux) (
|
||||
-- insertInf (vpi.s ! v.isAux) (
|
||||
insertInf {s=(vpi.s ! v.isAux);isAux=v.isAux;ctrl=SubjC} ( -- HL ??
|
||||
predVGen v.isAux v) ; ----
|
||||
{-
|
||||
insertExtrapos vpi.p3 (
|
||||
@@ -42,15 +43,19 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
DetNPMasc det = {
|
||||
s = \\c => det.sp ! Masc ! c ; ---- genders
|
||||
a = agrP3 det.n ;
|
||||
isPron = False ;
|
||||
ext, adv, rc = []
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext, rc = []
|
||||
} ;
|
||||
|
||||
DetNPFem det = {
|
||||
s = \\c => det.sp ! Fem ! c ; ---- genders
|
||||
a = agrP3 det.n ;
|
||||
isPron = False ;
|
||||
ext, adv, rc = []
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext, rc = []
|
||||
} ;
|
||||
|
||||
EmptyRelSlash slash = {
|
||||
@@ -63,7 +68,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
PassVPSlash vp =
|
||||
let c = case <vp.c2.c,vp.c2.isPrep> of {
|
||||
<NPC Acc,False> => NPC Nom ;
|
||||
_ => vp.c2.c}
|
||||
_ => vp.c2.c}
|
||||
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||
{subjc = vp.c2 ** {c= c}} ;
|
||||
-- regulates passivised object: accusative objects -> nom; all others: same case
|
||||
@@ -73,8 +78,12 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
PassAgentVPSlash vp np = ---- "von" here, "durch" in StructuralGer
|
||||
insertObj (\\_ => (PastPartAgentAP (lin VPSlash vp) (lin NP np)).s ! APred) (predV werdenPass) ;
|
||||
|
||||
Pass3V3 v = -- HL 7/19
|
||||
let bekommenPass : Verb = P.habenV (P.irregV "bekommen" "bekommt" "bekam" "bekäme" "bekommen")
|
||||
in insertObj (\\_ => (v.s ! VPastPart APred)) (predV bekommenPass) ** { subjc = PrepNom ; c2 = v.c2 } ;
|
||||
|
||||
PastPartAP vp = {
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ vp.a2 ++ vp.inf ++
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ vp.inf.s ++
|
||||
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||
isPre = True ;
|
||||
c = <[],[]> ;
|
||||
@@ -84,7 +93,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
PastPartAgentAP vp np =
|
||||
let agent = appPrepNP P.von_Prep np
|
||||
in {
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ vp.a2 ++ agent ++ vp.inf ++
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ agent ++
|
||||
vp.inf.s ++
|
||||
vp.c2.s ++ --- junk if not TV
|
||||
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||
isPre = True ;
|
||||
@@ -128,21 +138,35 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
m = tm.m ;
|
||||
subj = [] ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = tm.s ++ p.s ++ vp.a1 ! b ;
|
||||
obj0 = (vp.nn ! agr).p1 ;
|
||||
obj = (vp.nn ! agr).p2 ;
|
||||
compl = obj0 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||
inf = vp.inf ++ verb.inf ;
|
||||
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
||||
-- obj1 = (vp.nn ! agr).p1 ;
|
||||
-- obj = (vp.nn ! agr).p2 ;
|
||||
-- compl = obj1 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||
obj1 = (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ; -- refl ++ pronouns ++ nonpronouns
|
||||
obj2 = (vp.nn ! agr).p3 ; -- pp-objects
|
||||
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
||||
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
||||
inf = vp.inf.s ++ verb.inf ++ verb.inf2 ;
|
||||
extra = vp.ext ;
|
||||
inffin : Str =
|
||||
case <a,vp.isAux> of {
|
||||
<Anter,True> => verb.fin ++ inf ; -- double inf --# notpresent
|
||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||
}
|
||||
infE : Str = -- HL 30/6/2019
|
||||
case <t,a,vp.isAux> of {
|
||||
<Fut|Cond,Simul,True> => inf ; --# notpresent
|
||||
<Fut|Cond,Anter,True> -- Duden 318: kommen wollen haben => haben kommen wollen --# notpresent
|
||||
=> verb.inf2 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||
<_,Anter,True> => inf ; --# notpresent
|
||||
_ => verb.inf ++ verb.inf2 ++ vp.inf.s } ;
|
||||
inffin : Str =
|
||||
case <t,a,vp.isAux> of {
|
||||
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
||||
=> verb.fin ++ verb.inf2 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||
<_,Anter,True> --# notpresent
|
||||
=> verb.fin ++ inf ; -- double inf --# notpresent
|
||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||
} ;
|
||||
in
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ inf ++ extra ;
|
||||
Inv => verb.fin ++ subj ++ compl ++ vp.infExt ++ inf ++ extra ;
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ infE ++ extra ;
|
||||
Inv => verb.fin ++ subj ++ compl ++ vp.infExt ++ infE ++ extra ;
|
||||
Sub => subj ++ compl ++ vp.infExt ++ inffin ++ extra
|
||||
}
|
||||
} ;
|
||||
@@ -189,8 +213,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
|
||||
lin
|
||||
EsVV vv vp = predV vv ** {
|
||||
nn = \\a => let n = vp.nn ! a in <"es" ++ n.p1 , n.p2 > ;
|
||||
inf = vp.s.s ! (VInf True) ++ vp.inf ; -- ich genieße es zu versuchen zu gehen; alternative word order could be produced by vp.inf ++ vp.s.s... (zu gehen zu versuchen)
|
||||
nn = \\a => let n = vp.nn ! a in <"es" ++ n.p1, n.p2, n.p3, n.p4, n.p5, n.p6> ;
|
||||
inf = vp.inf ** {s = vp.s.s ! (VInf True) ++ vp.inf.s} ; -- ich genieße es zu versuchen zu gehen; alternative word order could be produced by vp.inf ++ vp.s.s... (zu gehen zu versuchen)
|
||||
a1 = vp.a1 ;
|
||||
a2 = vp.a2 ;
|
||||
ext = vp.ext ;
|
||||
@@ -198,7 +222,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
adj = vp.adj } ;
|
||||
|
||||
EsV2A v2a ap s = predV v2a ** {
|
||||
nn = \\_ => <"es",[]> ;
|
||||
nn = \\_ => <"es",[],[],[],[],[]> ;
|
||||
adj = ap.s ! APred ;
|
||||
ext = "," ++ "dass" ++ s.s ! Sub} ;
|
||||
|
||||
@@ -213,7 +237,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
let vp = predV werdenPass ;
|
||||
in vp ** {
|
||||
subj = esSubj ;
|
||||
inf = v.s ! VPastPart APred } ; -- construct the formal clause
|
||||
inf = vp.inf ** {s = v.s ! VPastPart APred } } ; -- construct the formal clause
|
||||
|
||||
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
||||
|
||||
@@ -229,9 +253,12 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
|
||||
esSubj : NP = lin NP {
|
||||
s = \\_ => "es" ;
|
||||
rc, ext, adv = [] ;
|
||||
rc, ext = [] ;
|
||||
a = Ag Neutr Sg P3 ;
|
||||
isPron = True} ;
|
||||
-- isLight = True ;
|
||||
-- isPron = True
|
||||
w = WPron
|
||||
} ;
|
||||
|
||||
DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp ->
|
||||
let vps = useVP vp in {
|
||||
@@ -242,11 +269,11 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
_ => False
|
||||
} ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = vp.a1 ! b ;
|
||||
obj0 = (vp.nn ! agr).p1 ;
|
||||
obj = (vp.nn ! agr).p2 ;
|
||||
compl = obj0 ++ neg ++ vp.adj ++ obj ++ vp.a2 ; -- adj added
|
||||
inf = vp.inf ++ verb.inf ; -- not used for linearisation of Main/Inv
|
||||
neg = vp.a1 ++ negation ! b ; -- HL 8/19 vp.a1 ! b ;
|
||||
obj1 = (vp.nn ! agr).p1 ;
|
||||
obj2 = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ;
|
||||
compl = obj1 ++ neg ++ vp.adj ++ obj2 ++ vp.a2 ; -- adj added
|
||||
inf = vp.inf.s ++ verb.inf ; -- not used for linearisation of Main/Inv
|
||||
extra = vp.ext ;
|
||||
inffin : Str =
|
||||
case <a,vp.isAux> of {
|
||||
@@ -255,8 +282,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
}
|
||||
in
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
||||
Inv => verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf.s ;
|
||||
Inv => verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf.s ;
|
||||
Sub => compl ++ vp.infExt ++ inffin ++ extra }
|
||||
} ;
|
||||
|
||||
|
||||
@@ -26,4 +26,5 @@ abstract ExtraGerAbs = Extra [
|
||||
AdvFor : Adv -> FClause -> FClause ; -- es wird heute gelacht - addition of adverbs
|
||||
FtoCl : FClause -> Cl ; -- embedding FClause within the RGL, to allow generation of S, Utt, etc.
|
||||
|
||||
Pass3V3 : V3 -> VPSlash ; -- wir bekommen den Beweis erklärt
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ in {
|
||||
lin werben_V = irregV "werben" "wirbt" "warb" "würbe" "geworben" ;
|
||||
lin werden_V = lin V (M.mkV "werden" "werde" "wirst" "wird" "werdet" "werd"
|
||||
"wurde" "wurdest" "wurden" "wurdet"
|
||||
"würde" "geworden" [] M.VHaben) ;
|
||||
"würde" "geworden" [] M.VSein) ;
|
||||
lin werfen_V = irregV "werfen" "wirft" "warf" "würfe" "geworfen" ;
|
||||
lin wiegen_V = irregV "wiegen" "wiegt" "wog" "wöge" "gewogen" ;
|
||||
lin winden_V = irregV "winden" "windt" "wand" "wände" "gewunden" ;
|
||||
|
||||
@@ -169,8 +169,8 @@ lin
|
||||
sea_N = reg2N "Meer" "Meere" neuter ;
|
||||
seek_V2 = dirV2 (regV "suchen") ;
|
||||
see_V2 = dirV2 Irreg.sehen_V ;
|
||||
sell_V3 = accdatV3 (no_geV (regV "verkaufen")) ;
|
||||
send_V3 = accdatV3 (regV "schicken") ;
|
||||
sell_V3 = mkV3 (no_geV (regV "verkaufen")) ; -- Eng: mkV3 v noPrep toPrep
|
||||
send_V3 = mkV3 (regV "schicken") ; -- Ger mkV3 v = Ger: mkV3 v accPrep datPrep
|
||||
sheep_N = reg2N "Schaf" "Schafe" neuter ;
|
||||
ship_N = reg2N "Schiff" "Schiffe" neuter ;
|
||||
shirt_N = reg2N "Hemd" "Hemden" neuter ; ---- infl
|
||||
@@ -196,7 +196,7 @@ lin
|
||||
switch8off_V2 = dirV2 (prefixV "aus" (regV "schalten")) ;
|
||||
switch8on_V2 = dirV2 (prefixV "ein" (regV "schalten")) ;
|
||||
table_N = mkN "Tisch" ;
|
||||
talk_V3 = mkV3 (regV "reden") datPrep von_Prep ;
|
||||
talk_V3 = mkV3 (regV "reden") (mkPrep "mit" dative) (mkPrep "über" accusative) ; -- 6/2019
|
||||
teacher_N = reg2N "Lehrer" "Lehrer" masculine ;
|
||||
teach_V2 = dirV2 (no_geV (regV "unterrichten")) ;
|
||||
television_N = reg2N "Fernsehen" "Fernsehen" neuter;
|
||||
@@ -316,7 +316,8 @@ lin
|
||||
flow_V = seinV (Irreg.fließen_V) ;
|
||||
fly_V = seinV (Irreg.fliegen_V) ;
|
||||
freeze_V = Irreg.frieren_V ;
|
||||
give_V3 = accdatV3 Irreg.geben_V ;
|
||||
give_V3 = accdatV3 Irreg.geben_V ; -- c2=datPrep, c3=accPrep, to fit
|
||||
-- to Eng ditransitive: give sb(indir) sth(dir) (no preposition)
|
||||
laugh_V = regV "lachen" ;
|
||||
lie_V = Irreg.lügen_V ;
|
||||
play_V = regV "spielen" ;
|
||||
|
||||
@@ -20,10 +20,12 @@ oper
|
||||
mkPrep : Str -> PCase -> Preposition = \s,c ->
|
||||
{s = s ; s2 = [] ; c = c ; isPrep = True} ;
|
||||
|
||||
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ; isPron : Bool ; ext,adv,rc : Str} = \name -> heavyNP {
|
||||
nameNounPhrase : {s : Case => Str} -> {s : PCase => Str ; a : Agr ;
|
||||
-- isLight, isPron : Bool ;
|
||||
w : Weight ;
|
||||
ext,rc : Str} = \name -> heavyNP {
|
||||
s = \\c => usePrepC c (\k -> name.s ! k) ;
|
||||
a = agrP3 Sg ;
|
||||
ext, adv, rc = [] -- added
|
||||
a = agrP3 Sg
|
||||
} ;
|
||||
|
||||
detLikeAdj : Bool -> Number -> Str ->
|
||||
|
||||
@@ -2,36 +2,46 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
-- Remark: np.isLight makes ResGer.insertObjNP expensive, for ComplSlash, SlashVP
|
||||
|
||||
lin
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ! cn.g ! c ++
|
||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k) ;
|
||||
a = agrgP3 cn.g det.n ;
|
||||
isPron = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
||||
rc = cn.rc ! det.n ;
|
||||
adv = cn.adv ;
|
||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k ++ cn.adv) ;
|
||||
a = agrgP3 cn.g det.n ;
|
||||
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
||||
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
||||
-- don't see a|no man = sehe keinen Mann
|
||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
||||
rc = cn.rc ! det.n ;
|
||||
ext = cn.ext
|
||||
} ;
|
||||
|
||||
DetNP det = {
|
||||
s = \\c => det.sp ! Neutr ! c ; -- more genders in ExtraGer
|
||||
s = \\c => det.sp ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||
a = agrP3 det.n ;
|
||||
isPron = det.isDef ;
|
||||
rc, adv, ext = []
|
||||
-- isLight = det.isDef ;
|
||||
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
UsePN pn = {
|
||||
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
||||
a = agrgP3 pn.g Sg ;
|
||||
isPron = True ; --- means: this is not a heavy NP, but comes before negation
|
||||
rc, adv, ext = []
|
||||
-- isLight = True ; -- means: this is not a heavy NP, but comes before negation
|
||||
-- isPron = False ; -- HL 6/2019: to regulate Pron/NonPronNP order
|
||||
w = WLight ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
UsePron pron = {
|
||||
s = \\c => usePrepC c (\k -> pron.s ! NPCase k) ;
|
||||
a = pron.a ;
|
||||
isPron = True ;
|
||||
rc, adv, ext = []
|
||||
-- isLight = True ;
|
||||
-- isPron = True ;
|
||||
w = WPron ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
PredetNP pred np =
|
||||
@@ -40,25 +50,32 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
let c = case pred.c.k of {NoCase => c0 ; PredCase k => k} in
|
||||
pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ np.s ! c ;
|
||||
a = ag ;
|
||||
isPron = False
|
||||
-- isLight = False ;
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
|
||||
PPartNP np v2 = np ** {
|
||||
s = \\c => np.s ! c ++ v2.s ! VPastPart APred ; --- invar part
|
||||
isPron = False
|
||||
s = \\c => np.s ! c ++ embedInCommas (v2.s ! VPastPart APred) ; --- invar part
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
{- possibly structures such as
|
||||
"sie ist eine erfolgreiche Frau geliebt von vielen"
|
||||
but only with v2 not possible in German? -}
|
||||
{- "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
||||
HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
||||
-}
|
||||
|
||||
AdvNP np adv = np ** {
|
||||
adv = np.adv ++ adv.s ;
|
||||
isPron = False
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
-- isLight = False ;
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
|
||||
ExtAdvNP np adv = np ** {
|
||||
adv = np.adv ++ embedInCommas adv.s ;
|
||||
isPron = False
|
||||
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
||||
-- isLight = False ;
|
||||
-- isPron = False
|
||||
w = WHeavy
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord =
|
||||
@@ -83,7 +100,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
s = \\g,c => quant.s ! num.isNum ! n ! g ! c ++ (let k = (prepC c).c in
|
||||
num.s!g!k) ;
|
||||
sp = \\g,c => quant.sp ! num.isNum ! n ! g ! c ++ (let k = (prepC c).c in
|
||||
num.s!g!k) ;
|
||||
num.s!g!k) ; -- HL: der+er,den+en ; der drei,den drei+en
|
||||
n = n ;
|
||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
||||
@@ -116,7 +133,16 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
|
||||
DefArt = {
|
||||
s = \\_,n,g,c => artDefContr (gennum g n) c ;
|
||||
sp = \\_,n,g,c => artDefContr (gennum g n) c ; ---- deren, denem...
|
||||
-- sp = \\_,n,g,c => artDefContr (gennum g n) c ; ---- deren, denen ...
|
||||
sp = \\_,n,g,c => case <n,c> of {
|
||||
<Sg,NPP p> => let sp = prepC c ; gn = gennum g n
|
||||
in sp.s ++ artDef ! gn ! sp.c ;
|
||||
<Pl,NPP CInAcc> => let sp = prepC c in sp.s ++ "die" ;
|
||||
<Pl,NPP p> => let sp = prepC c ; gn = gennum g n
|
||||
in sp.s ++ (artDef ! gn ! sp.c + "en") ;
|
||||
<Pl,NPC Dat> => "denen" ; -- HL 6/2019
|
||||
<Pl,NPC Gen> => "derer" ; -- HL 6/2019
|
||||
_ => artDefContr (gennum g n) c } ; -- von den+en
|
||||
a, aPl = Weak
|
||||
} ;
|
||||
|
||||
@@ -139,19 +165,20 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
} ;
|
||||
|
||||
MassNP cn = {
|
||||
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ;
|
||||
s = \\c => usePrepC c (\k -> cn.s ! Strong ! Sg ! k) ++ cn.adv ;
|
||||
a = agrgP3 cn.g Sg ;
|
||||
isPron = False ;
|
||||
rc = cn.rc ! Sg ;
|
||||
adv = cn.adv ;
|
||||
ext = cn.ext
|
||||
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
||||
-- isPron = False ;
|
||||
w = WLight ;
|
||||
rc = cn.rc ! Sg ;
|
||||
ext = cn.ext
|
||||
} ;
|
||||
|
||||
UseN, UseN2 = \n -> {
|
||||
s = \\_ => n.s ;
|
||||
g = n.g ;
|
||||
rc = \\_ => [] ;
|
||||
ext,adv = []
|
||||
rc = \\_ => [] ;
|
||||
ext,adv = []
|
||||
} ;
|
||||
|
||||
ComplN2 f x = {
|
||||
@@ -170,8 +197,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
} ;
|
||||
g = f.g ;
|
||||
c2 = f.c3 ;
|
||||
rc = \\_ => [] ;
|
||||
ext,adv = []
|
||||
} ;
|
||||
|
||||
Use2N3 f = f ;
|
||||
@@ -197,7 +222,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
|
||||
RelNP np rs = np ** {
|
||||
rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ;
|
||||
isPron = False } ;
|
||||
-- isPron = False
|
||||
w = case isPron np of { True => WLight ; _ => np.w }
|
||||
} ;
|
||||
|
||||
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
||||
|
||||
|
||||
@@ -286,11 +286,11 @@ mkV2 : overload {
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
|
||||
accdatV3 : V -> V3 ; -- geben + dat + acc (no prepositions)
|
||||
accdatV3 : V -> V3 ; -- geben + dat(c2) + acc(c3) (Eng: no prepositions)
|
||||
dirV3 : V -> Prep -> V3 ; -- senden + acc + nach (preposition on second arg)
|
||||
|
||||
mkV3 : overload {
|
||||
mkV3 : V -> V3 ; -- geben + dat + acc
|
||||
mkV3 : V -> V3 ; -- geben + dat(c3) + acc(c2) (Eng: give sth to-sb)
|
||||
mkV3 : V -> Prep -> Prep -> V3 ; -- sprechen + mit + über
|
||||
} ;
|
||||
|
||||
@@ -302,7 +302,7 @@ mkV2 : overload {
|
||||
mkV0 : V -> V0 ; --%
|
||||
mkVS : V -> VS ;
|
||||
|
||||
mkV2V : overload { -- with zu
|
||||
mkV2V : overload { -- with zu; object-control
|
||||
mkV2V : V -> V2V ;
|
||||
mkV2V : V -> Prep -> V2V ;
|
||||
} ;
|
||||
@@ -310,6 +310,8 @@ mkV2 : overload {
|
||||
auxV2V : V -> V2V ;
|
||||
auxV2V : V -> Prep -> V2V ;
|
||||
} ;
|
||||
subjV2V : V2V -> V2V ; -- force subject-control
|
||||
|
||||
mkV2A : overload {
|
||||
mkV2A : V -> V2A ;
|
||||
mkV2A : V -> Prep -> V2A ;
|
||||
@@ -584,36 +586,37 @@ mkV2 : overload {
|
||||
mkV3 : V -> V3
|
||||
= \v -> lin V3 (v ** {c2 = accPrep ; c3 = datPrep}) ;
|
||||
mkV3 : V -> Prep -> Prep -> V3
|
||||
= \v,c,d -> v ** {c2 = c ; c3 = d ; lock_V3 = <>} ;
|
||||
= \v,c,d -> lin V3 (v ** {c2 = c ; c3 = d}) ;
|
||||
} ;
|
||||
|
||||
dirV3 v p = mkV3 v (mkPrep [] accusative) p ;
|
||||
accdatV3 v = mkV3 v (mkPrep [] dative) (mkPrep [] accusative) ;
|
||||
|
||||
dirV3 v p = mkV3 v accPrep p ; -- accPrep sets isPrep=False
|
||||
accdatV3 v = mkV3 v datPrep accPrep ; -- to fit to Eng ditransitives (no preposition):
|
||||
-- give sb(indir) sth(dir) = geben jmdm(dat) etwas(acc)
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkVV v = v ** {isAux = False ; lock_VV = <>} ;
|
||||
auxVV v = v ** {isAux = True ; lock_VV = <>} ;
|
||||
|
||||
V0 : Type = V ;
|
||||
-- V2S, V2V, V2Q : Type = V2 ;
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
|
||||
mkV0 v = v ** {lock_V = <>} ;
|
||||
|
||||
mkV2V = overload {
|
||||
mkV2V = overload { -- default: object-control
|
||||
mkV2V : V -> V2V
|
||||
= \v -> dirV2 v ** {isAux = False ; lock_V2V = <>} ;
|
||||
= \v -> dirV2 v ** {isAux = False ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||
mkV2V : V -> Prep -> V2V
|
||||
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2V = <>} ;
|
||||
= \v,p -> prepV2 v p ** {isAux = False ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||
} ;
|
||||
auxV2V = overload {
|
||||
auxV2V : V -> V2V
|
||||
= \v -> dirV2 v ** {isAux = True ; lock_V2V = <>} ;
|
||||
= \v -> dirV2 v ** {isAux = True ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||
auxV2V : V -> Prep -> V2V
|
||||
= \v,p -> prepV2 v p ** {isAux = True ; lock_V2V = <>} ;
|
||||
= \v,p -> prepV2 v p ** {isAux = True ; ctrl = ObjC ; lock_V2V = <>} ;
|
||||
} ;
|
||||
subjV2V v = v ** {ctrl = SubjC} ;
|
||||
|
||||
mkV2A = overload {
|
||||
mkV2A : V -> V2A
|
||||
= \v -> dirV2 v ** {isAux = False ; lock_V2A = <>} ;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
--# -path=.:../abstract:../common:../prelude:
|
||||
|
||||
--1 German auxiliary operations.
|
||||
--
|
||||
@@ -74,7 +74,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
||||
-- A number is sometimes inherited ("alle Menschen"),
|
||||
-- sometimes forced ("jeder von Mwnschen").
|
||||
-- sometimes forced ("jeder von den Menschen").
|
||||
|
||||
param
|
||||
PredetCase = NoCase | PredCase PCase ;
|
||||
@@ -82,6 +82,16 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
oper
|
||||
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
||||
|
||||
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
||||
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
||||
param
|
||||
Weight = WPron | WLight | WHeavy ;
|
||||
oper
|
||||
isPron : {w : Weight} -> Bool = \np ->
|
||||
case np.w of {WPron => True ; _ => False} ;
|
||||
isLight : {w : Weight} -> Bool = \np ->
|
||||
case np.w of {WHeavy => False ; _ => True} ;
|
||||
|
||||
--2 For $Adjective$
|
||||
|
||||
-- The predicative form of adjectives is not inflected further.
|
||||
@@ -114,7 +124,11 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
param VType = VAct | VRefl Case ;
|
||||
|
||||
-- The order of sentence is depends on whether it is used as a main
|
||||
-- Implicit subject of embedded vp equals subject resp. object of matrix verb v:V2V:
|
||||
|
||||
param Control = SubjC | ObjC | NoC ; -- NoC : verb without infinite vp-complement
|
||||
|
||||
-- The order of a sentence depends on whether it is used as a main
|
||||
-- clause, inverted, or subordinate.
|
||||
|
||||
param
|
||||
@@ -189,7 +203,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
case <t,m> of {
|
||||
<Pres,MIndic> => VFin b (VPresInd an ap) ;
|
||||
<Pres,MConjunct> => VFin b (VPresSubj an ap)
|
||||
; --# notpresent
|
||||
; --# notpresent
|
||||
<Past,MIndic> => VFin b (VImpfInd an ap) ; --# notpresent
|
||||
<Past,MConjunct> => VFin b (VImpfSubj an ap) ; --# notpresent
|
||||
_ => VInf False --# notpresent
|
||||
@@ -239,11 +253,13 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
NP : Type = {
|
||||
s : PCase => Str ;
|
||||
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
||||
ext : Str ; -- die Frage , [sc wo sie schläft])
|
||||
adv : Str ; -- die Frage [a von Max]
|
||||
a : Agr ;
|
||||
isPron : Bool } ;
|
||||
rc : Str ; -- die Frage , [rc die ich gestellt habe]
|
||||
ext : Str ; -- die Frage , [sc wo sie schläft] ; die Regel , [vp kein Fleisch zu essen] | [s dass ...]
|
||||
-- adv : Str ; -- die Frage [a von Max] -- HL: cannot be extracted
|
||||
a : Agr ;
|
||||
-- isLight : Bool ; -- light NPs come before negation in simple clauses (expensive)
|
||||
-- isPron : Bool } ; -- needed to put accPron before datPron
|
||||
w : Weight } ;
|
||||
|
||||
mkN : (x1,_,_,_,_,x6,x7 : Str) -> Gender -> Noun =
|
||||
\Mann, Mannen, Manne, Mannes, Maenner, Maennern, Mann_, g -> {
|
||||
@@ -398,7 +414,10 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
-- Prepositions for complements indicate the complement case.
|
||||
|
||||
Preposition : Type = {s : Str ; s2 : Str ; c : PCase ; isPrep : Bool} ; -- s2 is postposition
|
||||
Preposition : Type = {s : Str ; s2 : Str ; c : PCase ; isPrep : Bool} ;
|
||||
|
||||
-- HL 7/19: German has very few circumpositions: um (Gen) Willen, von (Adv) an|ab|aus
|
||||
-- ? bis (Adv) hin|her. So maybe we should skip s2 (and save readings with empty preps).
|
||||
|
||||
-- To apply a preposition to a complement.
|
||||
|
||||
@@ -409,10 +428,9 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
prep.s ++ np.s ! prep.c ++ bigNP np ++ prep.s2 ;
|
||||
-- revised appPrep for discontinuous NPs
|
||||
|
||||
bigNP : NP -> Str = \np ->
|
||||
np.adv ++ np.ext ++ np.rc ;
|
||||
bigNP : NP -> Str = \np -> np.ext ++ np.rc ;
|
||||
|
||||
-- To build a preposition from just a case.
|
||||
-- To build a preposition from just a case. -- HL 9/19: no longer used in RGL
|
||||
|
||||
noPreposition : Case -> Preposition = \c ->
|
||||
{s,s2 = [] ; c = NPC c ; isPrep = False} ;
|
||||
@@ -502,28 +520,28 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
VPC : Type = {
|
||||
s : Bool => Agr => VPForm => { -- True = prefix glued to verb
|
||||
fin : Str ; -- hat
|
||||
inf : Str -- wollen
|
||||
}
|
||||
fin : Str ; -- wird
|
||||
inf, inf2 : Str -- lesen,[] | gelesen,haben | können,haben (= gekonnt,haben)
|
||||
} -- HL 11/6/2019 Fut Anter: lesen gekonnt haben => haben lesen können
|
||||
} ;
|
||||
|
||||
VP : Type = {
|
||||
s : Verb ;
|
||||
nn : Agr => Str * Str ; -- dich/deine Frau
|
||||
a1 : Polarity => Str ; -- nicht = adV
|
||||
s : Verb ; -- HL 6/2019: <refl|pron,NP,PP,AP|CN|Adv,ObjInf,EmbedInfs>
|
||||
nn : Agr => Str * Str * Str * Str -- <sich|ihr,deine Frau,an sie,gut,
|
||||
* Str * Str ; -- splitInfExt: (rate) dir, dich zu bemühen mir zu helfen>
|
||||
a1 : Str ; -- adv before negation, adV
|
||||
a2 : Str ; -- heute = adv
|
||||
adj : Str ; -- space for adjectival complements ("ich finde dich schön")
|
||||
adj : Str ; -- adjectival complement ("ich finde dich schön")
|
||||
isAux : Bool ; -- is a double infinitive
|
||||
inf : Str ; -- sagen
|
||||
inf : {s:Str ; isAux:Bool ; ctrl:Control} ; -- infinitival complement of VV or V2V
|
||||
ext : Str ; -- dass sie kommt
|
||||
infExt : Str ; -- infinitival complements of inf e.g. ich hoffe [zu gehen] zu versuchen
|
||||
subjc : Preposition -- determines case of "subj"
|
||||
} ;
|
||||
infExt : Str ; -- infinitival complements of inf
|
||||
-- e.g. ich hoffe [ihr zu helfen] zu versuchen
|
||||
subjc : Preposition -- case of subject
|
||||
} ;
|
||||
|
||||
predV : Verb -> VPSlash = predVGen False ;
|
||||
|
||||
predVc : Verb ** {c2 : Preposition} -> VPSlash = \v ->
|
||||
predV v ** {c2 = v.c2} ;
|
||||
VPSlash = VP ** {c2 : Preposition ;
|
||||
objCtrl : Bool } ; -- True = embedded reflexives agree with object
|
||||
|
||||
useVP : VP -> VPC = \vp ->
|
||||
let
|
||||
@@ -552,33 +570,36 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
werden_V.s ! VFin False (VImpfSubj (numberAgr a) (personAgr a)) ; --# notpresent
|
||||
|
||||
auf = verb.prefix ;
|
||||
|
||||
vf : Bool -> Str -> Str -> {fin,inf : Str} = \b,fin,inf -> {
|
||||
vf : Bool -> Str -> Str -> Str -> {fin,inf,inf2 : Str} = \b,fin,inf,inf2 -> {
|
||||
fin = fin ;
|
||||
inf = verb.particle ++ if_then_Str b [] auf ++ inf --- negation of main b
|
||||
} ;
|
||||
|
||||
inf = verb.particle ++ if_then_Str b [] auf ++ inf ; --- negation of main b
|
||||
inf2 = inf2
|
||||
} ;
|
||||
in {
|
||||
s = \\b,a => table {
|
||||
VPFinite m t Simul => case t of {
|
||||
-- Pres | Past => vf (vfin m t a) [] ; -- the general rule
|
||||
Past => vf b (vfin b m t a) [] ; --# notpresent
|
||||
Fut => vf True (wird m a) vinf ; --# notpresent
|
||||
Cond => vf True (wuerde a) vinf ; --# notpresent
|
||||
Pres => vf b (vfin b m t a) []
|
||||
Past => vf b (vfin b m t a) [] [] ; --# notpresent
|
||||
Fut => vf True (wird m a) vinf [] ; --# notpresent
|
||||
Cond => vf True (wuerde a) vinf [] ; --# notpresent
|
||||
Pres => vf b (vfin b m t a) [] []
|
||||
} ;
|
||||
VPFinite m t Anter => case t of { --# notpresent
|
||||
Pres | Past => vf True (hat m t a) vpart ; --# notpresent
|
||||
Fut => vf True (wird m a) (vpart ++ haben) ; --# notpresent
|
||||
Cond => vf True (wuerde a) (vpart ++ haben) --# notpresent
|
||||
} ; --# notpresent
|
||||
VPImperat False => vf False (verb.s ! VImper (numberAgr a)) [] ;
|
||||
VPImperat True => vf False (verb.s ! VFin False (VPresSubj Pl P3)) [] ;
|
||||
VPInfinit Anter => vf True [] (vpart ++ haben) ; --# notpresent
|
||||
VPInfinit Simul => vf True [] (verb.s ! VInf b)
|
||||
VPFinite m t Anter => case t of { --# notpresent
|
||||
Pres | Past => vf True (hat m t a) vpart [] ; --# notpresent
|
||||
Fut => vf True (wird m a) vpart haben ; --# notpresent
|
||||
Cond => vf True (wuerde a) vpart haben --# notpresent
|
||||
} ; --# notpresent
|
||||
VPImperat False => vf False (verb.s ! VImper (numberAgr a)) [] [] ;
|
||||
VPImperat True => vf False (verb.s ! VFin False (VPresSubj Pl P3)) [] [] ;
|
||||
VPInfinit Anter => vf True [] (vpart ++ haben) [] ; --# notpresent
|
||||
VPInfinit Simul => vf True [] (verb.s ! VInf b) []
|
||||
}
|
||||
} ;
|
||||
|
||||
predV : Verb -> VPSlash = predVGen False ;
|
||||
|
||||
predVc : Verb ** {c2 : Preposition} -> VPSlash = \v ->
|
||||
predV v ** {c2 = v.c2 ; objCtrl = False} ;
|
||||
|
||||
predVGen : Bool -> Verb -> VPSlash = \isAux, verb -> {
|
||||
s = {
|
||||
@@ -588,19 +609,18 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
aux = verb.aux ;
|
||||
vtype = verb.vtype
|
||||
} ;
|
||||
|
||||
a1 : Polarity => Str = negation ;
|
||||
a2 : Str = [] ;
|
||||
nn : Agr => Str * Str = case verb.vtype of {
|
||||
VAct => \\_ => <[],[]> ;
|
||||
VRefl c => \\a => <reflPron ! a ! c,[]>
|
||||
a1,a2 : Str = [] ;
|
||||
nn : Agr => Str * Str * Str * Str * Str * Str = case verb.vtype of {
|
||||
VAct => \\_ => <[],[],[],[],[],[]> ;
|
||||
VRefl c => \\a => <reflPron ! a ! c,[],[],[],[],[]>
|
||||
} ;
|
||||
isAux = isAux ; ----
|
||||
inf,ext,infExt,adj : Str = [] ;
|
||||
inf = {s=[]; isAux=True; ctrl=NoC} ; -- default infinitive complement
|
||||
ext,infExt,adj : Str = [] ; -- (isAux=True => no endcomma)
|
||||
subjc = PrepNom ;
|
||||
-- Dummy values for subtyping.
|
||||
c2 = noPreposition Nom ;
|
||||
missingAdv = False
|
||||
c2 = PrepNom ;
|
||||
objCtrl = False
|
||||
} ;
|
||||
|
||||
auxPerfect : Verb -> VForm => Str = \verb ->
|
||||
@@ -660,37 +680,75 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
Neg => "nicht"
|
||||
} ;
|
||||
|
||||
VPSlash = VP ** {c2 : Preposition ; missingAdv : Bool } ;
|
||||
|
||||
-- IL 24/04/2018 Fixing the scope of reflexives
|
||||
objAgr : { a : Agr } -> VP -> VP = \obj,vp -> vp ** {
|
||||
nn = \\a => vp.nn ! obj.a } ;
|
||||
nn = \\a => vp.nn ! obj.a } ;
|
||||
-- HL: if reflexive only: <vp.nn.p1 ! np.a, vp.nn.p1 ! a, ..>
|
||||
|
||||
-- Extending a verb phrase with new constituents.
|
||||
|
||||
insertObj : (Agr => Str) -> VPSlash -> VPSlash = insertObjNP False ;
|
||||
insertObj : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp -> -- obj:Comp A|Adv|CN
|
||||
vp ** { nn = \\a => let vpnn = vp.nn ! a
|
||||
in <vpnn.p1, vpnn.p2, vpnn.p3, obj ! a ++ vpnn.p4, vpnn.p5, vpnn.p6> } ;
|
||||
|
||||
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||
insertObj obj vp ** {c2 = vp.c2 ; missingAdv = vp.missingAdv } ;
|
||||
insertObj obj vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl } ;
|
||||
|
||||
insertObjNP : Bool -> (Agr => Str) -> VPSlash -> VPSlash = \isPron, obj,vp -> vp ** {
|
||||
nn = \\a =>
|
||||
let vpnn = vp.nn ! a in
|
||||
case isPron of {
|
||||
True => <obj ! a ++ vpnn.p1, vpnn.p2> ;
|
||||
False => < vpnn.p1, obj ! a ++ vpnn.p2>
|
||||
}} ;
|
||||
insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp ->
|
||||
let c = case prep.c of { NPC cc => cc ; _ => Nom } ;
|
||||
obj : Agr => Str = \\_ => appPrepNP prep np ;
|
||||
in vp ** {
|
||||
nn = \\a => -- HL 11/6/19: rough objNP order: (p5,p6 = splitInfExt)
|
||||
let vpnn = vp.nn ! a in -- vfin < accPron < refl < (gen|dat)Pron < nonPronNP < neg < prepNP < vinf|comp
|
||||
{- less expensive if isLight is removed from NPs:
|
||||
case <np.isPron,prep.isPrep,c> of {
|
||||
-- (assuming v.c2=acc) nonPron: dat < acc|gen (acc < gen not enforced)
|
||||
<True, False,Acc> => -- <es|ihn sich, np, pp, comp, _,_>
|
||||
<obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<True, False,_ > => -- <sich ihm, np, pp, comp>
|
||||
<vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,False,Dat> => -- <prons, dat ++ np, pp, comp>
|
||||
<vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,False,_ > => -- <prons, np ++ gen|acc, pp, comp>
|
||||
<vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<_, True,_ > => -- <prons, np, pp++pp, compl>
|
||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4, vpnn.p5, vpnn.p6>
|
||||
}
|
||||
-}
|
||||
-- expensive: -- vfin < accPron < refl < (gen|dat)Pron < lightNP < neg < heavyNP|PP < vinf|comp
|
||||
case <prep.isPrep, np.w, c> of {
|
||||
<True, _,_> => -- <prons, light, heavy++pp, compl,_,_>
|
||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,WPron, Acc> => -- <ihn ++ sich, light, heavy, comp, _,_>
|
||||
<obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,WPron, _ > => -- <sich ++ ihm|seiner, light, heavy, comp>
|
||||
<vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,WLight,Dat> => -- (assuming v.c2=acc) nonPron: dat < acc|gen
|
||||
-- <prons, dat ++ np, heavy, comp>
|
||||
<vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,WHeavy,Dat> => -- <prons, light, dat ++ np, comp>
|
||||
<vpnn.p1, vpnn.p2, obj ! a ++ vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,WLight,_ > => -- <prons, np ++ gen|acc, heavy, comp>
|
||||
<vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
<False,WHeavy,_ > => -- <prons, light, dat ++ np, comp>
|
||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4, vpnn.p5, vpnn.p6> }
|
||||
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
||||
|
||||
isLightComplement : Bool -> Preposition -> Bool = \isPron,prep -> case isPron of {
|
||||
False => False ;
|
||||
_ => case prep.isPrep of {
|
||||
True => False ;
|
||||
_ => True
|
||||
}
|
||||
} ;
|
||||
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
||||
let prep = vp.c2 ;
|
||||
b = notB prep.isPrep ;
|
||||
c = case prep.c of { NPC cc => cc ; _ => Acc } ;
|
||||
obj : Agr => Str = \\a => prep.s ++ reflPron ! a ! c ;
|
||||
in vp ** {
|
||||
nn = \\a =>
|
||||
let vpnn = vp.nn ! a in
|
||||
case b of {
|
||||
True => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
False => <vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> }
|
||||
} ;
|
||||
|
||||
insertAdV : Str -> VP -> VP = \adv,vp -> vp ** {
|
||||
a1 = \\a => adv ++ vp.a1 ! a } ; -- immer nicht
|
||||
insertAdV : Str -> VP -> VP = \adv,vp -> vp ** { -- not used in RGL, so VP.a1 can be skipped
|
||||
a1 = adv ++ vp.a1 } ; -- cf. AdvVP(Slash),AdVVP(Slash)
|
||||
|
||||
insertAdv : Str -> VP -> VP = \adv,vp -> vp ** {
|
||||
a2 = vp.a2 ++ adv } ;
|
||||
@@ -701,15 +759,25 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertInfExt : Str -> VPSlash -> VPSlash = \infExt,vp -> vp ** {
|
||||
infExt = vp.infExt ++ infExt } ;
|
||||
|
||||
insertInf : Str -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
||||
inf = inf ++ vp.inf } ;
|
||||
-- HL: to handle infExt in ComplVV and SlashVV, SlashV2V
|
||||
insertInfExtraObj : (Agr => Str) -> VPSlash -> VPSlash = \objs,vp -> vp ** {
|
||||
nn = \\a => let vpnn = vp.nn ! a in
|
||||
<vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, objs ! a ++ vpnn.p5, vpnn.p6>
|
||||
} ;
|
||||
insertInfExtraInf : (Agr => Str) -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
||||
nn = \\a => let vpnn = vp.nn ! a in
|
||||
<vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6 ++ inf ! a>
|
||||
} ;
|
||||
|
||||
insertInf : {s:Str;isAux:Bool;ctrl:Control} -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
||||
inf = {s = inf.s ++ vp.inf.s ; isAux = inf.isAux ; ctrl=inf.ctrl} } ;
|
||||
|
||||
insertAdj : Str -> Str * Str -> Str -> VPSlash -> VPSlash = \adj,c,ext,vp -> vp ** {
|
||||
nn = \\a =>
|
||||
let vpnn = vp.nn ! a in
|
||||
<vpnn.p1 ++ c.p1 , vpnn.p2> ;
|
||||
adj = vp.adj ++ adj ++ c.p2 ;
|
||||
ext = vp.ext ++ ext} ;
|
||||
let vpnn = vp.nn ! a in <vpnn.p1, vpnn.p2 ++ c.p1, -- der Frau treu
|
||||
vpnn.p3, vpnn.p4, vpnn.p5, vpnn.p6> ;
|
||||
adj = vp.adj ++ adj ++ c.p2 ; -- neugierig auf das Buch
|
||||
ext = vp.ext ++ ext} ;
|
||||
|
||||
--------------------------------------------
|
||||
--CLAUSE CONSTRUCTION
|
||||
@@ -729,23 +797,56 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
_ => False
|
||||
} ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = vp.a1 ! b ;
|
||||
obj0 = (vp.nn ! agr).p1 ;
|
||||
obj = (vp.nn ! agr).p2 ;
|
||||
compl = obj0 ++ neg ++ vp.adj ++ obj ++ vp.a2 ; -- adj added
|
||||
inf = vp.inf ++ verb.inf ; -- not used for linearisation of Main/Inv
|
||||
extra = vp.ext ;
|
||||
inffin : Str =
|
||||
case <a,vp.isAux> of {
|
||||
<Anter,True> => verb.fin ++ inf ; -- double inf --# notpresent
|
||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||
}
|
||||
neg = negation ! b ;
|
||||
obj1 = (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ; -- refl ++ pronouns ++ light nps
|
||||
obj2 = (vp.nn ! agr).p3 ; -- pp-objects and heavy nps
|
||||
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
||||
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
||||
-- leave inf-complement of +auxV(2)V in place,
|
||||
-- extract infzu-complement of -auxV(2)V: (ComplVV, SlashV2V)
|
||||
infExt : Str * Str = case vp.inf.isAux of
|
||||
{ True => <(vp.nn!agr).p6,[]> ; _ => <[],(vp.nn!agr).p6> } ;
|
||||
extra = infExt.p2 ++ vp.ext ;
|
||||
infCompls = -- () tun | ihn (es tun) lassen | ihm [es zu tun] versprechen
|
||||
(vp.nn ! agr).p5 ++ infExt.p1 ++ vp.inf.s ;
|
||||
comma = case orB vp.isAux (case vp.inf.ctrl of { NoC => True ; _ => False }) of {
|
||||
True => [] ; _ => bindComma} ;
|
||||
inf : Str =
|
||||
case <t,a,vp.isAux> of {
|
||||
<Fut|Cond,Anter,True> => --# notpresent
|
||||
-- haben () tun wollen |
|
||||
-- ihn haben (es tun) lassen wollen () |
|
||||
-- ihm haben () versprechen wollen (, es zu tun)
|
||||
(vp.nn ! agr).p5 ++ verb.inf2 ++ infExt.p1 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||
<_, Anter,True> => --# notpresent
|
||||
-- tun wollen [] | ihn (es tun) lassen wollen [] |
|
||||
-- ihm () versprechen wollen [] (, es zu tun)
|
||||
infCompls ++ verb.inf ++ verb.inf2 ; --# notpresent
|
||||
<Fut|Cond,Simul,True> => --# notpresent
|
||||
infCompls ++ verb.inf ++ verb.inf2 ; --# notpresent
|
||||
<Fut|Cond,Anter,False> => --# notpresent
|
||||
-- gebeten haben , es zu tun () | gebeten haben , ihn (es tun) zu lassen
|
||||
verb.inf ++ verb.inf2 ++ comma ++ infCompls ; --# notpresent
|
||||
_ => verb.inf2 ++ verb.inf ++ comma ++ infCompls } ;
|
||||
inffin : Str =
|
||||
case <t,a,vp.isAux> of {
|
||||
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
||||
=> (vp.nn ! agr).p5 ++ verb.fin --# notpresent
|
||||
++ verb.inf2 ++ infExt.p1 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||
<Pres|Past,Anter,True> --# notpresent
|
||||
=> (vp.nn ! agr).p5 ++ infExt.p1 ++ verb.fin --# notpresent
|
||||
++ vp.inf.s ++ verb.inf ++ verb.inf2 ; -- double inf --# notpresent
|
||||
<_, _ ,True>
|
||||
=> infCompls ++ verb.inf ++ verb.inf2 ++ verb.fin ; -- or just auxiliary vp
|
||||
<_, _ ,False>
|
||||
=> verb.inf ++ verb.inf2 ++ verb.fin ++ comma ++ infCompls
|
||||
} ;
|
||||
in
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
||||
Inv => verb.fin ++ subj ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
||||
Sub => subj ++ compl ++ vp.infExt ++ inffin ++ extra
|
||||
}
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ inf ++ extra ;
|
||||
Inv => verb.fin ++ subj ++ compl ++ inf ++ extra ;
|
||||
Sub => subj ++ compl ++ inffin ++ extra
|
||||
}
|
||||
} ;
|
||||
|
||||
{-
|
||||
@@ -765,11 +866,12 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
es wird nicht besser
|
||||
-}
|
||||
|
||||
infVP : Bool -> VP -> ((Agr => Str) * Str * Str * Str) = \isAux, vp -> let vps = useVP vp in
|
||||
infVP : Bool -> VP -> ((Agr => Str) * Str * Str * Str) =
|
||||
\isAux, vp -> let vps = useVP vp in
|
||||
<
|
||||
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ vp.a2,
|
||||
vp.a1 ! Pos ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf,
|
||||
vp.inf,
|
||||
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.a2,
|
||||
vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf, -- vp.a1 ! Pos
|
||||
vp.inf.s,
|
||||
vp.infExt ++ vp.ext
|
||||
> ;
|
||||
|
||||
@@ -777,6 +879,17 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
let vpi = infVP isAux vp in
|
||||
vpi.p1 ! agrP3 Sg ++ vpi.p3 ++ vpi.p2 ++ vpi.p4 ;
|
||||
|
||||
infzuVP : Bool -> Control -> Anteriority -> Polarity -> VP -- HL
|
||||
-> { objs:(Agr => Str) ; pred:{s:Str;isAux:Bool;ctrl:Control} ; inf:Str ; ext:Str } =
|
||||
\isAux, ctrl, ant, pol, vp -> let vps = useVP vp in
|
||||
{ objs = \\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ negation ! pol ++ (vp.nn ! agr).p3
|
||||
++ vp.a2 ++ (vp.nn ! agr).p4 ; -- objects + predicative A|CN|NP
|
||||
pred = { s = vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit ant).inf ;
|
||||
isAux = vp.isAux ; ctrl = ctrl } ;
|
||||
inf = vp.inf.s ;
|
||||
ext = vp.ext
|
||||
} ;
|
||||
|
||||
-- The nominative case is not used as reflexive, but defined here
|
||||
-- so that we can reuse this in personal pronouns.
|
||||
-- The missing Sg "ihrer" shows that a dependence on gender would
|
||||
@@ -834,15 +947,13 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
infPart : Bool -> Str = \b -> if_then_Str b [] "zu" ;
|
||||
|
||||
heavyNP :
|
||||
{s : PCase => Str ; a : Agr} -> {s : PCase => Str ; a : Agr ; isPron : Bool ; adv,ext,rc : Str} = \np ->
|
||||
np ** {isPron = False; adv,ext,rc = []} ; -- this could be wrong
|
||||
{s : PCase => Str ; a : Agr} -> {s : PCase => Str ; a : Agr ; w : Weight ; ext,rc : Str} = \np ->
|
||||
np ** {w = WHeavy ; ext,rc = []} ; -- this could be wrong
|
||||
|
||||
oper
|
||||
|
||||
relPron : RelGenNum => Case => Str = \\rgn,c =>
|
||||
relPron : RelGenNum => Case => Str = \\rgn,c =>
|
||||
case rgn of {
|
||||
RGenNum gn =>
|
||||
case <gn,c> of {
|
||||
case <gn,c> of {
|
||||
<GSg Fem,Gen> => "deren" ;
|
||||
<GSg g,Gen> => "dessen" ;
|
||||
<GPl,Dat> => "denen" ;
|
||||
@@ -853,13 +964,12 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
} ;
|
||||
|
||||
-- Function that allows the construction of non-nominative subjects.
|
||||
mkSubj : NP -> Preposition -> Str * Agr = \np, subjc ->
|
||||
let
|
||||
sub = subjc ;
|
||||
agr = case sub.c of {
|
||||
NPC Nom => np.a ;
|
||||
_ => Ag Masc Sg P3 } ;
|
||||
subj = appPrepNP sub np
|
||||
in <subj , agr> ;
|
||||
mkSubj : NP -> Preposition -> Str * Agr = \np, subjc ->
|
||||
let
|
||||
sub = subjc ;
|
||||
agr = case sub.c of { NPC Nom => np.a ; _ => Ag Masc Sg P3 } ;
|
||||
subj = appPrepNP sub np
|
||||
in <subj , agr> ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,11 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
} ;
|
||||
agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter
|
||||
verb = vps.s ! False ! agr ! VPImperat ps.p3 ;
|
||||
inf = vp.inf ++ verb.inf ;
|
||||
inf = vp.inf.s ++ verb.inf ; -- HL .nn
|
||||
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4
|
||||
in
|
||||
verb.fin ++ ps.p2 ++
|
||||
(vp.nn ! agr).p1 ++ vp.a1 ! pol ++ (vp.nn ! agr).p2 ++ vp.a2 ++ inf ++ vp.ext
|
||||
-- verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
@@ -49,7 +50,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
(insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = useInfVP False vp} ;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ concrete StructuralGer of Structural = CatGer **
|
||||
we_Pron = mkPronPers "wir" "uns" "uns" "unser" "unser" Fem Pl P1 ;
|
||||
|
||||
whatSg_IP = {s = caselist "was" "was" "was" "wessen" ; n = Sg} ; ----
|
||||
whatPl_IP = {s = caselist "was" "was" "was" "wessen" ; n = Pl} ; ----
|
||||
whatPl_IP = {s = caselist "was" "was" "was" "wessen" ; n = Sg} ; -- HL 6/2016
|
||||
|
||||
when_IAdv = ss "wann" ;
|
||||
when_Subj = ss "wenn" ;
|
||||
@@ -124,7 +124,7 @@ concrete StructuralGer of Structural = CatGer **
|
||||
which_IQuant = {s = \\n,g,c => (detLikeAdj True n "welch").s ! g ! NPC c} ;
|
||||
|
||||
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
|
||||
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Pl} ;
|
||||
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; -- HL 6/2016
|
||||
why_IAdv = ss "warum" ;
|
||||
without_Prep = mkPrep "ohne" P.accusative ;
|
||||
with_Prep = mkPrep "mit" P.dative ;
|
||||
|
||||
@@ -11,21 +11,27 @@ lin
|
||||
CNIntNP cn i = {
|
||||
s = \\c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False ;
|
||||
ext,rc,adv = [] -- added
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext,rc = [] -- added
|
||||
} ;
|
||||
CNSymbNP det cn xs = let g = cn.g in {
|
||||
s = \\c => det.s ! g ! c ++
|
||||
(let k = (prepC c).c in cn.s ! adjfCase det.a k ! det.n ! k) ++ xs.s ;
|
||||
a = agrP3 det.n ;
|
||||
isPron = False ;
|
||||
ext,rc,adv = [] -- added
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext,rc = [] -- added
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! (prepC c).c ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False ;
|
||||
ext,rc,adv = [] -- added
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext,rc = [] -- added
|
||||
} ;
|
||||
|
||||
SymbS sy = {s = \\_ => sy.s} ;
|
||||
|
||||
@@ -4,7 +4,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
|
||||
lin
|
||||
UseV = predV ;
|
||||
|
||||
{-
|
||||
ComplVV v vp =
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
@@ -14,6 +14,32 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
insertInfExt vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObjc vpi.p1 vps))) ;
|
||||
-}
|
||||
-- HL 7/19
|
||||
ComplVV v vp = -- will|wage (es ([]|zu) tun [] | ihn [es tun] ([]|zu) lassen
|
||||
let
|
||||
vps = predVGen v.isAux v ;
|
||||
vpi = infzuVP v.isAux SubjC Simul Pos vp ;
|
||||
-- { objs: ihm ; pred: []/zu versprechen, objInf: sich/es zu tun }
|
||||
-- (ich) vfin:werde (ihm ([]/zu) versprechen) vinf:(wollen/gewagt haben) (, es zu tun)
|
||||
-- (ich) vfin:werde (ihn (es tun) lassen)/[] vinf:(wollen/gewagt haben) []/(, ihn (es tun) zu lassen)
|
||||
extInfzu = case <vp.isAux,vp.inf.isAux> of {<True,False> => (vp.nn!(Ag Masc Sg P3)).p6 ; _ => []} ;
|
||||
comma = case vp.inf.ctrl of { NoC => [] ; _ => bindComma} ; -- es (zu) tun
|
||||
embeddedInf : Agr => Str =
|
||||
case <vp.isAux,vp.inf.isAux> of { -- vv + vp + [embeddedInf]
|
||||
-- will [es lesen] können | will ihn [es lesen] lassen
|
||||
<True,True> => \\agr => (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ;
|
||||
-- will ihn [euch (extInfzu) bitten] lassen
|
||||
<True,False> => \\agr => (vp.nn!agr).p5 ++ vpi.inf ; -- ++ (vp.nn!agr).p6 => extInfzu
|
||||
-- will es lesen [] | will ihn bitten [, es zu lesen] | will ihn bitten [, sie es lesen zu lassen]
|
||||
<False,True> => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ;
|
||||
-- will ihn bitten [, ihr zu helfen, es zu lesen]
|
||||
<False,False> => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 }
|
||||
in
|
||||
insertExtrapos (extInfzu ++ vpi.ext) ( -- vps.ext <- vp's extracted embedded infzu + vp's object-sentence
|
||||
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||
insertInfExtraInf embeddedInf vps))) ;
|
||||
|
||||
ComplVS v s =
|
||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ;
|
||||
@@ -21,54 +47,91 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertAdj (v.c2.s ++ ap.s ! APred) ap.c ap.ext (predV v) ; -- changed
|
||||
|
||||
SlashV2a v = predVc v ;
|
||||
SlashV2a v = (predVc v) ;
|
||||
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => appPrepNP v.c2 np) (predVc v) ** {c2 = v.c3} ;
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => appPrepNP v.c3 np) (predVc v) ;
|
||||
Slash2V3 v np = insertObjNP np v.c2 (predVc v) ** {c2 = v.c3} ;
|
||||
Slash3V3 v np = insertObjNP np v.c3 (predVc v) ;
|
||||
|
||||
SlashV2S v s =
|
||||
insertExtrapos (conjThat ++ s.s ! Sub) (predVc v) ;
|
||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predVc v) ;
|
||||
SlashV2Q v q =
|
||||
insertExtrapos (q.s ! QIndir) (predVc v) ;
|
||||
insertExtrapos (comma ++ q.s ! QIndir) (predVc v) ;
|
||||
{-
|
||||
SlashV2V v vp =
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||
in vps **
|
||||
insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObj vpi.p1 vps)) ;
|
||||
in vps **
|
||||
insertExtrapos vpi.p4 ( -- inplace vp; better extract it!
|
||||
insertInfExt vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObjc vpi.p1 vps))) ;
|
||||
-}
|
||||
SlashV2V v vp = -- jmdn bitten, (\agr => sich!agr das Buch zu merken) HL 7/19
|
||||
let
|
||||
vps = (predVGen v.isAux v) ** { c2 = v.c2 ; objCtrl = case v.ctrl of {ObjC => True ; _ => False}} ;
|
||||
vpi = infzuVP v.isAux v.ctrl Simul Pos vp ;
|
||||
comma : Str = case <vp.isAux,vp.inf.ctrl> of { <True,_> | <_,NoC> => [] ; _ => bindComma} ;
|
||||
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- ihn es lesen (zu) lassen
|
||||
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- ihn (zu) bitten , es zu lesen
|
||||
in
|
||||
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||
insertInfExtraInf embeddedInf vps))) ;
|
||||
|
||||
SlashV2A v ap =
|
||||
SlashV2A v ap =
|
||||
insertAdj (ap.s ! APred) ap.c ap.ext (predVc v) ;
|
||||
|
||||
ComplSlash vps np =
|
||||
let vp = insertObjNP (isLightComplement np.isPron vps.c2) (\\_ => appPrepNP vps.c2 np) vps ;
|
||||
in case vp.missingAdv of {
|
||||
True => vp ;
|
||||
False => objAgr np vp } ; -- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of the object introduced by ComplSlash.
|
||||
|
||||
let vp = insertObjNP np vps.c2 vps ;
|
||||
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
||||
in case vps.objCtrl of { True => objAgr np vp ; _ => vp } ;
|
||||
{-
|
||||
SlashVV v vp =
|
||||
let
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
vps = predVGen v.isAux v ** {c2 = vp.c2} ;
|
||||
vps = predVGen v.isAux v ** {c2 = vp.c2 } ;
|
||||
in vps **
|
||||
insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertInf {s=vpi.p2;isAux=vp.isAux;ctrl=SubjC} ( -- insertInf vpi.p2 (
|
||||
insertObj vpi.p1 vps)) ;
|
||||
-}
|
||||
SlashVV v vp = -- will|hoffe ((zu) lesen | ihr (zu) geben | (zu) bitten, es zu lesen)
|
||||
let
|
||||
vps = (predVGen v.isAux v) ** { c2 = vp.c2 } ;
|
||||
vpi = infzuVP v.isAux SubjC Simul Pos vp ; -- (zu) (lesen | ihr geben | bitten, es zu lesen)
|
||||
comma : Str = case <vp.isAux,vp.inf.ctrl> of { <True,_> | <_,NoC> => [] ; _ => bindComma} ;
|
||||
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- es lesen (zu) lassen
|
||||
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- (zu) bitten, es zu lesen
|
||||
in
|
||||
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||
insertInfExtraInf embeddedInf vps))) ;
|
||||
|
||||
-- {- HL 8/19: this slightly modified SlashV2VNP is expensive even with NP.w:Weight
|
||||
|
||||
-- order of embedded objects wrong:
|
||||
-- Lang> p "the woman that you beg me to listen to" | l
|
||||
-- the woman that you beg me to listen to
|
||||
-- die Frau , der ihr mich zuzuhören bittet
|
||||
-- better: die Frau , der zuzuhören ihr mich bittet
|
||||
|
||||
SlashV2VNP v np vp =
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||
vps = predVGen v.isAux v ** {c2 = vp.c2} ; -- objCtrl = ?
|
||||
in vps **
|
||||
insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertInf {s=vpi.p2;isAux=v.isAux;ctrl=v.ctrl} ( -- insertInf vpi.p2
|
||||
insertObj vpi.p1 (
|
||||
insertObj (\\_ => appPrepNP v.c2 np) vps))) ;
|
||||
|
||||
-- HL: version with infzuVP in tests/german/TestLangGer.gf, too expensive
|
||||
|
||||
UseComp comp =
|
||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||
-- adj slot not used here for e.g. "ich bin alt" but same behaviour as NPs?
|
||||
@@ -77,7 +140,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
UseCopula = predV sein_V ;
|
||||
|
||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.adv ++ np.rc ; ext = np.ext} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.rc ; ext = np.ext} ;
|
||||
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
||||
|
||||
CompCN cn = {s = \\a => case numberAgr a of {
|
||||
@@ -95,11 +158,34 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
AdvVPSlash vp adv = vp ** insertAdv adv.s vp ;
|
||||
AdVVPSlash adv vp = vp ** insertAdv adv.s vp ;
|
||||
|
||||
ReflVP vp = insertObj (\\a => appPrep vp.c2
|
||||
(\\k => usePrepC k (\c -> reflPron ! a ! c))) vp ;
|
||||
-- ReflVP vp = insertObj (\\a => appPrep vp.c2
|
||||
-- (\\k => usePrepC k (\c -> reflPron ! a ! c))) vp ;
|
||||
ReflVP vp = insertObjRefl vp ; -- HL, 19/06/2019
|
||||
|
||||
PassV2 v = insertInf (v.s ! VPastPart APred) (predV werdenPass) ;
|
||||
PassV2 v = insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ;
|
||||
|
||||
VPSlashPrep vp prep = vp ** {c2 = prep ; missingAdv = True} ;
|
||||
{- HL: The construction VPSlashPrep : VP -> Prep -> VPSlash does not exist
|
||||
in German. In abstract/Verb.gf, the example
|
||||
|
||||
VPSlashPrep : VP -> Prep -> VPSlash ; -- live in (it)
|
||||
|
||||
(with live_V:V) indicates that, here, you consider Prep=AdvSlash,
|
||||
so to speak, for building a compact version of relative clauses:
|
||||
|
||||
the city we live in : NP
|
||||
|
||||
from "we live (in the city : Adv) : Cl"
|
||||
|
||||
In German we cannot move the NP part of an Adv, we only have the
|
||||
full relative clauses like
|
||||
|
||||
die Stadt, in der wir leben,
|
||||
die Stadt, worin wir leben, --contracted Prep+Rel
|
||||
|
||||
But: VPSlashPrep is used to parse "sie ist mit mir verheiratet",
|
||||
(ist verheiratet:VP mit:Prep):VPSlash,
|
||||
ComplA2 is used to parse "sie ist verheiratet mit mir"
|
||||
-}
|
||||
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
concrete AllIce of AllIceAbs =
|
||||
LangIce,
|
||||
IrregIce
|
||||
WiktIrregIce -- AR 2019-08-06
|
||||
-- ExtraIce
|
||||
**
|
||||
{
|
||||
|
||||
6746
src/icelandic/DictIce.gf
Normal file
6746
src/icelandic/DictIce.gf
Normal file
File diff suppressed because it is too large
Load Diff
6681
src/icelandic/DictIceAbs.gf
Normal file
6681
src/icelandic/DictIceAbs.gf
Normal file
File diff suppressed because it is too large
Load Diff
6
src/icelandic/DocumentationIce.gf
Normal file
6
src/icelandic/DocumentationIce.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
-- documentation of Icelandic in Icelandic: the default introduced in LangIce
|
||||
|
||||
concrete DocumentationIce of Documentation = CatIce **
|
||||
DocumentationIceFunctor with (Terminology = TerminologyIce) ;
|
||||
6
src/icelandic/DocumentationIceEng.gf
Normal file
6
src/icelandic/DocumentationIceEng.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
-- documentation of Icelandic in English
|
||||
|
||||
concrete DocumentationIceEng of Documentation = CatIce **
|
||||
DocumentationIceFunctor with (Terminology = TerminologyEng) ;
|
||||
203
src/icelandic/DocumentationIceFunctor.gf
Normal file
203
src/icelandic/DocumentationIceFunctor.gf
Normal file
@@ -0,0 +1,203 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
incomplete concrete DocumentationIceFunctor of Documentation = CatIce ** open
|
||||
Terminology, -- the interface that generates different documentation languages
|
||||
ResIce,
|
||||
ParadigmsIce,
|
||||
(G = GrammarIce),
|
||||
(S = SyntaxIce),
|
||||
(L = LexiconIce),
|
||||
Prelude,
|
||||
HTML
|
||||
in {
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
lincat
|
||||
Inflection = {t : Str; s1,s2 : Str} ;
|
||||
Definition = {s : Str} ;
|
||||
Document = {s : Str} ;
|
||||
Tag = {s : Str} ;
|
||||
|
||||
oper
|
||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||
|
||||
lin
|
||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||
t = "s" ;
|
||||
s1 = heading1 (intag "i" (noun.s ! Sg ! Free ! Nom) ++ ":" ++ heading noun_Category ++
|
||||
case noun.g of {
|
||||
Masc => "("+heading masculine_Parameter+")" ;
|
||||
Fem => "("+heading feminine_Parameter+")" ;
|
||||
Neutr => "("+heading neuter_Parameter+")"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (intagAttr "th" "rowspan=2" "" ++ intagAttr "th" "colspan=2" (heading singular_Parameter) ++ intagAttr "th" "colspan=2" (heading plural_Parameter)) ++
|
||||
tr ( th (heading indefinite_Parameter) ++ th (heading definite_Parameter) ++ th (heading indefinite_Parameter) ++ th (heading definite_Parameter)) ++
|
||||
tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Free ! Nom) ++ td (noun.s ! Sg ! Suffix ! Nom) ++ td (noun.s ! Pl ! Free ! Nom) ++ td (noun.s ! Pl ! Suffix ! Nom)) ++
|
||||
tr (th (heading accusative_Parameter) ++ td (noun.s ! Sg ! Free ! Acc) ++ td (noun.s ! Sg ! Suffix ! Acc) ++ td (noun.s ! Pl ! Free ! Acc) ++ td (noun.s ! Pl ! Suffix ! Acc)) ++
|
||||
tr (th (heading dative_Parameter) ++ td (noun.s ! Sg ! Free ! Dat) ++ td (noun.s ! Sg ! Suffix ! Dat) ++ td (noun.s ! Pl ! Free ! Dat) ++ td (noun.s ! Pl ! Suffix ! Dat)) ++
|
||||
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Free ! Gen) ++ td (noun.s ! Sg ! Suffix ! Gen) ++ td (noun.s ! Pl ! Free ! Gen) ++ td (noun.s ! Pl ! Suffix ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionA, InflectionA2 = \adj ->
|
||||
let
|
||||
gforms : (Number -> Gender -> Case -> AForm) -> Case -> Str = \d,c ->
|
||||
td (adj.s ! d Sg Masc c) ++
|
||||
td (adj.s ! d Sg Fem c) ++
|
||||
td (adj.s ! d Sg Neutr c) ++
|
||||
td (adj.s ! d Pl Masc c) ++
|
||||
td (adj.s ! d Pl Fem c) ++
|
||||
td (adj.s ! d Pl Neutr c) ;
|
||||
|
||||
dtable : Str -> (Number -> Gender -> Case -> AForm) -> Str = \s,d ->
|
||||
paragraph (heading2 s ++ frameTable (
|
||||
tr (intagAttr "th" "rowspan=2" [] ++
|
||||
th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
|
||||
th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter)) ++
|
||||
tr (intagAttr "th" "colspan=3" (heading singular_Parameter) ++ intagAttr "th" "colspan=3" (heading plural_Parameter)) ++
|
||||
tr (th (heading nominative_Parameter) ++ gforms d Nom) ++
|
||||
tr (th (heading accusative_Parameter) ++ gforms d Acc) ++
|
||||
tr (th (heading dative_Parameter) ++ gforms d Dat) ++
|
||||
tr (th (heading genitive_Parameter) ++ gforms d Gen)
|
||||
)) ;
|
||||
|
||||
in { t = "a" ;
|
||||
s1 = heading1 (intag "i" (adj.s ! APosit Strong Sg Masc Nom) ++ ":" ++ (nounHeading adjective_Category).s) ;
|
||||
s2 =
|
||||
dtable (heading positive_Parameter ++ heading strong_Parameter) (APosit Strong) ++
|
||||
dtable (heading positive_Parameter ++ heading weak_Parameter) (APosit Weak) ++
|
||||
dtable (heading comparative_Parameter) ACompar ++
|
||||
dtable (heading superlative_Parameter ++ heading strong_Parameter) (ASuperl Strong) ++
|
||||
dtable (heading superlative_Parameter ++ heading weak_Parameter) (ASuperl Weak)
|
||||
} ;
|
||||
|
||||
{-
|
||||
InflectionAdv adv = {
|
||||
t = "adverb" ;
|
||||
s1 = heading1 (heading adverb_Category) ;
|
||||
s2 = paragraph adv.s
|
||||
} ;
|
||||
|
||||
InflectionPrep p = {
|
||||
t = "präp" ;
|
||||
s1 = heading1 (heading preposition_Category) ;
|
||||
s2 = paragraph (S.mkAdv (lin Prep p) (S.mkNP S.a_Det L.computer_N)).s
|
||||
} ;
|
||||
-}
|
||||
|
||||
InflectionV v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (intag "i" (v.s ! VInf Active) ++ ":" ++ heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2 v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (intag "i" (v.s ! VInf Active) ++ ":" ++ heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.i_NP)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV3 v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (intag "i" (v.s ! VInf Active) ++ ":" ++ heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.it_NP S.i_NP)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2V v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (S.mkVP (L.sleep_V)))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2S v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2Q v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2A v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVV v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVS v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVQ v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVA v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
lin
|
||||
NoDefinition t = {s=t.s};
|
||||
MkDefinition t d = {s="<p><b>Definierung:</b>"++t.s++d.s++"</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Definierung:</b>"++t.s++d.s++"</p><p><b>Beispiel:</b>"++e.s++"</p>"};
|
||||
|
||||
MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||
MkTag i = ss i.t ;
|
||||
|
||||
oper
|
||||
verbExample : CatIce.Cl -> Str = \cl ->
|
||||
(S.mkUtt cl).s
|
||||
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
|
||||
;
|
||||
|
||||
inflVerb : Verb -> Str = \verb ->
|
||||
let
|
||||
vfin : VForm -> Str = \f ->
|
||||
verb.s ! f ;
|
||||
gforms : Voice -> Number -> Person -> Str = \v,n,p ->
|
||||
td (vfin (VPres v Indicative n p)) ++
|
||||
td (vfin (VPres v Subjunctive n p)) ++
|
||||
td (vfin (VPast v Indicative n p)) ++
|
||||
td (vfin (VPast v Subjunctive n p))
|
||||
;
|
||||
voiceTable : Voice -> Str = \voice -> frameTable (
|
||||
tr (intagAttr "th" "colspan=2" "" ++ intagAttr "th" "colspan=2" (heading present_Parameter) ++ intagAttr "th" "colspan=2" (heading past_Parameter)) ++
|
||||
tr (intagAttr "th" "colspan=2" "" ++ th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter) ++
|
||||
th (heading indicative_Parameter) ++ th (heading conjunctive_Parameter)) ++
|
||||
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++ th "1" ++ gforms voice Sg P1) ++
|
||||
tr ( th "2" ++ gforms voice Sg P2) ++
|
||||
tr ( th "3" ++ gforms voice Sg P3) ++
|
||||
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++ th "1" ++ gforms voice Pl P1) ++
|
||||
tr ( th "2" ++ gforms voice Pl P2) ++
|
||||
tr ( th "3" ++ gforms voice Pl P3) ++
|
||||
tr (intagAttr "th" "colspan=2" (heading infinitive_Parameter) ++ intagAttr "td" "colspan=4" (vfin (VInf voice))) ++
|
||||
tr (intagAttr "th" "colspan=2" (heading supine_Parameter) ++ intagAttr "td" "colspan=4" (vfin (VSup voice)))
|
||||
) ;
|
||||
in
|
||||
heading2 (heading active_Parameter) ++ voiceTable Active ++
|
||||
heading2 (heading middle_Parameter) ++ voiceTable Middle
|
||||
;
|
||||
|
||||
}
|
||||
@@ -2,5 +2,6 @@
|
||||
concrete LangIce of Lang =
|
||||
GrammarIce
|
||||
,LexiconIce
|
||||
,DocumentationIce --# notpresent
|
||||
--,ConstructionIce
|
||||
** {} ;
|
||||
|
||||
10
src/icelandic/LangIce.labels
Normal file
10
src/icelandic/LangIce.labels
Normal file
@@ -0,0 +1,10 @@
|
||||
* {"ekki"} PART neg head
|
||||
* {"hef","hefur","hafa","höfum","hafði","hafið","hafðir","hafð","höfðuð","höfðu","höfðum","mun","munt","munu","munum","myndi","myndir","mynduð","myndum","myndu"} AUX aux head
|
||||
* {"kan","kunde","kunnat","måste"} AUX aux head
|
||||
UseComp {"verið","vera","var","voru","vorum","voruð","varst","er","eru","erum","ert"} VERB cop head
|
||||
CompAdv {"verið","vera","var","voru","vorum","voruð","varst","er","eru","erum","ert"} VERB cop head
|
||||
CompAP {"verið","vera","var","voru","vorum","voruð","varst","er","eru","erum","ert"} VERB cop head
|
||||
CompNP {"verið","vera","var","voru","vorum","voruð","varst","er","eru","erum","ert"} VERB cop head
|
||||
CompCN {"verið","vera","var","voru","vorum","voruð","varst","er","eru","erum","ert"} VERB cop head
|
||||
ComplVV {"að"} PART mark xcomp
|
||||
ComplVS {"að"} PART mark xcomp
|
||||
@@ -1,7 +1,7 @@
|
||||
--# -path=.:prelude
|
||||
|
||||
concrete LexiconIce of Lexicon = CatIce **
|
||||
open ParadigmsIce, IrregIce, Prelude in {
|
||||
open ParadigmsIce, (I=WiktIrregIce), Prelude in {
|
||||
|
||||
lin
|
||||
bank_N = mkN "banki" masculine ;
|
||||
@@ -254,7 +254,7 @@ concrete LexiconIce of Lexicon = CatIce **
|
||||
-- Old paradigms
|
||||
already_Adv = mkAdv "þegar" ;
|
||||
far_Adv = mkAdv "langt" ;
|
||||
fly_V = IrregIce.fljúga_V ;
|
||||
fly_V = I.fljúga_V ;
|
||||
john_PN = mkPN "Jón" masculine ;
|
||||
|
||||
now_Adv = mkAdv "núna" ;
|
||||
@@ -304,56 +304,56 @@ concrete LexiconIce of Lexicon = CatIce **
|
||||
throw_V2 = mkV2 (mkV "kasta" "kasta" "kastaði" "kastaður") ;
|
||||
|
||||
turn_V = mkV "beygja" "beygi" ;
|
||||
bite_V2 = mkV2 IrregIce.bíta_V ;
|
||||
break_V2 = mkV2 IrregIce.brjóta_V ;
|
||||
wait_V2 = mkV2 (IrregIce.bíða_V) (mkPrep "eftir" dative) ;
|
||||
wash_V2 = mkV2 IrregIce.þrífa_V ;
|
||||
suck_V2 = mkV2 IrregIce.sjúga_V ;
|
||||
wipe_V2 = mkV2 IrregIce.strjúka_V ;
|
||||
lie_V = IrregIce.ljúga_V ;
|
||||
freeze_V = IrregIce.frjósa_V ;
|
||||
float_V = IrregIce.fljóta_V ;
|
||||
bite_V2 = mkV2 I.bíta_V ;
|
||||
break_V2 = mkV2 I.brjóta_V ;
|
||||
wait_V2 = mkV2 (I.bíða_V) (mkPrep "eftir" dative) ;
|
||||
wash_V2 = mkV2 I.þrífa_V ;
|
||||
suck_V2 = mkV2 I.sjúga_V ;
|
||||
wipe_V2 = mkV2 I.strjúka_V ;
|
||||
lie_V = I.ljúga_V ;
|
||||
freeze_V = I.frjósa_V ;
|
||||
float_V = I.fljóta_V ;
|
||||
flow_V = mkV "flæða" ;
|
||||
go_V = IrregIce.fara_V ;
|
||||
leave_V2 = mkV2 IrregIce.fara_V ;
|
||||
go_V = I.fara_V ;
|
||||
leave_V2 = mkV2 I.fara_V ;
|
||||
seek_V2 = mkV2 (mkV "leita" "leita" "leitaði" "leitaður") ;
|
||||
travel_V = mkV "ferða" "ferða" "ferðaði" "ferðaður" ; -- this verb only exists in the middle voice
|
||||
know_V2 = mkV2 IrregIce.vita_V ;
|
||||
know_VQ = IrregIce.vita_V ;
|
||||
know_VS = IrregIce.vita_V ;
|
||||
know_V2 = mkV2 I.vita_V ;
|
||||
know_VQ = I.vita_V ;
|
||||
know_VS = I.vita_V ;
|
||||
ask_V2Q = mkV2 (mkV "spyrja" "spyr" "spurði" "spurður") (mkPrep "" accusative) ;
|
||||
find_V2 = mkV2 IrregIce.finna_V ;
|
||||
win_V2 = mkV2 IrregIce.vinna_V ;
|
||||
fall_V = IrregIce.detta_V ;
|
||||
burn_V = IrregIce.brenna_V ;
|
||||
drink_V2 = mkV2 IrregIce.drekka_V ;
|
||||
find_V2 = mkV2 I.finna_V ;
|
||||
win_V2 = mkV2 I.vinna_V ;
|
||||
fall_V = I.detta_V ;
|
||||
burn_V = I.brenna_V ;
|
||||
drink_V2 = mkV2 I.drekka_V ;
|
||||
add_V3 = mkV3 (mkV "bæta" "bæti" "bætti" "bættur") (mkPrep "" dative) (mkPrep "við" accusative) ;
|
||||
beg_V2V = mkV3 IrregIce.biðja_V (mkPrep "" accusative) (mkPrep "um að" accusative) ;
|
||||
read_V2 = mkV2 IrregIce.lesa_V ;
|
||||
kill_V2 = mkV2 IrregIce.drepa_V ;
|
||||
give_V3 = mkV3 IrregIce.gefa_V ;
|
||||
sit_V = IrregIce.sitja_V ;
|
||||
beg_V2V = mkV3 I.biðja_V (mkPrep "" accusative) (mkPrep "um að" accusative) ;
|
||||
read_V2 = mkV2 I.lesa_V ;
|
||||
kill_V2 = mkV2 I.drepa_V ;
|
||||
give_V3 = mkV3 I.gefa_V ;
|
||||
sit_V = I.sitja_V ;
|
||||
hope_VS = mkV "vona" "vona" "vonaði" "vonaður" ;
|
||||
wonder_VQ = mkV "velta" ;
|
||||
play_V2 = mkV2 IrregIce.leika_V ;
|
||||
laugh_V = IrregIce.hlæja_V ;
|
||||
hold_V2 = mkV2 IrregIce.halda_V ;
|
||||
die_V = IrregIce.deyja_V ;
|
||||
run_V = IrregIce.hlaupa_V ;
|
||||
walk_V = IrregIce.ganga_V ;
|
||||
dig_V = IrregIce.grafa_V ;
|
||||
see_V2 = mkV2 IrregIce.sjá_V ;
|
||||
blow_V = IrregIce.blása_V ;
|
||||
sleep_V = IrregIce.sofa_V ;
|
||||
put_V2 = mkV2 IrregIce.láta_V ;
|
||||
play_V2 = mkV2 I.leika_V ;
|
||||
laugh_V = I.hlæja_V ;
|
||||
hold_V2 = mkV2 I.halda_V ;
|
||||
die_V = I.deyja_V ;
|
||||
run_V = I.hlaupa_V ;
|
||||
walk_V = I.ganga_V ;
|
||||
dig_V = I.grafa_V ;
|
||||
see_V2 = mkV2 I.sjá_V ;
|
||||
blow_V = I.blása_V ;
|
||||
sleep_V = I.sofa_V ;
|
||||
put_V2 = mkV2 I.láta_V ;
|
||||
buy_V2 = mkV2 (mkV "kaupa" "kaupi" "keypti" "keyptur" "keypt") ;
|
||||
tie_V2 = mkV2 IrregIce.binda_V ;
|
||||
stab_V2 = mkV2 IrregIce.stinga_V ;
|
||||
come_V = IrregIce.koma_V ;
|
||||
play_V = IrregIce.leika_V ;
|
||||
sing_V = IrregIce.syngja_V ;
|
||||
stand_V = IrregIce.standa_V ;
|
||||
become_VA = IrregIce.verða_V ;
|
||||
tie_V2 = mkV2 I.binda_V ;
|
||||
stab_V2 = mkV2 I.stinga_V ;
|
||||
come_V = I.koma_V ;
|
||||
play_V = I.leika_V ;
|
||||
sing_V = I.syngja_V ;
|
||||
stand_V = I.standa_V ;
|
||||
become_VA = I.verða_V ;
|
||||
talk_V3 = mkV3 (mkV "tala" "tala" "talaði" "talaður") (mkPrep "við" accusative) (mkPrep "um" accusative) ;
|
||||
send_V3 = mkV3 (mkV "senda") (mkPrep "" accusative) (mkPrep "með" accusative) ;
|
||||
say_VS = mkV "segja" "segi" "sagði" "sagður";
|
||||
|
||||
@@ -905,7 +905,7 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
|
||||
pastSub = mforms ! Subjunctive ! DPast
|
||||
in {
|
||||
s = table {
|
||||
VInf => inf ;
|
||||
VInf v => mkVoice v inf ;
|
||||
VPres v Indicative Sg p => persList (mkVoice v (presInd ! 0)) (mkVoice v (presInd ! 1)) (mkVoice v (presInd ! 2)) ! p;
|
||||
VPres v Indicative Pl p => persList (mkVoice v (presInd ! 3)) (mkVoice v (presInd ! 4)) (mkVoice v (presInd ! 5)) ! p;
|
||||
VPast v Indicative Sg p => persList (mkVoice v (pastInd ! 0)) (mkVoice v (pastInd ! 1)) (mkVoice v (pastInd ! 2)) ! p;
|
||||
@@ -915,7 +915,9 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
|
||||
VPast v Subjunctive Sg p => persList (mkVoice v (pastSub ! 0)) (mkVoice v (pastSub ! 1)) (mkVoice v (pastSub ! 2)) ! p;
|
||||
VPast v Subjunctive Pl p => persList (mkVoice v (presSub ! 3)) (mkVoice v (pastSub ! 4)) (mkVoice v (pastSub ! 5)) ! p;
|
||||
VImp v Sg => mkVoice v impSg ;
|
||||
VImp v Pl => mkVoice v impPl
|
||||
VImp v Pl => mkVoice v impPl ;
|
||||
VSup v => mkVoice v sup
|
||||
|
||||
} ;
|
||||
p = table {
|
||||
PWeak Sg Masc c => caseList (pastPartW ! Masc ! 0) (pastPartW ! Masc ! 1) (pastPartW ! Masc ! 2) (pastPartW ! Masc ! 3) ! c ;
|
||||
@@ -930,9 +932,23 @@ 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 ;
|
||||
PPres => presPart
|
||||
} ;
|
||||
sup =\\v => mkVoice v sup
|
||||
} ;
|
||||
|
||||
-- AR 2019-08-02: deponent verbs use the Middle voice everywhere, instead of Active
|
||||
--- some forms may be inadequate, but they are in the table anyway
|
||||
|
||||
deponentVerb : Verb -> Verb = \verb ->
|
||||
verb ** {
|
||||
s = table {
|
||||
VInf _ => verb.s ! VInf Middle ;
|
||||
VPres _ m n p => verb.s ! VPres Middle m n p ;
|
||||
VPast _ m n p => verb.s ! VPast Middle m n p ;
|
||||
VImp _ n => verb.s ! VImp Middle n ;
|
||||
vf => verb.s ! vf
|
||||
} ;
|
||||
sup = \\v => verb.sup ! Middle ;
|
||||
} ;
|
||||
|
||||
|
||||
----------------------
|
||||
-- Noun Auxiliaries --
|
||||
@@ -961,6 +977,16 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
|
||||
_ => s
|
||||
} ;
|
||||
|
||||
|
||||
-- AR 2019-08-02 what about this: gamal -> gömul
|
||||
aa2öu : Str -> Str = \s -> case s of {
|
||||
front + "a" + middle@(#consonant*) + "a" + back => front + "ö" + middle + "u" + back ;
|
||||
_ + "au" + _ => s ;
|
||||
front + "a" + back => front + "ö" + back ;
|
||||
_ => s
|
||||
} ;
|
||||
---- a2ö = aa2öu ; --- does not seem to work properly the way a2ö is used however
|
||||
|
||||
-- I am fairly certain it works the same way as a2ö
|
||||
-- currently not used - keep or trash?
|
||||
ö2a : Str -> Str = \þökk -> case þökk of {
|
||||
@@ -1076,7 +1102,8 @@ resource MorphoIce = ResIce ** open Prelude, (Predef=Predef), ResIce in {
|
||||
getðiditi : Str -> Str = \s -> case s of {
|
||||
_ + "ði" => "ði" ;
|
||||
_ + "di" => "di" ;
|
||||
_ + "ti" => "ti"
|
||||
_ + "ti" => "ti" ;
|
||||
_ => Predef.error ("no telja type past ending for" ++ s)
|
||||
} ;
|
||||
|
||||
param
|
||||
|
||||
@@ -64,6 +64,9 @@ resource ParadigmsIce = open
|
||||
mkN = overload {
|
||||
|
||||
-- Given Sg.Nom.
|
||||
mkN : Str -> N = mk0N ;
|
||||
|
||||
-- Given Sg.Nom. and gender
|
||||
mkN : Str -> Gender -> N = mk1N ;
|
||||
|
||||
-- Given Sg.Nom and Pl.Nom - different Pl.Nom part
|
||||
@@ -96,6 +99,14 @@ resource ParadigmsIce = open
|
||||
<front + "a",_> => lin N (nForms2NeutrNoun (dAuga stelpa (front + "na")))
|
||||
} ;
|
||||
|
||||
-- AR 2019-08-01 following Neijmann, "Colloquial Icelandic" Kindle Loc. 439
|
||||
--- very simplified heuristics I guess
|
||||
|
||||
mk0N : Str -> N = \s -> case s of {
|
||||
_ + ("ur" | "i" | "ll" | "nn") => mk1N s Masc ;
|
||||
_ + ("a" | "ing" | "un") => mk1N s Fem ;
|
||||
_ => mk1N s Neutr
|
||||
} ;
|
||||
|
||||
mk1N : Str -> Gender -> N = \s,g -> case g of {
|
||||
Neutr => lin N (nForms2NeutrNoun (neutrNForms1 s)) ;
|
||||
@@ -191,6 +202,7 @@ resource ParadigmsIce = open
|
||||
|
||||
femNForms1 : Str -> NForms = \s -> case s of {
|
||||
_ + "ing" => dFylking s (s + "ar") ;
|
||||
front + "un" => dVerslun s (front + "anir") ; --- AR 2019-08-02
|
||||
front + middle@("g" | "k") + "j" + "a" => dSaga s (front + middle + "na") ;
|
||||
_ + ("r" | "s" | "n" | "j") + "a" => dSaga s s ; -- I Don't think this is the general case
|
||||
stem + "a" => dSaga s s -- I Don't think this is the general case
|
||||
@@ -266,20 +278,28 @@ resource ParadigmsIce = open
|
||||
} ;
|
||||
|
||||
mk1A : Str -> A = \s -> lin A (aForms2Adjective
|
||||
(weakPosit s []) (strongPosit1 s) (compar1 s) (weakSuperl s []) (strongSuperl1 s) (regAAdv1 s)) ;
|
||||
(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
|
||||
|
||||
mk2A : (_,_ : Str) -> A = \mas,fem -> lin A (aForms2Adjective
|
||||
(weakPosit mas fem) (strongPosit2 mas fem) (compar2 mas fem) (weakSuperl mas fem) (strongSuperl2 mas fem) (regAAdv2 mas fem)) ;
|
||||
mk2A : (_,_ : Str) -> A = \mas,fem -> case mas of {
|
||||
_ + ("ll"|"nn") => mk1A mas ; ---- AR 2019-08-08 ; the case below does not work
|
||||
_ => lin A (aForms2Adjective
|
||||
(weakPosit mas fem) (strongPosit2 mas fem) (compar2 mas fem) (weakSuperl mas fem) (strongSuperl2 mas fem) (regAAdv2 mas fem))
|
||||
} ;
|
||||
|
||||
mk3A : (_,_,_ : Str) -> A = \mas,fem,com -> lin A (aForms2Adjective
|
||||
(weakPosit mas fem) (strongPosit2 mas fem) (compar1 com) (weakSuperl com []) (strongSuperl1 com) (regAAdv2 mas fem)) ;
|
||||
mk3A : (_,_,_ : Str) -> A = \mas,fem,com -> case mas of {
|
||||
_ + ("ll"|"nn") => mk1A mas ; ---- AR 2019-08-08 ; the case below does not work
|
||||
_ => lin A (aForms2Adjective
|
||||
(weakPosit mas fem) (strongPosit2 mas fem) (compar1 com) (weakSuperl com []) (strongSuperl1 com) (regAAdv2 mas fem))
|
||||
} ;
|
||||
|
||||
strongPosit1 : Str -> AForms = \s -> case s of {
|
||||
#consonant* + "ei" + ("ll" | "nn") => dSeinn s ;
|
||||
_ + "inn" => dFarinn s ;
|
||||
_ + "ill" => dLítill 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
|
||||
_ => dSmár s ---- AR 2019-08-02 guess to prevent failure
|
||||
} ;
|
||||
|
||||
strongPosit2 : (_,_ : Str) -> AForms = \mas,fem -> case <mas,fem> of {
|
||||
@@ -309,7 +329,8 @@ resource ParadigmsIce = open
|
||||
stem + "ur" => dAri stem ;
|
||||
#consonant* + "ei" + ("ll" | "nn") => dSeinn s ;
|
||||
front + "inn" => dAri (front + "n") ;
|
||||
_ + ("ll" | "nn") => dI s
|
||||
_ + ("ll" | "nn") => dI s ;
|
||||
_ => dI s ---- AR 2019-08-02 guess to prevent failure
|
||||
} ;
|
||||
|
||||
compar2 : (_,_ : Str) -> AForms = \mas,fem -> case <mas,fem> of {
|
||||
@@ -340,7 +361,8 @@ resource ParadigmsIce = open
|
||||
end@("ll" | "nn") => dFalastur (stem + init end + "astur") (a2ö stem + init end + "ust") ;
|
||||
stem + "inn" => dFalastur (stem + "nastur") (a2ö stem + "nust") ;
|
||||
stem + end@("ll"|"nn") => dFalastur (stem + init end + "astur") (a2ö stem + init end + "ust") ;
|
||||
stem + "ur" => dFalastur (stem + "astur") ((a2ö stem) + "ust")
|
||||
stem + "ur" => dFalastur (stem + "astur") ((a2ö stem) + "ust") ;
|
||||
_ => dFalastur (t + "astur") ((a2ö t) + "ust") ---- AR 2019-08-02 guess to prevent failure
|
||||
} ;
|
||||
|
||||
strongSuperl2 : (_,_ : Str) -> AForms = \mas,fem -> case <mas,fem> of {
|
||||
@@ -363,7 +385,8 @@ resource ParadigmsIce = open
|
||||
front + "ll" => front + "llega" ;
|
||||
front + "nn" => front + "nlega" ;
|
||||
front + "leg" + "ur" => front + "lega" ;
|
||||
front + "ur" => front + "lega"
|
||||
front + "ur" => front + "lega" ;
|
||||
_ => s + "lega" ---- AR 2019-08-02 guess to prevent failure
|
||||
} ;
|
||||
|
||||
regAAdv2 : (_,_ : Str) -> Str = \mas,fem -> case <mas,fem> of {
|
||||
@@ -386,7 +409,11 @@ resource ParadigmsIce = open
|
||||
mkV = overload {
|
||||
|
||||
-- Given the infinitive
|
||||
mkV : Str -> V = \telja -> mk1V telja;
|
||||
mkV : Str -> V
|
||||
= \telja -> case telja of {
|
||||
otta + "st" => depV (mk1V otta) ;
|
||||
_ => mk1V telja
|
||||
} ;
|
||||
|
||||
-- Given also the first person singular present tense indicative mood
|
||||
mkV : (_,_ : Str) -> V = \telja,tel -> mk2V telja tel ;
|
||||
@@ -417,6 +444,8 @@ resource ParadigmsIce = open
|
||||
weakSgMascNom weakSgMascAccDatGen weakSgFemNom weakSgFemAccDatGen weakSgNeut weakPl flogið) ;
|
||||
};
|
||||
|
||||
depV : V -> V = \verb -> lin V (deponentVerb verb) ;
|
||||
|
||||
mk1V : Str -> V = \inf ->
|
||||
lin V (vForms2Verb inf (indsub1 inf) (impSg inf) (impPl inf) (presPart inf) (sup inf) (weakPP inf) (strongPP inf)) ;
|
||||
|
||||
|
||||
@@ -41,12 +41,15 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
PForm = PWeak Number Gender Case | PStrong Number Gender Case | PPres ;
|
||||
|
||||
VForm =
|
||||
VInf
|
||||
VInf Voice -- AR 2019-08-02 added voice to enable Middle infinitives
|
||||
| VPres Voice Mood Number Person
|
||||
| VPast Voice Mood Number Person
|
||||
| VImp Voice Number
|
||||
| VSup Voice
|
||||
;
|
||||
oper vInf = VInf Active ; -- AR 2019-08-02
|
||||
|
||||
param
|
||||
VPForm = VPInf
|
||||
| VPImp
|
||||
| VPMood Tense Anteriority -- is this a describing name ?
|
||||
@@ -127,7 +130,6 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
Verb : Type = {
|
||||
s : VForm => Str ;
|
||||
p : PForm => Str ;
|
||||
sup : Voice => Str
|
||||
} ;
|
||||
|
||||
mkVoice : Voice -> Str -> Str = \v,s ->
|
||||
@@ -151,7 +153,7 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
plFemNom,plFemAcc,plFemDat,plFemGen,plNeutNom,plNeutAcc,plNeutDat,plNeutGen,
|
||||
weakSgMascNom,weakSgMascAccDatGen,weakSgFemNom,weakSgFemAccDatGen,weakSgNeut,weakPl,flogið -> {
|
||||
s = table {
|
||||
VInf => fljúga1 ;
|
||||
VInf v => mkVoice v fljúga1 ; -- AR 2019-08-02
|
||||
VPres v Indicative Sg P1 => mkVoice v flýg ;
|
||||
VPres v Indicative Sg P2 => mkVoice v flýgur2 ;
|
||||
VPres v Indicative Sg P3 => mkVoice v flýgur3 ;
|
||||
@@ -177,7 +179,8 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
VPast v Subjunctive Pl P2 => mkVoice v flygjuð ;
|
||||
VPast v Subjunctive Pl P3 => mkVoice v flygju ;
|
||||
VImp v Sg => mkVoice v fljúgðu ;
|
||||
VImp v Pl => mkVoice v fljúgið
|
||||
VImp v Pl => mkVoice v fljúgið ;
|
||||
VSup v => mkVoice v flogið
|
||||
} ;
|
||||
p = table {
|
||||
PWeak Sg Masc Nom => weakSgMascNom ;
|
||||
@@ -194,7 +197,6 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
PStrong Pl Neutr c => caseList plNeutNom plNeutAcc plNeutDat plNeutGen ! c ;
|
||||
PPres => fljúgandi
|
||||
} ;
|
||||
sup =\\v => mkVoice v flogið
|
||||
} ;
|
||||
|
||||
VP : Type = {
|
||||
@@ -227,7 +229,7 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
|
||||
predV : Verb -> VP = \v -> {
|
||||
s = \\vpform,pol,agr => case vpform of {
|
||||
VPInf => vf (v.s ! VInf) [] (negation pol) False ;
|
||||
VPInf => vf (v.s ! vInf) [] (negation pol) False ;
|
||||
VPImp => vf (v.s ! VImp Active agr.n) [] (negation pol) False ;
|
||||
VPMood ten ant => vff v ten ant pol agr
|
||||
} ;
|
||||
@@ -240,7 +242,7 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
} ;
|
||||
|
||||
predVV : { s : VForm => Str ; p : PForm => Str ; sup : Voice => Str ; c2 : Preposition } -> VP = \vv ->
|
||||
predV {s = vv.s ; p = vv.p ; sup = vv.sup} ;
|
||||
predV {s = vv.s ; p = vv.p} ;
|
||||
|
||||
|
||||
negation : Polarity -> Str = \pol -> case pol of {
|
||||
@@ -262,19 +264,19 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
-- hann sefur []/ekki - he []/doesn't sleep
|
||||
<Pres,Simul> => vf (v.s ! VPres Active Indicative agr.n agr.p) [] (negation pol) False;
|
||||
-- hann hefur []/ekki sofið - he has/hasn't slept
|
||||
<Pres,Anter> => vf (verbHave.s ! VPres Active Indicative agr.n agr.p) (v.sup ! Active) (negation pol) True ;
|
||||
<Pres,Anter> => vf (verbHave.s ! VPres Active Indicative agr.n agr.p) (v.s ! VSup Active) (negation pol) True ;
|
||||
-- hann svaf []/ekki - he []/didn't sleep
|
||||
<Past,Simul> => vf (v.s ! VPast Active Indicative agr.n agr.p) [] (negation pol) False ;
|
||||
-- hann hafði []/ekki sofið - he had/hadn't slept
|
||||
<Past,Anter> => vf (verbHave.s ! VPast Active Indicative agr.n agr.p) (v.sup ! Active) (negation pol) True ;
|
||||
<Past,Anter> => vf (verbHave.s ! VPast Active Indicative agr.n agr.p) (v.s ! VSup Active) (negation pol) True ;
|
||||
-- hann mun []/ekki sofa - he will/won't sleep
|
||||
<Fut,Simul> => vf (verbWill.s ! VPres Active Indicative agr.n agr.p) (v.s ! VInf) (negation pol) True ;
|
||||
<Fut,Simul> => vf (verbWill.s ! VPres Active Indicative agr.n agr.p) (v.s ! vInf) (negation pol) True ;
|
||||
-- hann mun []/ekki hafa sofið - 'he will/won't have slept'
|
||||
<Fut,Anter> => vf (verbWill.s ! VPres Active Indicative agr.n agr.p) (verbHave.s ! VInf ++ v.sup ! Active) (negation pol) True ;
|
||||
<Fut,Anter> => vf (verbWill.s ! VPres Active Indicative agr.n agr.p) (verbHave.s ! vInf ++ v.s ! VSup Active) (negation pol) True ;
|
||||
-- hann myndi []/ekki sofa 'he would/wouldn't sleep'
|
||||
<Cond,Simul> => vf (verbWill.s ! VPast Active Subjunctive agr.n agr.p) (v.s ! VInf) (negation pol) True ;
|
||||
<Cond,Simul> => vf (verbWill.s ! VPast Active Subjunctive agr.n agr.p) (v.s ! vInf) (negation pol) True ;
|
||||
-- hann myndi []/ekki hafa sofið 'he would/wouldn't have slept'
|
||||
<Cond,Anter> => vf (verbWill.s ! VPast Active Subjunctive agr.n agr.p) (verbHave.s ! VInf ++ v.sup ! Active) (negation pol) True
|
||||
<Cond,Anter> => vf (verbWill.s ! VPast Active Subjunctive agr.n agr.p) (verbHave.s ! vInf ++ v.s ! VSup Active) (negation pol) True
|
||||
} ;
|
||||
|
||||
-- Auxilary verbs --
|
||||
@@ -340,7 +342,7 @@ resource ResIce = ParamX ** open Prelude in {
|
||||
in case <order,vp.indShift,vp.dirShift> of {
|
||||
<ODir,False,False> => subj ++ finInf ++ verb.a1.p2 ++ ind ++ dir ++ adv ;
|
||||
<ODir,True,False> => subj ++ finInf ++ ind ++ verb.a1.p2 ++ dir ++ adv ;
|
||||
<Odir,_,True> => subj ++ finInf ++ ind ++ dir ++ verb.a1.p2 ++ adv ;
|
||||
<ODir,_,True> => subj ++ finInf ++ ind ++ dir ++ verb.a1.p2 ++ adv ;
|
||||
<OQuestion,False,False> => finSubjInf ++ verb.a1.p2 ++ ind ++ dir ++ adv ;
|
||||
<OQuestion,True,False> => finSubjInf ++ ind ++ verb.a1.p2 ++ dir ++ adv ;
|
||||
<OQuestion,_,True> => finSubjInf ++ ind ++ dir ++ verb.a1.p2 ++ adv
|
||||
|
||||
337
src/icelandic/SmallDictIce.gf
Normal file
337
src/icelandic/SmallDictIce.gf
Normal file
@@ -0,0 +1,337 @@
|
||||
concrete SmallDictIce of SmallDictIceAbs = CatIce **
|
||||
open
|
||||
ParadigmsIce, (I=WiktIrregIce)
|
||||
in {
|
||||
|
||||
-- monolingual dictionary bootstrapped from LexIce
|
||||
-- AR 2019-08-07
|
||||
|
||||
lin anda_V = mkV "anda" "anda" "andaði" "andaður"; -- some bug somewhere...
|
||||
lin aska_N = mkN "aska" feminine ;
|
||||
lin auga_N = mkN "auga" neuter ;
|
||||
lin auðveldur_A = mkA "auðveldur" ;
|
||||
lin bak_N = mkN "bak" neuter ;
|
||||
lin banki_N = mkN "banki" masculine ;
|
||||
lin barn_N = mkN "barn" neuter ;
|
||||
lin bein_N = mkN "bein" neuter ;
|
||||
lin beinn_A = mkA "beinn" ;
|
||||
lin beittur_A = mkA "beittur" ;
|
||||
lin belja_N = mkN "belja" feminine ;
|
||||
lin berja_V = (mkV "berja") ;
|
||||
lin beygja_V = mkV "beygja" "beygi" ;
|
||||
lin binda_V = I.binda_V ;
|
||||
lin biðja_V = I.biðja_V ;
|
||||
lin blautur_A = mkA "blautur" ;
|
||||
lin blár_A = mkA "blár" "blá" ;
|
||||
lin blása_V = I.blása_V ;
|
||||
lin blóm_N = mkN "blóm" neuter ;
|
||||
lin blóð_N = mkN "blóð" neuter ;
|
||||
lin borg_N = mkN "borg" "borgir" feminine ;
|
||||
lin borð_N = mkN "borð" neuter ;
|
||||
lin borða_V = (mkV "borða" "borða" "borðaði" "borðaður") ;
|
||||
lin brauð_N = mkN "brauð" neuter ;
|
||||
lin breiður_A = mkA "breiður" ;
|
||||
lin brenna_V = I.brenna_V ;
|
||||
lin brjóst_N = mkN "brjóst" neuter ;
|
||||
lin brjóta_V = I.brjóta_V ;
|
||||
lin bróðir_N = mkN "bróðir" "bróður" "bræður" masculine ;
|
||||
lin brúnn_A = mkA "brúnn" ;
|
||||
lin bátur_N = mkN "bátur" masculine ;
|
||||
lin bæta_V = mkV "bæta" "bæti" "bætti" "bættur" ;
|
||||
lin bíll_N = mkN "bíll" masculine ;
|
||||
lin bíta_V = I.bíta_V ;
|
||||
lin bók_N = mkN "bók" "bókar" "bækur" feminine ;
|
||||
lin bólgna_V = mkV "bólgna" "bólgna" "bólgnaði" "bólgnaður" ;
|
||||
lin börkur_N = mkN "börkur" "barkar" "berkir" masculine ;
|
||||
lin búð_N = mkN "búð" "búðir" feminine ;
|
||||
lin dagblað_N = mkN "dagblað" neuter ;
|
||||
lin dagur_N = mkN "dagur" masculine ;
|
||||
lin detta_V = I.detta_V ;
|
||||
lin deyja_V = I.deyja_V ;
|
||||
lin drekka_V = I.drekka_V ;
|
||||
lin drepa_V = I.drepa_V ;
|
||||
lin drottning_N = mkN "drottning" feminine ;
|
||||
lin dýr_N = mkN "dýr" neuter ;
|
||||
lin eftir_V = (I.bíða_V) ;
|
||||
lin egg_N = mkN "egg" neuter ;
|
||||
lin eiginkona_N = mkCompoundN "eigin" (kona_N) ;
|
||||
lin eiginmaður_N = mkCompoundN "eigin" (maður_N) ;
|
||||
lin eldavél_N = mkN "eldavél" "eldavélar" feminine ;
|
||||
lin eldur_N = mkN "eldur" "eldar" masculine ;
|
||||
lin elska_V = (mkV "elska" "elska" "elskaði" "elskaður") ;
|
||||
lin epli_N = mkN "epli" neuter ;
|
||||
lin eyra_N = mkN "eyra" neuter ;
|
||||
lin fallegur_A = mkA "fallegur" ;
|
||||
lin fara_V = I.fara_V ;
|
||||
lin faðir_N = mkN "faðir" "föður" "feður" masculine ;
|
||||
lin ferða_V = mkV "ferða" "ferða" "ferðaði" "ferðaður" ; -- this verb only exists in the middle voice
|
||||
lin finna_V = I.finna_V ;
|
||||
lin fiskur_N = mkN "fiskur" masculine ;
|
||||
lin fita_N = mkN "fita" feminine ;
|
||||
lin fjall_N = mkN "fjall" neuter ;
|
||||
lin fjöður_N = mkN "fjöður" "fjaðrir" feminine ;
|
||||
lin fljóta_V = I.fljóta_V ;
|
||||
lin fljúga_V = I.fljúga_V ;
|
||||
lin flugvél_N = mkN "flugvél" "flugvélar" feminine ;
|
||||
lin flæða_V = mkV "flæða" ;
|
||||
lin friður_N = mkN "friður" masculine ;
|
||||
lin frjósa_V = I.frjósa_V ;
|
||||
lin fræ_N = mkN "fræ" neuter ;
|
||||
lin frændi_N = mkN "frændi" masculine ; -- frænka is the feminine equivalent
|
||||
lin fugl_N = mkN "fugl" masculine ;
|
||||
lin fullur_A = mkA "fullur" ;
|
||||
lin fótleggur_N = mkCompoundN "fót" (mkN "leggur" "leggjar" "leggir" masculine) ;
|
||||
lin fótur_N = mkN "fótur" "fætur" masculine ;
|
||||
lin gamall_A = mkA "gamall" ;
|
||||
lin ganga_V = I.ganga_V ;
|
||||
lin garður_N = mkN "garður" masculine ;
|
||||
lin gefa_V = I.gefa_V ;
|
||||
lin gera_V = (mkV "gera") ;
|
||||
lin giftur_A = mkA "giftur" ;
|
||||
lin gleyma_V = (mkV "gleyma") ;
|
||||
lin gluggi_N = mkN "gluggi" masculine ;
|
||||
lin grafa_V = I.grafa_V ;
|
||||
lin gras_N = mkN "gras" neuter ;
|
||||
lin grænn_A = mkA "grænn" ;
|
||||
lin gull_N = mkN "gull" neuter ;
|
||||
lin gulur_A = mkA "gulur" ;
|
||||
lin gólf_N = mkN "gólf" neuter ;
|
||||
lin góður_A = mkA "góður" "góð" "betri" ;
|
||||
lin görn_N = mkN "görn" "garnir" feminine ;
|
||||
lin gúmmí_N = mkN "gúmmí" neuter ;
|
||||
lin halda_V = I.halda_V ;
|
||||
lin hanski_N = mkN "hanski" masculine ;
|
||||
lin hata_V = (mkV "hata" "hata" "hataði" "hataður") ;
|
||||
lin hattur_N = mkN "hattur" masculine ;
|
||||
lin haus_N = mkN "haus" masculine ;
|
||||
lin heimskur_A = mkA "heimskur" ;
|
||||
lin heitur_A = mkA "heitur" ;
|
||||
lin hestur_N = mkN "hestur" masculine ;
|
||||
lin heyra_V = (mkV "heyra") ;
|
||||
lin himinn_N = mkN "himinn" masculine ;
|
||||
lin hjarta_N = mkN "hjarta" neuter ;
|
||||
lin hjól_N = mkN "hjól" neuter ;
|
||||
lin hlaupa_V = I.hlaupa_V ;
|
||||
lin hlusta_V = (mkV "hlusta" "hlusta" "hlustaði" "hlustaður") ;
|
||||
lin hlæja_V = I.hlæja_V ;
|
||||
lin hné_N = mkN "hné" neuter ;
|
||||
lin hoppa_V = mkV "hoppa" "hoppa" ;
|
||||
lin horfa_V = (mkV "horfa") ;
|
||||
lin horn_N = mkN "horn" neuter ;
|
||||
lin hreinn_A = mkA "hreinn" ;
|
||||
lin hrækja_V = mkV "hrækja" ;
|
||||
lin hugsa_V = mkV "hugsa" "hugsa" "hugsaði" "hugsaður" ;
|
||||
lin hundur_N = mkN "hundur" masculine ;
|
||||
lin hurð_N = mkN "hurð" "hurðir" feminine ;
|
||||
lin hvítur_A = mkA "hvítur" ;
|
||||
lin háls_N = mkN "háls" masculine ;
|
||||
lin hár_N = mkN "hár" neuter ;
|
||||
lin háskóli_N = mkN "háskóli" masculine ;
|
||||
lin hæð_N = mkN "hæð" "hæðir" feminine ;
|
||||
lin höfn_N = mkN "höfn" "hafnir" feminine ;
|
||||
lin hönd_N = mkN "hönd" "hönd" "hendi" "handar" "hendur" "hendur" "höndum" "handa" feminine ;
|
||||
lin húfa_N = mkN "húfa" feminine ;
|
||||
lin hús_N = mkN "hús" neuter ;
|
||||
lin húð_N = mkN "húð" "húðir" feminine ;
|
||||
lin iðnaður_N = mkN "iðnaður" masculine ;
|
||||
lin járn_N = mkN "járn" neuter ;
|
||||
lin jörð_N = mkN "jörð" "jarðir" feminine ;
|
||||
lin kaldur_A = mkA "kaldur" ;
|
||||
lin kasta_V = (mkV "kasta" "kasta" "kastaði" "kastaður") ;
|
||||
lin kaupa_V = (mkV "kaupa" "kaupi" "keypti" "keyptur" "keypt") ;
|
||||
lin kenna_V = (mkV "kenna") ;
|
||||
lin kennari_N = mkN "kennari" masculine ;
|
||||
lin kind_N = mkN "kind" "kindar" "kindur" feminine ;
|
||||
lin kirkja_N = mkN "kirkja" feminine ;
|
||||
lin kjöt_N = mkN "kjöt" neuter ;
|
||||
lin klettur_N = mkN "klettur" masculine ;
|
||||
lin klippa_V = (mkV "klippa") ;
|
||||
lin klár_A = mkA "klár" "klár" ;
|
||||
lin klóra_V = (mkV "klóra" "klóra" "klóraði" "klóraður") ;
|
||||
lin koma_V = I.koma_V ;
|
||||
lin kona_N = mkN "kona" "konu" "konur" "kvenna" feminine ;
|
||||
lin konungur_N = mkN "konungur" masculine ;
|
||||
lin kreista_V = (mkV "kreista") ;
|
||||
lin kringlóttur_A = mkA "kringlóttur" ;
|
||||
lin kápa_N = mkN "kápa" feminine ;
|
||||
lin köttur_N = mkN "köttur" "kattar" "kettir" masculine ;
|
||||
lin lag_N = mkN "lag" neuter ;
|
||||
lin lampi_N = mkN "lampi" masculine ;
|
||||
lin land_N = mkN "land" neuter ;
|
||||
lin langt_Adv = mkAdv "langt" ;
|
||||
lin langur_A = mkA "langur" ;
|
||||
lin lauf_N = mkN "lauf" neuter ;
|
||||
lin leika_V = I.leika_V ;
|
||||
lin leita_V = (mkV "leita" "leita" "leitaði" "leitaður") ;
|
||||
lin lesa_V = I.lesa_V ;
|
||||
lin lest_N = mkN "lest" "lestir" feminine ;
|
||||
lin leðinilegur_A = mkA "leðinilegur" ;
|
||||
lin leður_N = mkN "leður" neuter ;
|
||||
lin lifa_V = mkV "lifa" ;
|
||||
lin lifur_N = mkN "lifur" "lifrar" feminine ;
|
||||
lin list_N = mkN "list" "listir" feminine ;
|
||||
lin ljótur_A = mkA "ljótur" ;
|
||||
lin ljúga_V = I.ljúga_V ;
|
||||
lin loft_N = mkN "loft" neuter ;
|
||||
lin loka_V = (mkV "loka" "loka" "lokaði" "lokaður") ;
|
||||
lin láta_V = I.láta_V ;
|
||||
lin læknir_N = mkN "læknir" "lækni" "lækni" "læknis" "læknar" "lækna" "læknum" "lækna" masculine ;
|
||||
lin læra_V = (mkV "læra") ;
|
||||
lin líklegur_A = mkA "líklegur" ;
|
||||
lin lítill_A = mkA "lítill" "lítil" "minni" ;
|
||||
lin lögregluþjónn_N = mkCompoundN "lögreglu" (mkN "þjónn" masculine) ;
|
||||
lin lús_N = mkN "lús" "lýs" feminine ;
|
||||
lin magi_N = mkN "magi" masculine ;
|
||||
lin maður_N = mkN "maður" "manns" "menn" masculine ;
|
||||
lin mikilvægur_A = mkA "mikilvægur" ;
|
||||
lin mjólk_N = mkN "mjólk" "mjólk" "mjólk" "mjólkur" "mjólk" "mjólk" "mjólk" "mjólkur" feminine ;
|
||||
lin munnur_N = mkN "munnur" masculine ;
|
||||
lin myndavél_N = mkN "myndavél" "myndavélar" feminine ;
|
||||
lin mála_V = (mkV "mála" "mála" "málaði" "málaður") ;
|
||||
lin málfræði_N = mkN "málfræði" "málfræði" "málfræði" "málfræði" "málfræði" "málfræði" "málfræði" "málfræði" feminine ;
|
||||
lin móðir_N = mkN "móðir" "mæður" feminine ;
|
||||
lin nafn_N = mkN "nafn" neuter ;
|
||||
lin nef_N = mkN "nef" neuter ;
|
||||
lin nemandi_N = mkN "nemandi" masculine ;
|
||||
lin nudda_V = (mkV "nudda" "nudda" "nuddaði" "nuddaður") ;
|
||||
lin nálægur_A = mkA "nálægur" ;
|
||||
lin nótt_N = mkN "nótt" "nætur" "nætur" "nótta" feminine ;
|
||||
lin nögl_N = mkN "nögl" "naglar" "neglur" feminine ;
|
||||
lin númer_N = mkN "númer" neuter ;
|
||||
lin núna_Adv = mkAdv "núna" ;
|
||||
lin nýr_A = mkA "nýr" "ný" ;
|
||||
lin olía_N = mkN "olía" feminine ;
|
||||
lin opna_V = (mkV "opna" "opna" "opnaði" "opnaður") ;
|
||||
lin ormur_N = mkN "ormur" masculine ;
|
||||
lin ostur_N = mkN "ostur" masculine ;
|
||||
lin other_A = mkA "other" ;
|
||||
lin pappír_N = mkN "pappír" masculine ;
|
||||
lin penni_N = mkN "penni" masculine ;
|
||||
lin persóna_N = mkN "persóna" feminine ;
|
||||
lin plat_N = mkN "plat" neuter ;
|
||||
lin pláneta_N = mkN "pláneta" feminine ;
|
||||
lin prestur_N = mkN "prestur" masculine ;
|
||||
lin prik_N = mkN "prik" neuter ;
|
||||
lin rauður_A = mkA "rauður" ;
|
||||
lin regla_N = mkN "regla" feminine ;
|
||||
lin reipi_N = mkN "reipi" neuter ;
|
||||
lin reykur_N = mkN "reykur" "reykjar" "reykir" masculine;
|
||||
lin rigning_N = mkN "rigning" feminine ;
|
||||
lin rotinn_A = mkA "rotinn" ;
|
||||
lin ryk_N = mkN "ryk" neuter ;
|
||||
lin réttur_A = mkA "réttur" ;
|
||||
lin rófa_N = mkN "rófa" feminine ;
|
||||
lin rót_N = mkN "rót" "rótar" "rætur" feminine ;
|
||||
lin salt_N = mkN "salt" neuter ;
|
||||
lin sandur_N = mkN "sandur" masculine ;
|
||||
lin sauma_V = mkV "sauma" "sauma" "saumaði" "saumaður" ;
|
||||
lin segja_V = mkV "segja" "segi" "sagði" "sagður";
|
||||
lin selja_V = (mkV "selja") ;
|
||||
lin senda_V = (mkV "senda") ;
|
||||
lin silfur_N = mkN "silfur" neuter ;
|
||||
lin sitja_V = I.sitja_V ;
|
||||
lin sjá_V = I.sjá_V ;
|
||||
lin sjónvarp_N = mkN "sjónvarp" neuter ;
|
||||
lin sjór_N = mkN "sjór" "sjó" "sjó" "sjós" "sjóir" "sjói" "sjóum" "sjóa" masculine ;
|
||||
lin sjúga_V = I.sjúga_V ;
|
||||
lin skemmtilegur_A = mkA "skemmtilegur" ;
|
||||
lin skilja_V = (mkV "skilja") ;
|
||||
lin skip_N = mkN "skip" neuter ;
|
||||
lin skipta_V = (mkV "skipta") ;
|
||||
lin skrifa_V = (mkV "skrifa" "skrifa" "skrifaði" "skrifaður") ;
|
||||
lin skyrta_N = mkN "skyrta" feminine ;
|
||||
lin skítugur_A = mkA "skítugur" ;
|
||||
lin skógur_N = mkN "skógur" masculine ;
|
||||
lin skóli_N = mkN "skóli" masculine ;
|
||||
lin skór_N = mkN "skór" "skór" masculine ;
|
||||
lin ský_N = mkN "ský" neuter ;
|
||||
lin sléttur_A = mkA "sléttur" ;
|
||||
lin smjör_N = mkN "smjör" neuter ;
|
||||
lin snjór_N = mkN "snjór" masculine ;
|
||||
lin snákur_N = mkN "snákur" masculine ;
|
||||
lin sofa_V = I.sofa_V ;
|
||||
lin sokkur_N = mkN "sokkur" masculine ;
|
||||
lin spurning_N = mkN "spurning" feminine ;
|
||||
lin spyrja_V = (mkV "spyrja" "spyr" "spurði" "spurður") ;
|
||||
lin standa_V = I.standa_V ;
|
||||
lin stansa_V = mkV "stansa" "stansa" "stansaði" "stansaður" ;
|
||||
lin steinn_N = mkN "steinn" masculine ;
|
||||
lin stelpa_N = mkNPlGen "stelpa" feminine ;
|
||||
lin stinga_V = I.stinga_V ;
|
||||
lin stjarna_N = mkN "stjarna" feminine ;
|
||||
lin stjóri_N = mkN "stjóri" masculine ;
|
||||
lin strjúka_V = I.strjúka_V ;
|
||||
lin strákur_N = mkN "strákur" masculine ;
|
||||
lin stríð_N = mkN "stríð" neuter ;
|
||||
lin stuttur_A = mkA "stuttur" "stutt" "syttri" ;
|
||||
lin stál_N = mkN "stál" neuter ;
|
||||
lin stóll_N = mkN "stóll" masculine ;
|
||||
lin stór_A = mkA "stór" "stór" "stærri" ;
|
||||
lin svara_V = (mkV "svara" "svara" "svaraði" "svaraður") ;
|
||||
lin svartur_A = mkA "svartur" ;
|
||||
lin synda_V = mkV "synda" ;
|
||||
lin syngja_V = I.syngja_V ;
|
||||
lin systir_N = mkN "systir" "systur" feminine ;
|
||||
lin sígvél_N = mkN "sígvél" neuter ;
|
||||
lin sól_N = mkN "sól" "sólir" feminine ;
|
||||
lin tala_V = (mkV "tala" "tala" "talaði" "talaður") ;
|
||||
lin telja_V = (mkV "telja") ;
|
||||
lin teppi_N = mkN "teppi" neuter ;
|
||||
lin tilbúinn_A = mkA "tilbúinn" ;
|
||||
lin toga_V = (mkV "toga" "toga" "togaði" "togaður") ;
|
||||
lin tré_N = mkN "tré" neuter ;
|
||||
lin trúarbragð_N = mkN "trúarbragð" neuter ;
|
||||
lin tunga_N = mkNPlGen "tunga" feminine ;
|
||||
lin tungl_N = mkN "tungl" neuter ;
|
||||
lin tungumál_N = mkN "tungumál" neuter ;
|
||||
lin tómur_A = mkA "tómur" ;
|
||||
lin tónlist_N = mkN "tónlist" "tónlist" "tónlist" "tónlistar" "tónlist" "tónlist" "tónlist" "tónlistar" feminine ;
|
||||
lin tölva_N = mkN "tölva" feminine ;
|
||||
lin tönn_N = mkN "tönn" "tannar" "tennur" feminine ;
|
||||
lin týna_V = (mkV "týna") ;
|
||||
lin ungur_A = mkA "ungur" "ung" "yngri" ;
|
||||
lin vatn_N = mkN "vatn" neuter ;
|
||||
lin vegalend_N = mkN "vegalend" "vegalengdir" feminine ;
|
||||
lin vegur_N = mkN "vegur" "vegar" "vegir" masculine ;
|
||||
lin veitingastaður_N = mkCompoundN "veitinga" (mkN "staður" "staðar" "staðir" masculine) ;
|
||||
lin veiða_V = (mkV "veiða") ;
|
||||
lin velta_V = mkV "velta" ;
|
||||
lin verksmiðja_N = mkN "verksmiðja" feminine ;
|
||||
lin verða_V = I.verða_V ;
|
||||
lin vindur_N = mkN "vindur" masculine ;
|
||||
lin vinna_V = I.vinna_V ;
|
||||
lin vinur_N = mkN "vinur" "vinar" "vinir" masculine ;
|
||||
lin vita_V = I.vita_V ;
|
||||
lin viður_N = mkN "viður" "viðar" "viðir" masculine ;
|
||||
lin vona_V = mkV "vona" "vona" "vonaði" "vonaður" ;
|
||||
lin vondur_A = mkA "vondur" "vond" "verri" ;
|
||||
lin vængur_N = mkN "vængur" masculine ;
|
||||
lin vín_N = mkN "vín" neuter ;
|
||||
lin víður_A = mkA "víður" ;
|
||||
lin á_N = mkN "á" "ár" feminine ;
|
||||
lin ár_N = mkN "ár" neuter ;
|
||||
lin ást_N = mkN "ást" "ástir" feminine ;
|
||||
lin ástæða_N = mkNPlGen "ástæða" feminine ;
|
||||
lin ávöxtur_N = mkN "ávöxtur" "ávaxtar" "ávextir" masculine ;
|
||||
lin æla_V = mkV "æla" ;
|
||||
lin í_Adv = mkAdv "í dag" ;
|
||||
lin íbúð_N = mkN "íbúð" "íbúðir" feminine ;
|
||||
lin ísskápur_N = mkCompoundN "ís" (mkN "skápur" "skáps" "skápar" masculine) ;
|
||||
lin ís_N = mkN "ís" masculine ;
|
||||
lin óvinur_N = mkCompoundN "ó" (vinur_N) ;
|
||||
lin óviss_A = mkA "óviss" "óviss" "óvissari" ;
|
||||
lin öl_N = mkN "öl" neuter ;
|
||||
lin útvarp_N = mkN "útvarp" neuter ;
|
||||
lin ýta_V = (mkV "ýta") ;
|
||||
lin þak_N = mkN "þak" neuter ;
|
||||
lin þefa_V = mkV "þefa" "þefa" "þefaði" "þefaður" ;
|
||||
lin þegar_Adv = mkAdv "þegar" ;
|
||||
lin þoka_N = mkN "þoka" feminine ;
|
||||
lin þorp_N = mkN "þorp" neuter ;
|
||||
lin þrífa_V = I.þrífa_V ;
|
||||
lin þröngur_A = mkA "þröngur" ;
|
||||
lin þungur_A = mkA "þungur" "þung" "þyngri" ;
|
||||
lin þunnur_A = mkA "þunnur" "þunn" "þynnri" ;
|
||||
lin þurr_A = mkA "þurr" "þurr" ;
|
||||
lin þykkur_A = mkA "þykkur" ;
|
||||
}
|
||||
334
src/icelandic/SmallDictIceAbs.gf
Normal file
334
src/icelandic/SmallDictIceAbs.gf
Normal file
@@ -0,0 +1,334 @@
|
||||
abstract SmallDictIceAbs = Cat ** {
|
||||
|
||||
-- monolingual dictionary bootstrapped from LexIce
|
||||
-- AR 2019-08-07
|
||||
|
||||
fun anda_V : V ;
|
||||
fun aska_N : N ;
|
||||
fun auga_N : N ;
|
||||
fun auðveldur_A : A ;
|
||||
fun bak_N : N ;
|
||||
fun banki_N : N ;
|
||||
fun barn_N : N ;
|
||||
fun bein_N : N ;
|
||||
fun beinn_A : A ;
|
||||
fun beittur_A : A ;
|
||||
fun belja_N : N ;
|
||||
fun berja_V : V ;
|
||||
fun beygja_V : V ;
|
||||
fun binda_V : V ;
|
||||
fun biðja_V : V ;
|
||||
fun blautur_A : A ;
|
||||
fun blár_A : A ;
|
||||
fun blása_V : V ;
|
||||
fun blóm_N : N ;
|
||||
fun blóð_N : N ;
|
||||
fun borg_N : N ;
|
||||
fun borð_N : N ;
|
||||
fun borða_V : V ;
|
||||
fun brauð_N : N ;
|
||||
fun breiður_A : A ;
|
||||
fun brenna_V : V ;
|
||||
fun brjóst_N : N ;
|
||||
fun brjóta_V : V ;
|
||||
fun bróðir_N : N ;
|
||||
fun brúnn_A : A ;
|
||||
fun bátur_N : N ;
|
||||
fun bæta_V : V ;
|
||||
fun bíll_N : N ;
|
||||
fun bíta_V : V ;
|
||||
fun bók_N : N ;
|
||||
fun bólgna_V : V ;
|
||||
fun börkur_N : N ;
|
||||
fun búð_N : N ;
|
||||
fun dagblað_N : N ;
|
||||
fun dagur_N : N ;
|
||||
fun detta_V : V ;
|
||||
fun deyja_V : V ;
|
||||
fun drekka_V : V ;
|
||||
fun drepa_V : V ;
|
||||
fun drottning_N : N ;
|
||||
fun dýr_N : N ;
|
||||
fun eftir_V : V ;
|
||||
fun egg_N : N ;
|
||||
fun eiginkona_N : N ;
|
||||
fun eiginmaður_N : N ;
|
||||
fun eldavél_N : N ;
|
||||
fun eldur_N : N ;
|
||||
fun elska_V : V ;
|
||||
fun epli_N : N ;
|
||||
fun eyra_N : N ;
|
||||
fun fallegur_A : A ;
|
||||
fun fara_V : V ;
|
||||
fun faðir_N : N ;
|
||||
fun ferða_V : V ;
|
||||
fun finna_V : V ;
|
||||
fun fiskur_N : N ;
|
||||
fun fita_N : N ;
|
||||
fun fjall_N : N ;
|
||||
fun fjöður_N : N ;
|
||||
fun fljóta_V : V ;
|
||||
fun fljúga_V : V ;
|
||||
fun flugvél_N : N ;
|
||||
fun flæða_V : V ;
|
||||
fun friður_N : N ;
|
||||
fun frjósa_V : V ;
|
||||
fun fræ_N : N ;
|
||||
fun frændi_N : N ;
|
||||
fun fugl_N : N ;
|
||||
fun fullur_A : A ;
|
||||
fun fótleggur_N : N ;
|
||||
fun fótur_N : N ;
|
||||
fun gamall_A : A ;
|
||||
fun ganga_V : V ;
|
||||
fun garður_N : N ;
|
||||
fun gefa_V : V ;
|
||||
fun gera_V : V ;
|
||||
fun giftur_A : A ;
|
||||
fun gleyma_V : V ;
|
||||
fun gluggi_N : N ;
|
||||
fun grafa_V : V ;
|
||||
fun gras_N : N ;
|
||||
fun grænn_A : A ;
|
||||
fun gull_N : N ;
|
||||
fun gulur_A : A ;
|
||||
fun gólf_N : N ;
|
||||
fun góður_A : A ;
|
||||
fun görn_N : N ;
|
||||
fun gúmmí_N : N ;
|
||||
fun halda_V : V ;
|
||||
fun hanski_N : N ;
|
||||
fun hata_V : V ;
|
||||
fun hattur_N : N ;
|
||||
fun haus_N : N ;
|
||||
fun heimskur_A : A ;
|
||||
fun heitur_A : A ;
|
||||
fun hestur_N : N ;
|
||||
fun heyra_V : V ;
|
||||
fun himinn_N : N ;
|
||||
fun hjarta_N : N ;
|
||||
fun hjól_N : N ;
|
||||
fun hlaupa_V : V ;
|
||||
fun hlusta_V : V ;
|
||||
fun hlæja_V : V ;
|
||||
fun hné_N : N ;
|
||||
fun hoppa_V : V ;
|
||||
fun horfa_V : V ;
|
||||
fun horn_N : N ;
|
||||
fun hreinn_A : A ;
|
||||
fun hrækja_V : V ;
|
||||
fun hugsa_V : V ;
|
||||
fun hundur_N : N ;
|
||||
fun hurð_N : N ;
|
||||
fun hvítur_A : A ;
|
||||
fun háls_N : N ;
|
||||
fun hár_N : N ;
|
||||
fun háskóli_N : N ;
|
||||
fun hæð_N : N ;
|
||||
fun höfn_N : N ;
|
||||
fun hönd_N : N ;
|
||||
fun húfa_N : N ;
|
||||
fun hús_N : N ;
|
||||
fun húð_N : N ;
|
||||
fun iðnaður_N : N ;
|
||||
fun járn_N : N ;
|
||||
fun jörð_N : N ;
|
||||
fun kaldur_A : A ;
|
||||
fun kasta_V : V ;
|
||||
fun kaupa_V : V ;
|
||||
fun kenna_V : V ;
|
||||
fun kennari_N : N ;
|
||||
fun kind_N : N ;
|
||||
fun kirkja_N : N ;
|
||||
fun kjöt_N : N ;
|
||||
fun klettur_N : N ;
|
||||
fun klippa_V : V ;
|
||||
fun klár_A : A ;
|
||||
fun klóra_V : V ;
|
||||
fun koma_V : V ;
|
||||
fun kona_N : N ;
|
||||
fun konungur_N : N ;
|
||||
fun kreista_V : V ;
|
||||
fun kringlóttur_A : A ;
|
||||
fun kápa_N : N ;
|
||||
fun köttur_N : N ;
|
||||
fun lag_N : N ;
|
||||
fun lampi_N : N ;
|
||||
fun land_N : N ;
|
||||
fun langt_Adv : Adv ;
|
||||
fun langur_A : A ;
|
||||
fun lauf_N : N ;
|
||||
fun leika_V : V ;
|
||||
fun leita_V : V ;
|
||||
fun lesa_V : V ;
|
||||
fun lest_N : N ;
|
||||
fun leðinilegur_A : A ;
|
||||
fun leður_N : N ;
|
||||
fun lifa_V : V ;
|
||||
fun lifur_N : N ;
|
||||
fun list_N : N ;
|
||||
fun ljótur_A : A ;
|
||||
fun ljúga_V : V ;
|
||||
fun loft_N : N ;
|
||||
fun loka_V : V ;
|
||||
fun láta_V : V ;
|
||||
fun læknir_N : N ;
|
||||
fun læra_V : V ;
|
||||
fun líklegur_A : A ;
|
||||
fun lítill_A : A ;
|
||||
fun lögregluþjónn_N : N ;
|
||||
fun lús_N : N ;
|
||||
fun magi_N : N ;
|
||||
fun maður_N : N ;
|
||||
fun mikilvægur_A : A ;
|
||||
fun mjólk_N : N ;
|
||||
fun munnur_N : N ;
|
||||
fun myndavél_N : N ;
|
||||
fun mála_V : V ;
|
||||
fun málfræði_N : N ;
|
||||
fun móðir_N : N ;
|
||||
fun nafn_N : N ;
|
||||
fun nef_N : N ;
|
||||
fun nemandi_N : N ;
|
||||
fun nudda_V : V ;
|
||||
fun nálægur_A : A ;
|
||||
fun nótt_N : N ;
|
||||
fun nögl_N : N ;
|
||||
fun númer_N : N ;
|
||||
fun núna_Adv : Adv ;
|
||||
fun nýr_A : A ;
|
||||
fun olía_N : N ;
|
||||
fun opna_V : V ;
|
||||
fun ormur_N : N ;
|
||||
fun ostur_N : N ;
|
||||
fun other_A : A ;
|
||||
fun pappír_N : N ;
|
||||
fun penni_N : N ;
|
||||
fun persóna_N : N ;
|
||||
fun plat_N : N ;
|
||||
fun pláneta_N : N ;
|
||||
fun prestur_N : N ;
|
||||
fun prik_N : N ;
|
||||
fun rauður_A : A ;
|
||||
fun regla_N : N ;
|
||||
fun reipi_N : N ;
|
||||
fun reykur_N : N ;
|
||||
fun rigning_N : N ;
|
||||
fun rotinn_A : A ;
|
||||
fun ryk_N : N ;
|
||||
fun réttur_A : A ;
|
||||
fun rófa_N : N ;
|
||||
fun rót_N : N ;
|
||||
fun salt_N : N ;
|
||||
fun sandur_N : N ;
|
||||
fun sauma_V : V ;
|
||||
fun segja_V : V ;
|
||||
fun selja_V : V ;
|
||||
fun senda_V : V ;
|
||||
fun silfur_N : N ;
|
||||
fun sitja_V : V ;
|
||||
fun sjá_V : V ;
|
||||
fun sjónvarp_N : N ;
|
||||
fun sjór_N : N ;
|
||||
fun sjúga_V : V ;
|
||||
fun skemmtilegur_A : A ;
|
||||
fun skilja_V : V ;
|
||||
fun skip_N : N ;
|
||||
fun skipta_V : V ;
|
||||
fun skrifa_V : V ;
|
||||
fun skyrta_N : N ;
|
||||
fun skítugur_A : A ;
|
||||
fun skógur_N : N ;
|
||||
fun skóli_N : N ;
|
||||
fun skór_N : N ;
|
||||
fun ský_N : N ;
|
||||
fun sléttur_A : A ;
|
||||
fun smjör_N : N ;
|
||||
fun snjór_N : N ;
|
||||
fun snákur_N : N ;
|
||||
fun sofa_V : V ;
|
||||
fun sokkur_N : N ;
|
||||
fun spurning_N : N ;
|
||||
fun spyrja_V : V ;
|
||||
fun standa_V : V ;
|
||||
fun stansa_V : V ;
|
||||
fun steinn_N : N ;
|
||||
fun stelpa_N : N ;
|
||||
fun stinga_V : V ;
|
||||
fun stjarna_N : N ;
|
||||
fun stjóri_N : N ;
|
||||
fun strjúka_V : V ;
|
||||
fun strákur_N : N ;
|
||||
fun stríð_N : N ;
|
||||
fun stuttur_A : A ;
|
||||
fun stál_N : N ;
|
||||
fun stóll_N : N ;
|
||||
fun stór_A : A ;
|
||||
fun svara_V : V ;
|
||||
fun svartur_A : A ;
|
||||
fun synda_V : V ;
|
||||
fun syngja_V : V ;
|
||||
fun systir_N : N ;
|
||||
fun sígvél_N : N ;
|
||||
fun sól_N : N ;
|
||||
fun tala_V : V ;
|
||||
fun telja_V : V ;
|
||||
fun teppi_N : N ;
|
||||
fun tilbúinn_A : A ;
|
||||
fun toga_V : V ;
|
||||
fun tré_N : N ;
|
||||
fun trúarbragð_N : N ;
|
||||
fun tunga_N : N ;
|
||||
fun tungl_N : N ;
|
||||
fun tungumál_N : N ;
|
||||
fun tómur_A : A ;
|
||||
fun tónlist_N : N ;
|
||||
fun tölva_N : N ;
|
||||
fun tönn_N : N ;
|
||||
fun týna_V : V ;
|
||||
fun ungur_A : A ;
|
||||
fun vatn_N : N ;
|
||||
fun vegalend_N : N ;
|
||||
fun vegur_N : N ;
|
||||
fun veitingastaður_N : N ;
|
||||
fun veiða_V : V ;
|
||||
fun velta_V : V ;
|
||||
fun verksmiðja_N : N ;
|
||||
fun verða_V : V ;
|
||||
fun vindur_N : N ;
|
||||
fun vinna_V : V ;
|
||||
fun vinur_N : N ;
|
||||
fun vita_V : V ;
|
||||
fun viður_N : N ;
|
||||
fun vona_V : V ;
|
||||
fun vondur_A : A ;
|
||||
fun vængur_N : N ;
|
||||
fun vín_N : N ;
|
||||
fun víður_A : A ;
|
||||
fun á_N : N ;
|
||||
fun ár_N : N ;
|
||||
fun ást_N : N ;
|
||||
fun ástæða_N : N ;
|
||||
fun ávöxtur_N : N ;
|
||||
fun æla_V : V ;
|
||||
fun í_Adv : Adv ;
|
||||
fun íbúð_N : N ;
|
||||
fun ísskápur_N : N ;
|
||||
fun ís_N : N ;
|
||||
fun óvinur_N : N ;
|
||||
fun óviss_A : A ;
|
||||
fun öl_N : N ;
|
||||
fun útvarp_N : N ;
|
||||
fun ýta_V : V ;
|
||||
fun þak_N : N ;
|
||||
fun þefa_V : V ;
|
||||
fun þegar_Adv : Adv ;
|
||||
fun þoka_N : N ;
|
||||
fun þorp_N : N ;
|
||||
fun þrífa_V : V ;
|
||||
fun þröngur_A : A ;
|
||||
fun þungur_A : A ;
|
||||
fun þunnur_A : A ;
|
||||
fun þurr_A : A ;
|
||||
fun þykkur_A : A ;
|
||||
}
|
||||
110
src/icelandic/TerminologyIce.gf
Normal file
110
src/icelandic/TerminologyIce.gf
Normal file
@@ -0,0 +1,110 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete TerminologyIce of Terminology = CatIce ** open
|
||||
ResIce,
|
||||
ParadigmsIce,
|
||||
(G = GrammarIce),
|
||||
(S = SyntaxIce),
|
||||
(L = LexiconEng),
|
||||
Prelude
|
||||
in {
|
||||
|
||||
|
||||
lincat
|
||||
Category = G.N ;
|
||||
ParameterType = G.N ;
|
||||
Parameter = G.N ;
|
||||
Modifier = G.A ;
|
||||
|
||||
lin
|
||||
noun_Category = mkN "nafnorð" ;
|
||||
adjective_Category = mkN "lýsingarorð" ;
|
||||
verb_Category = mkN "sagnorð" ;
|
||||
adverb_Category = mkN "atviksorð" ;
|
||||
preposition_Category = mkN "preposition" ;
|
||||
numeral_Category = mkN "töluorð" ;
|
||||
pronoun_Category = mkN "persónufornafn" ;
|
||||
determiner_Category = mkN "determiner" ;
|
||||
article_Category = mkN "greinir" ;
|
||||
|
||||
number_ParameterType = mkN "tala" ;
|
||||
gender_ParameterType = mkN "kyn" ;
|
||||
case_ParameterType = mkN "fall" ;
|
||||
person_ParameterType = mkN "persóna" ;
|
||||
tense_ParameterType = mkN "tíð" ;
|
||||
degree_ParameterType = mkN "" ;
|
||||
|
||||
singular_Parameter = mkN "eintala" ;
|
||||
plural_Parameter = mkN "fleirtala" ;
|
||||
|
||||
masculine_Parameter = mkN "karlkyn" ;
|
||||
feminine_Parameter = mkN "kvenkyn" ;
|
||||
neuter_Parameter = mkN "hvorugkyn" ;
|
||||
-- uter_Parameter = mkN "uter" ;
|
||||
|
||||
nominative_Parameter = mkN "nefnifall" ;
|
||||
genitive_Parameter = mkN "eignarfall" ;
|
||||
dative_Parameter = mkN "þágufall" ;
|
||||
accusative_Parameter = mkN "þolfall" ;
|
||||
{-
|
||||
partitive_Parameter = mkN "partitive" ;
|
||||
translative_Parameter = mkN "translative" ;
|
||||
essive_Parameter = mkN "essive" ;
|
||||
inessive_Parameter = mkN "inessive" ;
|
||||
elative_Parameter = mkN "elative" ;
|
||||
illative_Parameter = mkN "illative" ;
|
||||
adessive_Parameter = mkN "adessive" ;
|
||||
ablative_Parameter = mkN "ablative" ;
|
||||
allative_Parameter = mkN "allative" ;
|
||||
abessive_Parameter = mkN "abessive" ;
|
||||
comitative_Parameter = mkN "comitative" ;
|
||||
instructive_Parameter = mkN "instructive" ;
|
||||
-}
|
||||
|
||||
active_Parameter = mkN "germynd" ;
|
||||
passive_Parameter = mkN "miðmynd" ;
|
||||
middle_Parameter = mkN "þolmynd" ;
|
||||
|
||||
imperative_Parameter = mkN "boðháttur" ;
|
||||
indicative_Parameter = mkN "framsöguháttur" ;
|
||||
conjunctive_Parameter = mkN "viðtengingarháttur" ;
|
||||
infinitive_Parameter = mkN "nafnháttur" ;
|
||||
|
||||
definite_Parameter = mkN "ákveðinn" ;
|
||||
indefinite_Parameter = mkN "óákveðinn" ;
|
||||
|
||||
present_Parameter = mkN "nútíð" ;
|
||||
past_Parameter = mkN "þátíð" ;
|
||||
-- future_Parameter = mkN "future" ;
|
||||
-- conditional_Parameter = mkN "conditional" ;
|
||||
-- potential_Parameter = mkN "potential" ;
|
||||
-- perfect_Parameter = mkN "perfect" ;
|
||||
-- imperfect_Parameter = mkN "imperfect" ;
|
||||
supine_Parameter = mkN "sagnbót" ;
|
||||
-- agent_Parameter = mkN "agent" ;
|
||||
-- simple_past_Parameter = mkN "simple past" ;
|
||||
|
||||
participle_Parameter = mkN "lýsingarháttur" ;
|
||||
-- aux_verb_Parameter = mkN "auxiliary" ;
|
||||
-- gerund_Parameter = mkN "Gerund" ;
|
||||
|
||||
positive_Parameter = mkN "frumstig" ;
|
||||
comparative_Parameter = mkN "miðstig" ;
|
||||
superlative_Parameter = mkN "efsta stig" ; ----
|
||||
-- predicative_Parameter = mkN "predicative" ;
|
||||
-- negative_Parameter = mkN "negative" ;
|
||||
|
||||
short_Parameter = mkN "short" ;
|
||||
long_Parameter = mkN "long" ;
|
||||
|
||||
strong_Parameter = mkN "sterk" ; --- sterk beyging
|
||||
weak_Parameter = mkN "veik" ;
|
||||
|
||||
nounHeading n = ss (n.s ! Sg ! Free ! Nom) ;
|
||||
nounPluralHeading n = ss (n.s ! Pl ! Free ! Nom) ;
|
||||
|
||||
exampleGr_N = mkN "example" ;
|
||||
formGr_N = mkN "form" ;
|
||||
|
||||
|
||||
}
|
||||
1714
src/icelandic/WiktIrregIce.gf
Normal file
1714
src/icelandic/WiktIrregIce.gf
Normal file
File diff suppressed because it is too large
Load Diff
229
src/icelandic/wiktionary/CheckWithWiktionary.hs
Normal file
229
src/icelandic/wiktionary/CheckWithWiktionary.hs
Normal file
@@ -0,0 +1,229 @@
|
||||
import qualified Data.Map
|
||||
import qualified Data.Text.IO
|
||||
import Data.Char
|
||||
import Data.List
|
||||
import System.Directory
|
||||
|
||||
-- AR 2019-08-06
|
||||
-- checking IrregIce wrt Wikipedia:
|
||||
--
|
||||
-- > getAllWikt, producing wiktVerbDataIce.txt
|
||||
-- > correctAllRGL, producing rgl-corrected.tmp, rgl-corrected.gf
|
||||
|
||||
-- first do:
|
||||
-- (gf alltenses/IrregIce.gfo) > gt -cat=V | l -table | wf -file="irregsIce.tmp"
|
||||
-- % wget https://en.wiktionary.org/wiki/<each-verb-infinitive> from the 'verbs' list given below
|
||||
|
||||
main = correctAllRGL
|
||||
|
||||
correctAllRGL = do
|
||||
ls <- readFile "irregsIce.tmp" >>= return . lines
|
||||
let vs = getGroups ls
|
||||
let vis = [(actInf v,v) | v <- vs]
|
||||
cvs <- mapM (uncurry rgl2wik) vis
|
||||
writeFile "rgl-corrected.tmp" $ unlines $ concat cvs
|
||||
let cgf = map (uncurry fixedRGL) (zip (map fst vis) cvs)
|
||||
writeFile "rgl-corrected.gf" $ concat $ Data.List.intersperse ", " [f++"_V" | (Just f,_) <- cgf]
|
||||
appendFile "rgl-corrected.gf" $ concat $ map (unlines . snd) $ cgf
|
||||
|
||||
|
||||
|
||||
-- this produces an inspectable file with extracted Wiktionary data, including deviating layouts
|
||||
getAllWikt = do
|
||||
vs <- mapM getWikt verbs
|
||||
writeFile "wiktVerbDataIce.txt" $ unlines $ concat $ Data.List.intersperse ["------"] vs
|
||||
|
||||
verbs = ["aka","ala","auka","ausa","bera","binda","bi\240ja","bjarga","bl\225sa","brenna","bresta","brj\243ta","b\237ta","b\237\240a","b\250a","detta","deyja","draga","drekka","drepa","drj\250pa","dr\237fa","eiga","falla","fara","fela","finna","fj\250ka","flj\243ta","flj\250ga","fl\225","frj\243sa","f\225","gala","ganga","gefa","geta","geyja","gjalda","gjalla","gj\243sa","grafa","gr\225ta","gr\237pa","gr\243a","halda","hanga","hefja","heita","hlaupa","hla\240a","hlj\243ta","hl\230ja","hnj\243ta","hn\237ga","hrinda","hr\237fa","hr\237na","hr\246kkva","hverfa","hv\237na","h\246ggva","kala","kefja","kj\243sa","klj\250fa","koma","kunna","kve\240a","kv\237\240a","leika","leka","lesa","liggja","lj\250ga","lj\250ka","l\225ta","l\237ta","l\237\240a","l\250ka","l\250ta","mala","mega","meta","muna","munu","m\237ga","nema","nj\243ta","n\250a","reka","renna","rj\250fa","r\225\240a","r\237sa","r\237\240a","r\243a","sitja","sj\225","sj\243\240a","sj\250ga","skafa","skaka","skapa","skella","skera","skj\225lfa","skreppa","skr\237\240a","skulu","sk\237na","sleppa","sl\225","sl\237ta","sl\246kkva","smella","smj\250ga","snerta","sn\237\240a","sn\250a","sofa","spinna","spretta","springa","sp\250a","standa","stela","stinga","strj\250ka","st\237ga","st\246kkva","svelta","sverfa","sverja","sv\237fa","sv\237kja","syngja","s\237ga","s\246kkva","s\250pa","taka","tro\240a","unna","vaxa","vega","vella","velta","vera","verpa","ver\240a","vilja","vinda","vinna","vita","v\237kja","\233ta","\254iggja","\254j\243ta","\254rj\243ta","\254r\237fa","\254urfa","\254verra","\254vo"]
|
||||
|
||||
-- not all of these are in Wiktionary
|
||||
rgl_verbs = ["aka","ala","auka","ausa","bera","binda","bi\240ja","bjarga","bl\225sa","brenna","bresta","brj\243ta","b\237ta","b\237\240a","b\250a","detta","deyja","draga","drekka","drepa","drj\250pa","dr\237fa","eiga","falla","fara","fela","finna","fj\250ka","flj\243ta","flj\250ga","fl\225","frj\243sa","f\225","gala","ganga","gefa","geta","geyja","gjalda","gjalla","gj\243sa","grafa","gr\225ta","gr\237pa","gr\243a","halda","hanga","hefja","heita","hlaupa","hla\240a","hlj\243ta","hl\230ja","hnj\243ta","hn\237ga","hrinda","hr\237fa","hr\237na","hr\246kkva","hverfa","hv\237na","h\246ggva","kala","kefja","kj\243sa","klj\250fa","kl\230ja","koma","kunna","kve\240a","kv\237\240a","leika","leka","lesa","liggja","lj\250ga","lj\250ka","l\225ta","l\237ta","l\237\240a","l\250ka","l\250ta","mala","mega","meta","muna","munu","m\237ga","nema","nj\243ta","n\250a","reka","renna","rj\250fa","r\225\240a","r\237sa","r\237\240a","r\243a","sitja","sj\225","sj\243\240a","sj\250ga","skafa","skaka","skapa","skekja","skella","skera","skj\225lfa","skreppa","skr\237\240a","skulu","sk\237na","sleppa","sl\225","sl\237ta","sl\246kkva","smella","smj\250ga","snerta","sn\237\240a","sn\250a","sofa","spinna","spretta","springa","sp\250a","standa","stela","stinga","strj\250ka","st\237ga","st\246kkva","svelta","sverfa","sverja","sv\237fa","sv\237kja","syngja","s\237ga","s\246kkva","s\250pa","taka","tro\240a","unna","vaxa","vega","vella","velta","vera","verpa","ver\240a","vilja","vinda","vinna","vita","v\237kja","\233ta","\254iggja","\254j\243ta","\254rj\243ta","\254r\237fa","\254urfa","\254verra","\254vo"]
|
||||
|
||||
-- Wiktionary table for one verb
|
||||
getWikt :: FilePath -> IO [String]
|
||||
getWikt file =
|
||||
if elem file verbs
|
||||
then putStrLn ("YES: " ++ file) >> readFile file >>= checkPrefixes file . take 75 . dropWhile (not . isStart file) . map untag . getTD . lines
|
||||
else putStrLn ("NO: " ++ file) >> return []
|
||||
|
||||
-- check that a Wiktionary file has expected layout
|
||||
--- this is only a partial check
|
||||
checkPrefixes :: String -> [String] -> IO [String]
|
||||
checkPrefixes file ls =
|
||||
if length ls < 75
|
||||
then putStrLn ("too short " ++ file) >> return []
|
||||
else case unexpectedWikLines ls of
|
||||
[] -> return ls
|
||||
us -> putStrLn (unlines (("unexpected layout in " ++ file) : us)) >> return []
|
||||
|
||||
-- remove HTML tags
|
||||
untag s = case s of {'<':cs -> intag cs ; c:cs -> c:untag cs ; _ -> s}
|
||||
where intag s = case s of '>':cs -> untag cs ; _:cs -> intag cs
|
||||
|
||||
-- consider td cells
|
||||
getTD = filter (\l -> take 3 l == "<td")
|
||||
|
||||
-- start from the Icelandic infinitive form
|
||||
isStart inf s = words s == ["að",inf]
|
||||
|
||||
-- find the word from each td cell; return ZZ if not found
|
||||
wform wik = last $ "ZZ":(filter (all Data.Char.isAlpha) wik)
|
||||
|
||||
-- find the Wiktionary forms for each branch in the RGL table
|
||||
wforms ws = [(i, (if length ws < j then "XX" else wform (words (ws !! (j-1))))) | (i,j) <- rgl2wiktLines]
|
||||
|
||||
-- to correct one RGL table by reference to the Wiktionary data file
|
||||
rgl2wik :: String -> [String] -> IO [String]
|
||||
rgl2wik i v = do
|
||||
fs <- getWikt i
|
||||
let wmap = Data.Map.fromList (wforms fs)
|
||||
putStrLn i
|
||||
print $ Data.Map.size wmap
|
||||
let facit = [unwords (gws ++ correctForm wmap (j,last gws)) | (j,gw) <- zip [1..] v, let gws = words gw]
|
||||
return $ status i facit : facit
|
||||
|
||||
-- fix one entry, provided it has more than 0 deviations
|
||||
fixedRGL :: String -> [String] -> (Maybe String,[String])
|
||||
fixedRGL i (s:rs) =
|
||||
if last (words s) == "0"
|
||||
then (Nothing,[])
|
||||
else (Just i, [
|
||||
"lin " ++ i ++ "_V = OI." ++ i ++ "_V ** {",
|
||||
" s = table {"
|
||||
] ++
|
||||
fixes rs ++
|
||||
[
|
||||
" vf => OI." ++ i ++ "_V.s ! vf",
|
||||
" } ;",
|
||||
" } ;"
|
||||
]
|
||||
)
|
||||
|
||||
-- produces the branch for a form that is fixed
|
||||
fixes rs = [" " ++ vf ++ " => \"" ++ form ++ "\" ; --- " ++ reverse wr !! 2 |
|
||||
r <- rs, let wr = words r, head wr == "s", elem "*" wr, notElem "XX" wr, notElem "ZZ" wr,
|
||||
let vf = takeWhile (/=')') $ drop 1 $ dropWhile (/='(') r,
|
||||
let form = last wr
|
||||
]
|
||||
|
||||
-- line in RGL table -> line in Wik data
|
||||
rgl2wiktLines = [(1,1),(2,38),(3,6),(4,10),(5,14),(6,7),(7,11),(8,15),(9,8),(10,12),(11,16),(12,9),(13,13),(14,17),(15,43),(16,47),(17,51),(18,44),(19,48),(20,52),(21,45),(22,49),(23,53),(24,46),(25,50),(26,54),(27,19),(28,23),(29,27),(30,20),(31,24),(32,28),(33,21),(34,25),(35,29),(36,22),(37,26),(38,30),(39,56),(40,60),(41,64),(42,57),(43,61),(44,65),(45,58),(46,62),(47,66),(48,59),(49,63),(50,67),(51,35),(52,33),(53,72),(54,70),(55,2),(56,39),(81,75),(105,3)]
|
||||
|
||||
-- prefixes on each line of valid Wik data, as extracted from the verb "fara"
|
||||
expectedPrefixes = map unwords [["a\240"],[],[],[],[],["\233g"],["vi\240"],["\233g"],["vi\240"],["\254\250"],["\254i\240"],["\254\250"],["\254i\240"],["hann"],["\254eir"],["hann"],["\254eir"],[],["\233g"],["vi\240"],["\233g"],["vi\240"],["\254\250"],["\254i\240"],["\254\250"],["\254i\240"],["hann"],["\254eir"],["hann"],["\254eir"],[],[],[],[],[],[],[],["a\240"],[],[],[],[],["\233g"],["vi\240"],["\233g"],["vi\240"],["\254\250"],["\254i\240"],["\254\250"],["\254i\240"],["hann"],["\254eir"],["hann"],["\254eir"],[],["\233g"],["vi\240"],["\233g"],["vi\240"],["\254\250"],["\254i\240"],["\254\250"],["\254i\240"],["hann"],["\254eir"],["hann"],["\254eir"],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
|
||||
|
||||
-- mark Wiktionary data lines not matching the layout, and therefore ignored in the main function
|
||||
unexpectedWikLines ws = [l ++ " --" ++ p | (l,p) <- zip ws expectedPrefixes, not (Data.List.isPrefixOf p l)]
|
||||
|
||||
-- if a form is not found in Wikt, return ?? ; this is not used as a correction
|
||||
correctForm wmap (j,w) = case Data.Map.lookup j wmap of
|
||||
Just v | v == w -> []
|
||||
Just v -> ["*",v]
|
||||
_ -> ["??"]
|
||||
|
||||
--- used on the manually marked Wiktionary list for the verb "fara"; this became the expected layout
|
||||
wformsIfMarked ws = [(read (last ww) :: Int, (wform ww, i)) |
|
||||
(i,w) <- zip [1..] ws, let ww = words w, not (null ww), all Data.Char.isDigit (last ww)]
|
||||
|
||||
-- the status is the number of deviations in a verb's table
|
||||
status :: String -> [String] -> String
|
||||
status inf ls = unwords $ "STATUS" : inf : [show (deviations ls)]
|
||||
|
||||
-- deviations in the intermediate file are marked with *; XX and ZZ are not included as correct forms
|
||||
deviations :: [String] -> Int
|
||||
deviations ls = length [l | l <- ls, let r = reverse (words l), r!!1 == "*", notElem (head r) ["XX","ZZ"]]
|
||||
|
||||
-- an RGL verb table has length 105
|
||||
getGroups ls = let (v,vs) = splitAt 105 ls in if null v then [] else v:getGroups vs
|
||||
|
||||
actInf v@(i:_) = last (words i)
|
||||
|
||||
jumpToIcelandic ls = dropWhile (\l -> not (isPrefixOf "<h2>" l && isPrefixOf "Icelandic" (untag l))) ls
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- just retrieving, instead of checking existing GF files ------------
|
||||
|
||||
-- to be run in wiktionary/, with subdirs nouns/ adjectives/ verbs/
|
||||
|
||||
-- to be run in adjectives/
|
||||
getAllWiktNouns = do
|
||||
vs <- readFile "nouns/wikt-nouns.txt" >>= return . lines
|
||||
writeFile "n.tmp" ""
|
||||
mapM_ (\v -> getWiktNoun "nouns/" v >>= appendFile "n.tmp" . unlines . emitGF) vs
|
||||
|
||||
getAllWiktAdjectives = do
|
||||
vs <- readFile "adjectives/wikt-adjectives.txt" >>= return . lines
|
||||
writeFile "a.tmp" ""
|
||||
mapM_ (\v -> getWiktAdjective "adjectives/" v >>= appendFile "a.tmp" . unlines . emitGF) vs
|
||||
|
||||
getAllWiktVerbs = do
|
||||
vs <- readFile "verbs/wikt-verbs.txt" >>= return . lines
|
||||
writeFile "v.tmp" ""
|
||||
mapM_ (\v -> getWiktVerb "verbs/" v >>= appendFile "v.tmp" . unlines . emitGF) vs
|
||||
|
||||
|
||||
|
||||
-- return ([relevant Wikt lines], (fun,cat,lin), message)
|
||||
getWiktWord :: Int -> (String -> [String] -> ([String],((String,String,String),Message))) -> FilePath -> FilePath -> IO ([String],((String,String,String),Message))
|
||||
getWiktWord number check dir file = do
|
||||
let dirfile = dir++file
|
||||
ex <- doesFileExist dirfile
|
||||
if not ex
|
||||
then return ([],(noGF,MBad (file ++ " does not exist")))
|
||||
else do
|
||||
s <- readFile dirfile >>= return . map untag . take number . getTD . jumpToIcelandic . lines
|
||||
return $ check file s
|
||||
|
||||
getWiktNoun = getWiktWord 17 checkNoun
|
||||
getWiktAdjective = getWiktWord 120 checkAdjective
|
||||
getWiktVerb = getWiktWord 75 checkVerb
|
||||
|
||||
noCheck :: String -> [String] -> ([String],((String,String,String),Message))
|
||||
noCheck s ss = (ss, (noGF, MMissing s))
|
||||
noGF = ("--","--","--")
|
||||
|
||||
checkNoun noun forms = case length forms of
|
||||
---- n | n < 24 -> (forms, (noGF, MBad (adj ++ " A: only " ++ show (length forms) ++ " lines")))
|
||||
n | n < 17 -> (forms, (noGF, MBad (noun ++ " N: only " ++ show (length forms) ++ " lines")))
|
||||
_ -> (forms, checkZZ noun (noun ++ "_N", "N", "mkgN " ++ gender (forms!!0), [forms!!i | i <- [1,5,9,13,3,7,11,15]]))
|
||||
where
|
||||
gender s = case take 1 s of
|
||||
"m" -> "masculine"
|
||||
"f" -> "feminine"
|
||||
_ -> "neuter" --- "n"
|
||||
|
||||
|
||||
checkAdjective adj forms = case length forms of
|
||||
n | n < 24 -> (forms, (noGF, MBad (adj ++ " A: only " ++ show (length forms) ++ " lines")))
|
||||
n | n < 120 -> (forms, checkZZ adj (adj ++ "_A", "A", "mkA", [forms!!0, forms!!1]))
|
||||
_ -> (forms, checkZZ adj (adj ++ "_A", "A", "mkA", [forms!!0, forms!!1,forms!!48]))
|
||||
|
||||
checkVerb verb forms = case length forms of
|
||||
n | n < 75 -> (forms, (noGF, MBad (verb ++ " V: only " ++ show (length forms) ++ " lines")))
|
||||
_ -> case unexpectedWikLines forms of
|
||||
[] -> (forms, checkZZ verb (verb ++ "_V", "V", "mkV", [verb, forms!!5, forms!!18, forms!!74, forms!!1]))
|
||||
us -> (forms, (noGF, MBad (verb ++ " V: unexpected lines " ++ show (length us))))
|
||||
|
||||
data Message =
|
||||
MGood String
|
||||
| MBad String
|
||||
| MMissing String
|
||||
deriving (Show,Eq)
|
||||
|
||||
app f xs = unwords $ f : map (quote . wform . words) xs
|
||||
quote s = "\"" ++ s ++ "\""
|
||||
|
||||
checkZZ w (fun,cat,lin,args) =
|
||||
if elem "ZZ" (map (wform . words) args)
|
||||
then (noGF, MBad (w ++ " " ++ cat ++ ": missing forms in data"))
|
||||
else ((fun,cat, app lin args),MGood w)
|
||||
|
||||
emitGF (ss,((fun,cat,lin),msg)) = case msg of
|
||||
MGood _ -> [unwords ["fun",fun,":",cat,";"],unwords ["lin",fun,"=",lin,";"]]
|
||||
_ -> ["-- " ++ show msg]
|
||||
|
||||
|
||||
-- mkN : (x1,_,_,_,_,_,_,x8 : Str) -> Gender -> N = mk8N ; nForms8 a b c d e f g h ; sgNom,sgAcc,sgDat,sgGen,plNom,plAcc,plDat,plGen
|
||||
-- mkA : (_,_,_ : Str) -> A = mk3A ; mk3A : (_,_,_ : Str) -> A = \mas,fem,com
|
||||
-- mkV : (_,_,_,_,_ : Str) -> V = \telja,tel,taldi,talinn,talið -> -- inf,presIndSg1,pastIndSg1, weak past part, sup
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@ param
|
||||
|
||||
CardOrd = NCard Gender | NOrd Gender Number ;
|
||||
|
||||
--- a workaround for a lost constructor used e.g. in Attempto: AR 2019-09-11
|
||||
oper
|
||||
AF : Gender -> Number -> AForm = \g,n -> case n of {Sg => ASg g AAttr ; Pl => APl g} ;
|
||||
|
||||
-- The following coercions are useful:
|
||||
|
||||
oper
|
||||
|
||||
@@ -119,6 +119,8 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
||||
|
||||
NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ;
|
||||
|
||||
ProgrVPSlash = variants {} ; -- VPSlash -> VPSlash ;
|
||||
|
||||
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
|
||||
ExistMassCN cn = ExistNP (MassNP cn) ;
|
||||
ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ;
|
||||
|
||||
68
src/rukiga/AdjectiveCgg.gf
Executable file
68
src/rukiga/AdjectiveCgg.gf
Executable file
@@ -0,0 +1,68 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete AdjectiveCgg of Adjective = CatCgg **
|
||||
open ResCgg, Prelude, ParamX in {
|
||||
|
||||
lin
|
||||
|
||||
PositA a = {s=\\_=> a.s; position= a.position; isProper = a.isProper; isPrep = a.isPrep};
|
||||
|
||||
-- The superlative use is covered in $Ord$.
|
||||
|
||||
--AdjOrd : Ord -> AP ; -- warmest
|
||||
AdjOrd ord = {s= \\agr => ord.s!agr ; position= ord.position; isProper = False; isPrep = False};
|
||||
-- UseComparA : A -> AP ; -- warmer
|
||||
|
||||
-- note: using ho means a little bigger.
|
||||
--UseComparA a ={s =\\_ => a.s ++ BIND ++ "ho" ++ "kukira"; position1= a.position1; isProper = a.isProper; isPrep = a.isPrep};
|
||||
UseComparA a ={s =\\_ => a.s ++ "kukira"; position= a.position; isProper = a.isProper; isPrep = a.isPrep};
|
||||
|
||||
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||
{-NOTE: AdA is an adjective modifying adverb-}
|
||||
--AdAP : AdA -> AP -> AP ; -- very warm
|
||||
|
||||
AdAP ada ap = case ada.position of {
|
||||
Pre => {s = \\agr => ada.s ++ ap.s!agr ; position= ap.position; isProper = ap.isProper; isPrep = ap.isPrep};
|
||||
Post => {s = \\agr => ap.s ! agr ++ ada.s; position= ap.position; isProper = ap.isProper; isPrep = ap.isPrep}
|
||||
|
||||
};
|
||||
{-
|
||||
abstract Adjective = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- The principal ways of forming an adjectival phrase are
|
||||
-- positive, comparative, relational, reflexive-relational, and
|
||||
-- elliptic-relational.
|
||||
|
||||
PositA : A -> AP ; -- warm
|
||||
ComparA : A -> NP -> AP ; -- warmer than I
|
||||
ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||
ReflA2 : A2 -> AP ; -- married to itself
|
||||
UseA2 : A2 -> AP ; -- married
|
||||
UseComparA : A -> AP ; -- warmer
|
||||
CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||
|
||||
-- The superlative use is covered in $Ord$.
|
||||
|
||||
AdjOrd : Ord -> AP ; -- warmest
|
||||
|
||||
-- Sentence and question complements defined for all adjectival
|
||||
-- phrases, although the semantics is only clear for some adjectives.
|
||||
|
||||
SentAP : AP -> SC -> AP ; -- good that she is here
|
||||
|
||||
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||
|
||||
AdAP : AdA -> AP -> AP ; -- very warm
|
||||
|
||||
-- It can also be postmodified by an adverb, typically a prepositional phrase.
|
||||
|
||||
AdvAP : AP -> Adv -> AP ; -- warm by nature
|
||||
|
||||
-- The formation of adverbs from adjectives (e.g. "quickly") is covered
|
||||
-- in [Adverb Adverb.html]; the same concerns adadjectives (e.g. "extremely").
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
65
src/rukiga/AdverbCgg.gf
Executable file
65
src/rukiga/AdverbCgg.gf
Executable file
@@ -0,0 +1,65 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete AdverbCgg of Adverb = CatCgg **
|
||||
open ResCgg, Prelude in {
|
||||
|
||||
lin
|
||||
--PrepNP : Prep -> NP -> Adv -- Verb Phrase modifyingadverb such as everywhere
|
||||
|
||||
--adverb of place pg 118 part (c)
|
||||
-- some prepositions can only operate with CN but not PN
|
||||
-- how can we distinguish NPs i.e if they are CN or PN?
|
||||
-- because aha is used for CN while aha-ri is used for PN Omubazi
|
||||
-- nigukora ahari John
|
||||
-- The nounPhrase must carry information about its derivation
|
||||
|
||||
{-Assumed that a PrepNP is always Acc-}
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! Acc; agr = AgrNo}; -- aha meza
|
||||
|
||||
--PositAdvAdj : A -> Adv ; -- warmly
|
||||
--"Impossible to implement because each is lexically different word."
|
||||
{-
|
||||
PositAdvAdj a = case <a.isProper, a.position1> of {
|
||||
<True, True> =>{ s= a}
|
||||
<False, False> =>
|
||||
<True, False> =>
|
||||
<_,_> =>
|
||||
};
|
||||
-}
|
||||
|
||||
{-
|
||||
abstract Adverb = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- The two main ways of forming adverbs are from adjectives and by
|
||||
-- prepositions from noun phrases.
|
||||
|
||||
PositAdvAdj : A -> Adv ; -- warmly
|
||||
PrepNP : Prep -> NP -> Adv ; -- in the house
|
||||
|
||||
-- Comparative adverbs have a noun phrase or a sentence as object of
|
||||
-- comparison.
|
||||
|
||||
ComparAdvAdj : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
||||
ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
|
||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||
|
||||
AdAdv : AdA -> Adv -> Adv ; -- very quickly
|
||||
|
||||
-- Like adverbs, adadjectives can be produced by adjectives.
|
||||
|
||||
PositAdAAdj : A -> AdA ; -- extremely
|
||||
|
||||
-- Subordinate clauses can function as adverbs.
|
||||
|
||||
SubjS : Subj -> S -> Adv ; -- when she sleeps
|
||||
|
||||
-- Comparison adverbs also work as numeral adverbs.
|
||||
|
||||
AdnCAdv : CAdv -> AdN ; -- less (than five)
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
242
src/rukiga/CatCgg.gf
Executable file
242
src/rukiga/CatCgg.gf
Executable file
@@ -0,0 +1,242 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete CatCgg of Cat = CommonX -[Adv,IAdv, AdA]**
|
||||
open (Res=ResCgg), Prelude, (Px=ParamX), Predef in {
|
||||
|
||||
lincat
|
||||
|
||||
|
||||
Imp = {s : Res. ImpPol=> Str} ;
|
||||
QS = {s : Str} ;
|
||||
|
||||
-- Note: SS is a shorthand for {s:Str}, defined in Prelude.gf
|
||||
-- You must change some of the lincats (e.g., for NP, Det and Pron) so that everything works
|
||||
|
||||
S = SS ; -- declarative sentence e.g. "she lived here"
|
||||
Cl = Res.Clause ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
--Questions
|
||||
QCl = Res.Clause ** {posibleSubAgr: Res.Agreement =>Str} ;
|
||||
IComp =
|
||||
{
|
||||
s : Str;
|
||||
--other:Str; Has been deleted but note that there are several words for asking questions
|
||||
n : Res.INumber;
|
||||
requiresSubjPrefix: Bool;
|
||||
requiresIPPrefix: Bool;
|
||||
usesAux : Bool;
|
||||
endOfSentence : Bool
|
||||
} ;
|
||||
IP = {s :Str ; n : Res.INumber; isVerbSuffix: Bool; requiresIPPrefix: Bool; aux:Str; endOfSentence:Bool}; -- other holds the Idet without a prefix
|
||||
IAdv = {s : Str ; requiresSubjPrefix: Bool; endOfSentence:Bool};
|
||||
IDet = {s : Str ; n : Res.Number; requiresSubjPrefix: Bool};
|
||||
IQuant = {s : Res.Number =>Str ; requiresSubjPrefix: Bool};
|
||||
RS = {s :Res.RForm => Str} ; -- relative e.g. "in which she lived"
|
||||
V,VS, VQ, VA = Res.Verb ; --change to {verb : Str ; comp = []} -- one-place verb e.g. "sleep"
|
||||
V2,V2Q, V2S = Res.Verb2;
|
||||
V2A,V3 = Res.Verb3; -- three-place verb e.g. "show"
|
||||
|
||||
VP = Res.VerbPhrase ; -- verb phrase e.g. "is very warm"
|
||||
|
||||
N = Res.Noun ; -- common noun e.g. "house"
|
||||
CN = Res.Noun ; -- common noun (without determiner) e.g. "red house"
|
||||
NP = Res.NounPhrase; -- noun phrase (subject or object) e.g. "the red house"
|
||||
Pron = Res.Pronoun ; -- personal pronoun e.g. "she"
|
||||
Det = Res.Determiner ; -- determiner phrase e.g. "those seven"
|
||||
Quant = {s : Res.Pronoun; s2 :Res.Agreement => Str; doesAgree : Bool; isPron: Bool} ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
||||
Num = Res.Numer ; -- number determining element e.g. "seven"
|
||||
AP = {s :Res.Agreement=> Str ; position : Res.Position; isProper : Bool; isPrep: Bool};--Res.AdjectivalPhrase;
|
||||
A = Res.Adjective;
|
||||
Comp = Res.Comp; -- complement of copula, such as AP e.g. "very warm"
|
||||
|
||||
Adv = Res.Adverb; --Verb Phrase modifying adverb
|
||||
VPSlash = Res.VPSlash;
|
||||
PN = Res.ProperNoun; -- ProperNoun : Type = {s: Str ; a:Agreement ; isPlace : Bool};
|
||||
Conj = Res.Conjunction; -- Conjunction: Type = {s : AgrConj =>Str ;s2 : Str ; n : Number} ; -- conjunction e.g. "and"
|
||||
-- see Structural for explanation of this structure
|
||||
Predet = {s : Str ; s2 : Str; isMWE : Bool; isInflected : Bool}; -- predeterminer (prefixed Quant) e.g. "all"
|
||||
RP = {s : Res.RCase => Res.Agreement => Str ; rObjVariant2: Res.Agreement => Str} ;
|
||||
RCl ={
|
||||
s : Str ; --subject
|
||||
--subAgr:Res.Agreement;
|
||||
rp: Res.RCase => Res.Agreement => Str; -- could delete this
|
||||
--rObjVariant2: Res.Agreement => Str;
|
||||
agr : Res.AgrExist;
|
||||
pres :Str;
|
||||
perf :Str;
|
||||
root : Str;
|
||||
--morphs : Res.VFormMini => Res.VerbMorphPos =>Str;
|
||||
compl : Str; -- after verb: complement, adverbs
|
||||
isCompApStem : Bool;
|
||||
whichRel: Res.RForm
|
||||
} ;
|
||||
--VPSlash ={s:Str; morphs: VMorphs}; --VPSlash ; -- verb phrase missing complement e.g. "give to John"
|
||||
--ClSlash;-- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||
ClSlash = {
|
||||
s : Str ; --subject
|
||||
subjAgr : Res.Agreement;
|
||||
root : Str;
|
||||
pres: Str;
|
||||
perf:Str;
|
||||
--morphs : Res.VFormMini => Res.VerbMorphPos =>Str; --; compl : Str -- after verb: complement, adverbs
|
||||
ap:Str;
|
||||
isRegular:Bool;
|
||||
adv:Str;
|
||||
adV:Str;
|
||||
complType: Res.ComplType;
|
||||
} ;
|
||||
Numeral = {s : Res.CardOrd=>Res.Agreement=> Str ; g : Res.Gender; n: Res.Number} ;
|
||||
Digits = {s : Res.CardOrd => Res.Agreement=>Str ; n : Res.Number ; tail : Px.DTail} ;
|
||||
Ord = {s :Res.Agreement=>Str; position:Res.Position} ;
|
||||
Card = {s :Res.Agreement=>Str; n : Res.Number} ;
|
||||
|
||||
DAP = Res.Determiner ;
|
||||
N2 = Res.Noun ** {c2 : Res.Agreement =>Str}; -- relational noun e.g. "son"
|
||||
Prep = Res.Preposition; -- preposition, or just case e.g. "in"
|
||||
N3 = N2 ** {c3 : Res.Agreement =>Str};
|
||||
VV = Res.Verb ** {inf:Str; whenUsed: Res.VVMood}; --inf is the other verb
|
||||
AdA = {s:Str; position:Res.Position};
|
||||
linref
|
||||
|
||||
Cl =\cl -> cl.s ++ Res.mkSubjClitic cl.subjAgr ++ cl.root ++ BIND ++ cl.pres ++ cl.compl;
|
||||
QCl =\qcl -> qcl.s ++ qcl.posibleSubAgr ! (Res.mkAgreement Res.MU_BA Res.P3 Res.Sg) ++ qcl.root ++ BIND ++ qcl.pres;
|
||||
VP =\vp -> vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2 ++ vp.ap;
|
||||
VPSlash =\vpslash -> vpslash.s ++ BIND ++ vpslash.pres;
|
||||
|
||||
|
||||
--1 Cat: the Category System
|
||||
|
||||
-- The category system is central to the library in the sense
|
||||
-- that the other modules ($Adjective$, $Adverb$, $Noun$, $Verb$ etc)
|
||||
-- communicate through it. This means that a e.g. a function using
|
||||
-- $NP$s in $Verb$ need not know how $NP$s are constructed in $Noun$:
|
||||
-- it is enough that both $Verb$ and $Noun$ use the same type $NP$,
|
||||
-- which is given here in $Cat$.
|
||||
--
|
||||
-- Some categories are inherited from [``Common`` Common.html].
|
||||
-- The reason they are defined there is that they have the same
|
||||
-- implementation in all languages in the resource (typically,
|
||||
-- just a string). These categories are
|
||||
-- $AdA, AdN, AdV, Adv, Ant, CAdv, IAdv, PConj, Phr$,
|
||||
-- $Pol, SC, Tense, Text, Utt, Voc, Interj$.
|
||||
--
|
||||
-- Moreover, the list categories $ListAdv, ListAP, ListNP, ListS$
|
||||
-- are defined on $Conjunction$ and only used locally there.
|
||||
|
||||
{-
|
||||
abstract Cat = Common ** {
|
||||
|
||||
cat
|
||||
|
||||
--2 Sentences and clauses
|
||||
|
||||
-- Constructed in [Sentence Sentence.html], and also in
|
||||
-- [Idiom Idiom.html].
|
||||
|
||||
S ; -- declarative sentence e.g. "she lived here"
|
||||
QS ; -- question e.g. "where did she live"
|
||||
RS ; -- relative e.g. "in which she lived"
|
||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
ClSlash;-- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||
SSlash ;-- sentence missing NP e.g. "she has looked at"
|
||||
Imp ; -- imperative e.g. "look at this"
|
||||
|
||||
--2 Questions and interrogatives
|
||||
|
||||
-- Constructed in [Question Question.html].
|
||||
|
||||
QCl ; -- question clause, with all tenses e.g. "why does she walk"
|
||||
IP ; -- interrogative pronoun e.g. "who"
|
||||
IComp ; -- interrogative complement of copula e.g. "where"
|
||||
IDet ; -- interrogative determiner e.g. "how many"
|
||||
IQuant; -- interrogative quantifier e.g. "which"
|
||||
|
||||
--2 Relative clauses and pronouns
|
||||
|
||||
-- Constructed in [Relative Relative.html].
|
||||
|
||||
RCl ; -- relative clause, with all tenses e.g. "in which she lives"
|
||||
RP ; -- relative pronoun e.g. "in which"
|
||||
|
||||
--2 Verb phrases
|
||||
|
||||
-- Constructed in [Verb Verb.html].
|
||||
|
||||
VP ; -- verb phrase e.g. "is very warm"
|
||||
Comp ; -- complement of copula, such as AP e.g. "very warm"
|
||||
VPSlash ; -- verb phrase missing complement e.g. "give to John"
|
||||
|
||||
--2 Adjectival phrases
|
||||
|
||||
-- Constructed in [Adjective Adjective.html].
|
||||
|
||||
AP ; -- adjectival phrase e.g. "very warm"
|
||||
|
||||
--2 Nouns and noun phrases
|
||||
|
||||
-- Constructed in [Noun Noun.html].
|
||||
-- Many atomic noun phrases e.g. "everybody"
|
||||
-- are constructed in [Structural Structural.html].
|
||||
-- The determiner structure is
|
||||
-- ``` Predet (QuantSg | QuantPl Num) Ord
|
||||
-- as defined in [Noun Noun.html].
|
||||
|
||||
CN ; -- common noun (without determiner) e.g. "red house"
|
||||
NP ; -- noun phrase (subject or object) e.g. "the red house"
|
||||
Pron ; -- personal pronoun e.g. "she"
|
||||
Det ; -- determiner phrase e.g. "those seven"
|
||||
Predet ; -- predeterminer (prefixed Quant) e.g. "all"
|
||||
Quant ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
||||
Num ; -- number determining element e.g. "seven"
|
||||
Card ; -- cardinal number e.g. "seven"
|
||||
ACard ; -- adjective like cardinal e.g. "few", "many"
|
||||
Ord ; -- ordinal number (used in Det) e.g. "seventh"
|
||||
DAP ; -- determiner with adjective e.g. "three small"
|
||||
|
||||
--2 Numerals
|
||||
|
||||
-- Constructed in [Numeral Numeral.html].
|
||||
|
||||
Numeral ; -- cardinal or ordinal in words e.g. "five/fifth"
|
||||
Digits ; -- cardinal or ordinal in digits e.g. "1,000/1,000th"
|
||||
|
||||
--2 Structural words
|
||||
|
||||
-- Constructed in [Structural Structural.html].
|
||||
|
||||
Conj ; -- conjunction e.g. "and"
|
||||
---b DConj ; -- distributed conjunction e.g. "both - and"
|
||||
Subj ; -- subjunction e.g. "if"
|
||||
Prep ; -- preposition, or just case e.g. "in"
|
||||
|
||||
--2 Words of open classes
|
||||
|
||||
-- These are constructed in [Lexicon Lexicon.html] and in
|
||||
-- additional lexicon modules.
|
||||
|
||||
V ; -- one-place verb e.g. "sleep"
|
||||
V2 ; -- two-place verb e.g. "love"
|
||||
V3 ; -- three-place verb e.g. "show"
|
||||
VV ; -- verb-phrase-complement verb e.g. "want"
|
||||
VS ; -- sentence-complement verb e.g. "claim"
|
||||
VQ ; -- question-complement verb e.g. "wonder"
|
||||
VA ; -- adjective-complement verb e.g. "look"
|
||||
V2V ; -- verb with NP and V complement e.g. "cause"
|
||||
V2S ; -- verb with NP and S complement e.g. "tell"
|
||||
V2Q ; -- verb with NP and Q complement e.g. "ask"
|
||||
V2A ; -- verb with NP and AP complement e.g. "paint"
|
||||
|
||||
A ; -- one-place adjective e.g. "warm"
|
||||
A2 ; -- two-place adjective e.g. "divisible"
|
||||
|
||||
N ; -- common noun e.g. "house"
|
||||
N2 ; -- relational noun e.g. "son"
|
||||
N3 ; -- three-place relational noun e.g. "connection"
|
||||
PN ; -- proper name e.g. "Paris"
|
||||
|
||||
-- DEPRECATED: QuantSg, QuantPl
|
||||
--- QuantSg ;-- quantifier ('nucleus' of sing. Det) e.g. "every"
|
||||
--- QuantPl ;-- quantifier ('nucleus' of plur. Det) e.g. "many"
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
16
src/rukiga/CompatibilityCgg.gf
Executable file
16
src/rukiga/CompatibilityCgg.gf
Executable file
@@ -0,0 +1,16 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete CompatibilityCgg of Compatibility = CatCgg **
|
||||
open Prelude, ResCgg in {
|
||||
|
||||
|
||||
{-
|
||||
abstract Compatibility = Cat ** {
|
||||
|
||||
fun
|
||||
NumInt : Int -> Num ; -- 57
|
||||
OrdInt : Int -> Ord ; -- 57
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
105
src/rukiga/ConjunctionCgg.gf
Executable file
105
src/rukiga/ConjunctionCgg.gf
Executable file
@@ -0,0 +1,105 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete ConjunctionCgg of Conjunction = CatCgg **
|
||||
open ResCgg, Coordination, Prelude in {
|
||||
|
||||
|
||||
|
||||
lincat
|
||||
[NP] = {s1,s2 :Case => Str ; agr : Agreement};
|
||||
[CN] = {s1,s2 : Number => NounState => Str; gender:Gender};
|
||||
[AP] = {s1,s2 : Agreement=> Str ; position : Position; isProper : Bool; isPrep: Bool};
|
||||
[RS] = {s1,s2 : RForm => Str};
|
||||
--[IAdv] = {s1,s2 : Str} ;
|
||||
{-
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[AdV] = {s1,s2 : Str} ;
|
||||
|
||||
[RS] = {s1,s2 : Agr => Str ; c : NPCase};
|
||||
[CN] = {s1,s2 : Number => Case => Str};
|
||||
[DAP] = {s1,s2 : Str ; n : Number};
|
||||
-}
|
||||
{-
|
||||
--1 Conjunction: Coordination
|
||||
|
||||
-- Coordination is defined for many different categories; here is
|
||||
-- a sample. The rules apply to *lists* of two or more elements,
|
||||
-- and define two general patterns:
|
||||
-- - ordinary conjunction: X,...X and X
|
||||
-- - distributed conjunction: both X,...,X and X
|
||||
--
|
||||
--
|
||||
-- $VP$ conjunctions are not covered here, because their applicability
|
||||
-- depends on language. Some special cases are defined in
|
||||
-- [``Extra`` ../abstract/Extra.gf].
|
||||
|
||||
|
||||
abstract Conjunction = Cat ** {
|
||||
|
||||
--2 Rules
|
||||
|
||||
fun
|
||||
ConjS : Conj -> ListS -> S ; -- he walks and she runs
|
||||
ConjRS : Conj -> ListRS -> RS ; -- who walks and whose mother runs
|
||||
ConjAP : Conj -> ListAP -> AP ; -- cold and warm
|
||||
ConjNP : Conj -> ListNP -> NP ; -- she or we
|
||||
ConjAdv : Conj -> ListAdv -> Adv ; -- here or there
|
||||
ConjAdV : Conj -> ListAdV -> AdV ; -- always or sometimes
|
||||
ConjIAdv : Conj -> ListIAdv -> IAdv ; -- where and with whom
|
||||
ConjCN : Conj -> ListCN -> CN ; -- man and woman
|
||||
ConjDet : Conj -> ListDAP -> Det ; -- his or her
|
||||
|
||||
--2 Categories
|
||||
|
||||
-- These categories are only used in this module.
|
||||
|
||||
cat
|
||||
[S]{2} ;
|
||||
[RS]{2} ;
|
||||
[Adv]{2} ;
|
||||
[AdV]{2} ;
|
||||
[NP]{2} ;
|
||||
[AP]{2} ;
|
||||
[IAdv]{2} ;
|
||||
[CN] {2} ;
|
||||
[DAP] {2} ;
|
||||
|
||||
--2 List constructors
|
||||
|
||||
-- The list constructors are derived from the list notation and therefore
|
||||
-- not given explicitly. But here are their type signatures:
|
||||
|
||||
-- overview
|
||||
BaseC : C -> C -> [C] ; --- for C = AdV, Adv, AP, CN, Det, IAdv, NP, RS, S
|
||||
ConsC : C -> [C] -> [C] ; --- for C = AdV, Adv, AP, CN, Det, IAdv, NP, RS, S
|
||||
|
||||
-- complete list
|
||||
|
||||
BaseAP : AP -> AP -> ListAP ; -- red, white
|
||||
ConsAP : AP -> ListAP -> ListAP ; -- red, white, blue
|
||||
|
||||
BaseAdV : AdV -> AdV -> ListAdV ; -- always, sometimes
|
||||
ConsAdV : AdV -> ListAdV -> ListAdV ; -- always, sometimes, never
|
||||
|
||||
BaseAdv : Adv -> Adv -> ListAdv ; -- here, there
|
||||
ConsAdv : Adv -> ListAdv -> ListAdv ; -- here, there, everywhere
|
||||
|
||||
BaseCN : CN -> CN -> ListCN ; -- man, woman
|
||||
ConsCN : CN -> ListCN -> ListCN ; -- man, woman, child
|
||||
|
||||
BaseIAdv : IAdv -> IAdv -> ListIAdv ; -- where, when
|
||||
ConsIAdv : IAdv -> ListIAdv -> ListIAdv ; -- where, when, why
|
||||
|
||||
BaseNP : NP -> NP -> ListNP ; -- John, Mary
|
||||
ConsNP : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||
|
||||
BaseRS : RS -> RS -> ListRS ; -- who walks, whom I know
|
||||
ConsRS : RS -> ListRS -> ListRS ; -- who wals, whom I know, who is here
|
||||
|
||||
BaseS : S -> S -> ListS ; -- John walks, Mary runs
|
||||
ConsS : S -> ListS -> ListS ; -- John walks, Mary runs, Bill swims
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
23
src/rukiga/DictCggAbs.gf
Normal file
23
src/rukiga/DictCggAbs.gf
Normal file
@@ -0,0 +1,23 @@
|
||||
abstract DictEngAbs = Cat ** {
|
||||
|
||||
{- --beginning of comment
|
||||
|
||||
fun
|
||||
{-
|
||||
--since this is a structural word, maybe take it to
|
||||
Extend module for structural as you have done for Dict.
|
||||
We have ahandi = at another place whic has no English equivalent.
|
||||
-}
|
||||
------ Structural words
|
||||
{-aditions-}
|
||||
here1_Adv; -- hanu
|
||||
here2_Adv; -- hanuuya --exactly here or here with emphasis
|
||||
there1_Adv; -- hariya
|
||||
outside_Adv; -- aheeru
|
||||
near_Adv; --haihi
|
||||
hare_Adv; --far
|
||||
|
||||
-} --end of comment
|
||||
|
||||
|
||||
}
|
||||
97
src/rukiga/ExtraStructuralAbs.gf
Normal file
97
src/rukiga/ExtraStructuralAbs.gf
Normal file
@@ -0,0 +1,97 @@
|
||||
abstract ExtraStructuralAbs = Cat ** {
|
||||
|
||||
fun
|
||||
--Pronouns additional
|
||||
it_N_N_Sg_Pron : Pron;
|
||||
it_N_N_Pl_Pron : Pron;
|
||||
|
||||
it_KU_MA _Sg_Pron : Pron ;
|
||||
it_KU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_BU_MA_Sg_Pron : Pron;
|
||||
it_BU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_RU_BU_Sg_Pron : Pron;
|
||||
it_RU_BU_Pl_Pron : Pron;
|
||||
|
||||
it_GU_GA_Sg_Pron : Pron;
|
||||
it_GU_GA_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_ZERO_Sg_Pron : Pron; --what do you do with this?
|
||||
it_ZERO_ZERO_Pl_Pron : Pron; --what would you do with this?
|
||||
|
||||
it_MU_MI_Sg_Pron : Pron;
|
||||
it_MU_MI_Pl_Pron : Pron;
|
||||
|
||||
it_RI_MA_Sg_Pron : Pron;
|
||||
it_RI_MA_Pl_Pron : Pron;
|
||||
|
||||
it_I_MA_Sg_Pron : Pron;
|
||||
it_I_MA_Pl_Pron : Pron;
|
||||
|
||||
it_KA_BU_Sg_Pron : Pron;
|
||||
it_KA_BU_Pl_Pron : Pron;
|
||||
|
||||
it_KA_TU_Sg_Pron : Pron;
|
||||
it_KA_TU_Pl_Pron : Pron;
|
||||
|
||||
it_RU_N_Sg_Pron : Pron;
|
||||
it_RU_N_Pl_Pron : Pron;
|
||||
|
||||
it_RU_MA_Sg_Pron : Pron;
|
||||
it_RU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron;
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron; -- might have to remove this.
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_MU_Sg_Pron : Pron;
|
||||
it_MU_Pl_Pron : Pron;
|
||||
|
||||
it_KU_Sg_Pron : Pron;
|
||||
it_KU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BU_Sg_Pron : Pron;
|
||||
it_ZERO_BU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MA_Sg_Pron : Pron;
|
||||
it_ZERO_MA_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MI_Sg_Pron : Pron;
|
||||
it_ZERO_MI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_TU_Sg_Pron : Pron;
|
||||
it_ZERO_TU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_N_Sg_Pron : Pron;
|
||||
it_ZERO_N_Pl_Pron : Pron;
|
||||
|
||||
it_I_ZERO_Sg_Pron : Pron;
|
||||
--it_I_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RI_ZERO_Sg_Pron : Pron;
|
||||
--it_RI_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KU_ZERO_Sg_Pron : Pron;
|
||||
--it_KU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_MU_ZERO_Sg_Pron : Pron;
|
||||
it_MU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RU_ZERO_Sg_Pron : Pron;
|
||||
--it_RU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KA_ZERO_Sg_Pron : Pron;
|
||||
--it_KA_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_BAA_Sg_Pron : Pron;
|
||||
--it_ZERO_BAA_Pl_Pron : Pron;
|
||||
}
|
||||
97
src/rukiga/ExtraStructuralAbsCgg.gf
Normal file
97
src/rukiga/ExtraStructuralAbsCgg.gf
Normal file
@@ -0,0 +1,97 @@
|
||||
abstract ExtraStructuralAbs = Cat ** {
|
||||
|
||||
fun
|
||||
--Pronouns additional
|
||||
it_N_N_Sg_Pron : Pron;
|
||||
it_N_N_Pl_Pron : Pron;
|
||||
|
||||
it_KU_MA _Sg_Pron : Pron ;
|
||||
it_KU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_BU_MA_Sg_Pron : Pron;
|
||||
it_BU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_RU_BU_Sg_Pron : Pron;
|
||||
it_RU_BU_Pl_Pron : Pron;
|
||||
|
||||
it_GU_GA_Sg_Pron : Pron;
|
||||
it_GU_GA_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_ZERO_Sg_Pron : Pron; --what do you do with this?
|
||||
it_ZERO_ZERO_Pl_Pron : Pron; --what would you do with this?
|
||||
|
||||
it_MU_MI_Sg_Pron : Pron;
|
||||
it_MU_MI_Pl_Pron : Pron;
|
||||
|
||||
it_RI_MA_Sg_Pron : Pron;
|
||||
it_RI_MA_Pl_Pron : Pron;
|
||||
|
||||
it_I_MA_Sg_Pron : Pron;
|
||||
it_I_MA_Pl_Pron : Pron;
|
||||
|
||||
it_KA_BU_Sg_Pron : Pron;
|
||||
it_KA_BU_Pl_Pron : Pron;
|
||||
|
||||
it_KA_TU_Sg_Pron : Pron;
|
||||
it_KA_TU_Pl_Pron : Pron;
|
||||
|
||||
it_RU_N_Sg_Pron : Pron;
|
||||
it_RU_N_Pl_Pron : Pron;
|
||||
|
||||
it_RU_MA_Sg_Pron : Pron;
|
||||
it_RU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron;
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron; -- might have to remove this.
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_MU_Sg_Pron : Pron;
|
||||
it_MU_Pl_Pron : Pron;
|
||||
|
||||
it_KU_Sg_Pron : Pron;
|
||||
it_KU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BU_Sg_Pron : Pron;
|
||||
it_ZERO_BU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MA_Sg_Pron : Pron;
|
||||
it_ZERO_MA_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MI_Sg_Pron : Pron;
|
||||
it_ZERO_MI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_TU_Sg_Pron : Pron;
|
||||
it_ZERO_TU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_N_Sg_Pron : Pron;
|
||||
it_ZERO_N_Pl_Pron : Pron;
|
||||
|
||||
it_I_ZERO_Sg_Pron : Pron;
|
||||
--it_I_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RI_ZERO_Sg_Pron : Pron;
|
||||
--it_RI_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KU_ZERO_Sg_Pron : Pron;
|
||||
--it_KU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_MU_ZERO_Sg_Pron : Pron;
|
||||
it_MU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RU_ZERO_Sg_Pron : Pron;
|
||||
--it_RU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KA_ZERO_Sg_Pron : Pron;
|
||||
--it_KA_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_BAA_Sg_Pron : Pron;
|
||||
--it_ZERO_BAA_Pl_Pron : Pron;
|
||||
}
|
||||
97
src/rukiga/ExtraStructuralCggAbs.gf
Normal file
97
src/rukiga/ExtraStructuralCggAbs.gf
Normal file
@@ -0,0 +1,97 @@
|
||||
abstract ExtraStructuralCggAbs = Cat ** {
|
||||
|
||||
fun
|
||||
--Pronouns additional
|
||||
it_N_N_Sg_Pron : Pron;
|
||||
it_N_N_Pl_Pron : Pron;
|
||||
|
||||
it_KU_MA _Sg_Pron : Pron ;
|
||||
it_KU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_BU_MA_Sg_Pron : Pron;
|
||||
it_BU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_RU_BU_Sg_Pron : Pron;
|
||||
it_RU_BU_Pl_Pron : Pron;
|
||||
|
||||
it_GU_GA_Sg_Pron : Pron;
|
||||
it_GU_GA_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_ZERO_Sg_Pron : Pron; --what do you do with this?
|
||||
it_ZERO_ZERO_Pl_Pron : Pron; --what would you do with this?
|
||||
|
||||
it_MU_MI_Sg_Pron : Pron;
|
||||
it_MU_MI_Pl_Pron : Pron;
|
||||
|
||||
it_RI_MA_Sg_Pron : Pron;
|
||||
it_RI_MA_Pl_Pron : Pron;
|
||||
|
||||
it_I_MA_Sg_Pron : Pron;
|
||||
it_I_MA_Pl_Pron : Pron;
|
||||
|
||||
it_KA_BU_Sg_Pron : Pron;
|
||||
it_KA_BU_Pl_Pron : Pron;
|
||||
|
||||
it_KA_TU_Sg_Pron : Pron;
|
||||
it_KA_TU_Pl_Pron : Pron;
|
||||
|
||||
it_RU_N_Sg_Pron : Pron;
|
||||
it_RU_N_Pl_Pron : Pron;
|
||||
|
||||
it_RU_MA_Sg_Pron : Pron;
|
||||
it_RU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron;
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron; -- might have to remove this.
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_MU_Sg_Pron : Pron;
|
||||
it_MU_Pl_Pron : Pron;
|
||||
|
||||
it_KU_Sg_Pron : Pron;
|
||||
it_KU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BU_Sg_Pron : Pron;
|
||||
it_ZERO_BU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MA_Sg_Pron : Pron;
|
||||
it_ZERO_MA_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MI_Sg_Pron : Pron;
|
||||
it_ZERO_MI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_TU_Sg_Pron : Pron;
|
||||
it_ZERO_TU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_N_Sg_Pron : Pron;
|
||||
it_ZERO_N_Pl_Pron : Pron;
|
||||
|
||||
it_I_ZERO_Sg_Pron : Pron;
|
||||
--it_I_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RI_ZERO_Sg_Pron : Pron;
|
||||
--it_RI_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KU_ZERO_Sg_Pron : Pron;
|
||||
--it_KU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_MU_ZERO_Sg_Pron : Pron;
|
||||
it_MU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RU_ZERO_Sg_Pron : Pron;
|
||||
--it_RU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KA_ZERO_Sg_Pron : Pron;
|
||||
--it_KA_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_BAA_Sg_Pron : Pron;
|
||||
--it_ZERO_BAA_Pl_Pron : Pron;
|
||||
}
|
||||
101
src/rukiga/ExtraStructuralCggAbsCgg.gf
Normal file
101
src/rukiga/ExtraStructuralCggAbsCgg.gf
Normal file
@@ -0,0 +1,101 @@
|
||||
concrete ExtraStructuralCggAbsCgg of ExtraStructuralCggAbs = CatCgg ** open ResCgg {
|
||||
|
||||
{-
|
||||
lin
|
||||
--Pronouns additional
|
||||
|
||||
it_N_N_Sg_Pron : Pron;
|
||||
it_N_N_Pl_Pron : Pron;
|
||||
|
||||
it_KU_MA _Sg_Pron : Pron ;
|
||||
it_KU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_BU_MA_Sg_Pron : Pron;
|
||||
it_BU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_RU_BU_Sg_Pron : Pron;
|
||||
it_RU_BU_Pl_Pron : Pron;
|
||||
|
||||
it_GU_GA_Sg_Pron : Pron;
|
||||
it_GU_GA_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_ZERO_Sg_Pron : Pron; --what do you do with this?
|
||||
it_ZERO_ZERO_Pl_Pron : Pron; --what would you do with this?
|
||||
|
||||
it_MU_MI_Sg_Pron : Pron;
|
||||
it_MU_MI_Pl_Pron : Pron;
|
||||
|
||||
it_RI_MA_Sg_Pron : Pron;
|
||||
it_RI_MA_Pl_Pron : Pron;
|
||||
|
||||
it_I_MA_Sg_Pron : Pron;
|
||||
it_I_MA_Pl_Pron : Pron;
|
||||
|
||||
it_KA_BU_Sg_Pron : Pron;
|
||||
it_KA_BU_Pl_Pron : Pron;
|
||||
|
||||
it_KA_TU_Sg_Pron : Pron;
|
||||
it_KA_TU_Pl_Pron : Pron;
|
||||
|
||||
it_RU_N_Sg_Pron : Pron;
|
||||
it_RU_N_Pl_Pron : Pron;
|
||||
|
||||
it_RU_MA_Sg_Pron : Pron;
|
||||
it_RU_MA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron;
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_HA_Sg_Pron : Pron; -- might have to remove this.
|
||||
it_HA_Pl_Pron : Pron;
|
||||
|
||||
it_MU_Sg_Pron : Pron;
|
||||
it_MU_Pl_Pron : Pron;
|
||||
|
||||
it_KU_Sg_Pron : Pron;
|
||||
it_KU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BU_Sg_Pron : Pron;
|
||||
it_ZERO_BU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_BI_Sg_Pron : Pron;
|
||||
it_ZERO_BI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MA_Sg_Pron : Pron;
|
||||
it_ZERO_MA_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_MI_Sg_Pron : Pron;
|
||||
it_ZERO_MI_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_TU_Sg_Pron : Pron;
|
||||
it_ZERO_TU_Pl_Pron : Pron;
|
||||
|
||||
--it_ZERO_N_Sg_Pron : Pron;
|
||||
it_ZERO_N_Pl_Pron : Pron;
|
||||
|
||||
it_I_ZERO_Sg_Pron : Pron;
|
||||
--it_I_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RI_ZERO_Sg_Pron : Pron;
|
||||
--it_RI_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KU_ZERO_Sg_Pron : Pron;
|
||||
--it_KU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_MU_ZERO_Sg_Pron : Pron;
|
||||
it_MU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_RU_ZERO_Sg_Pron : Pron;
|
||||
--it_RU_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_KA_ZERO_Sg_Pron : Pron;
|
||||
--it_KA_ZERO_Pl_Pron : Pron;
|
||||
|
||||
it_ZERO_BAA_Sg_Pron : Pron;
|
||||
--it_ZERO_BAA_Pl_Pron : Pron;
|
||||
|
||||
-}
|
||||
}
|
||||
30
src/rukiga/GrammarCgg.gf
Executable file
30
src/rukiga/GrammarCgg.gf
Executable file
@@ -0,0 +1,30 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete GrammarCgg of Grammar =
|
||||
NounCgg,
|
||||
VerbCgg,
|
||||
AdjectiveCgg,
|
||||
AdverbCgg,
|
||||
NumeralCgg,
|
||||
SentenceCgg,
|
||||
QuestionCgg,
|
||||
RelativeCgg,
|
||||
ConjunctionCgg,
|
||||
PhraseCgg,
|
||||
TextX -[Adv, IAdv,AdA],
|
||||
StructuralCgg,
|
||||
IdiomCgg,
|
||||
TenseX -[Adv,IAdv,AdA]
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
{-
|
||||
--1 Grammar: the Main Module of the Resource Grammar
|
||||
|
||||
-- This grammar is a collection of the different grammar modules,
|
||||
-- To test the resource, import [``Lang`` Lang.html], which also contains
|
||||
-- a lexicon.
|
||||
-}
|
||||
|
||||
}
|
||||
43
src/rukiga/IdiomCgg.gf
Executable file
43
src/rukiga/IdiomCgg.gf
Executable file
@@ -0,0 +1,43 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete IdiomCgg of Idiom = CatCgg **
|
||||
open Prelude, ResCgg in {
|
||||
|
||||
{-
|
||||
--1 Idiom: Idiomatic Expressions
|
||||
|
||||
abstract Idiom = Cat ** {
|
||||
|
||||
-- This module defines constructions that are formed in fixed ways,
|
||||
-- often different even in closely related languages.
|
||||
|
||||
fun
|
||||
ImpersCl : VP -> Cl ; -- it is hot
|
||||
GenericCl : VP -> Cl ; -- one sleeps
|
||||
|
||||
CleftNP : NP -> RS -> Cl ; -- it is I who did it
|
||||
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
|
||||
|
||||
ExistNP : NP -> Cl ; -- there is a house
|
||||
ExistIP : IP -> QCl ; -- which houses are there
|
||||
|
||||
-- 7/12/2012 generalizations of these
|
||||
|
||||
ExistNPAdv : NP -> Adv -> Cl ; -- there is a house in Paris
|
||||
ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris
|
||||
|
||||
ProgrVP : VP -> VP ; -- be sleeping
|
||||
|
||||
ImpPl1 : VP -> Utt ; -- let's go
|
||||
|
||||
ImpP3 : NP -> VP -> Utt ; -- let John walk
|
||||
|
||||
-- 3/12/2013 non-reflexive uses of "self"
|
||||
|
||||
SelfAdvVP : VP -> VP ; -- is at home himself
|
||||
SelfAdVVP : VP -> VP ; -- is himself at home
|
||||
SelfNP : NP -> NP ; -- the president himself (is at home)
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
19
src/rukiga/LangCgg.gf
Executable file
19
src/rukiga/LangCgg.gf
Executable file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete LangCgg of Lang =
|
||||
GrammarCgg,
|
||||
LexiconCgg
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
{-
|
||||
--1 Lang: a Test Module for the Resource Grammar
|
||||
|
||||
-- This grammar is for testing the resource as included in the
|
||||
-- language-independent API, consisting of a grammar and a lexicon.
|
||||
-- The grammar without a lexicon is [``Grammar`` Grammar.html],
|
||||
-- which may be more suitable to open in applications.
|
||||
-}
|
||||
|
||||
}
|
||||
352
src/rukiga/Lexicon.gf
Normal file
352
src/rukiga/Lexicon.gf
Normal file
@@ -0,0 +1,352 @@
|
||||
abstract Lexicon = Cat ** {
|
||||
fun
|
||||
add_V3 : V3 ;
|
||||
airplane_N : N ;
|
||||
alas_Interj : Interj ;
|
||||
already_Adv : Adv ;
|
||||
animal_N : N ;
|
||||
answer_V2S : V2S ;
|
||||
apartment_N : N ;
|
||||
apple_N : N ;
|
||||
art_N : N ;
|
||||
ashes_N : N ;
|
||||
ask_V2Q : V2Q ;
|
||||
baby_N : N ;
|
||||
back_N : N ;
|
||||
bad_A : A ;
|
||||
bank_N : N ;
|
||||
bark_N : N ;
|
||||
beautiful_A : A ;
|
||||
become_VA : VA ;
|
||||
beer_N : N ;
|
||||
beg_V2V : V2V ;
|
||||
belly_N : N ;
|
||||
big_A : A ;
|
||||
bike_N : N ;
|
||||
bird_N : N ;
|
||||
bite_V2 : V2 ;
|
||||
black_A : A ;
|
||||
blood_N : N ;
|
||||
blow_V : V ;
|
||||
blue_A : A ;
|
||||
boat_N : N ;
|
||||
bone_N : N ;
|
||||
book_N : N ;
|
||||
boot_N : N ;
|
||||
boss_N : N ;
|
||||
boy_N : N ;
|
||||
bread_N : N ;
|
||||
break_V2 : V2 ;
|
||||
breast_N : N ;
|
||||
breathe_V : V ;
|
||||
broad_A : A ;
|
||||
brother_N2 : N2 ;
|
||||
brown_A : A ;
|
||||
burn_V : V ;
|
||||
butter_N : N ;
|
||||
buy_V2 : V2 ;
|
||||
camera_N : N ;
|
||||
cap_N : N ;
|
||||
car_N : N ;
|
||||
carpet_N : N ;
|
||||
cat_N : N ;
|
||||
ceiling_N : N ;
|
||||
chair_N : N ;
|
||||
cheese_N : N ;
|
||||
child_N : N ;
|
||||
church_N : N ;
|
||||
city_N : N ;
|
||||
clean_A : A ;
|
||||
clever_A : A ;
|
||||
close_V2 : V2 ;
|
||||
cloud_N : N ;
|
||||
coat_N : N ;
|
||||
cold_A : A ;
|
||||
come_V : V ;
|
||||
computer_N : N ;
|
||||
correct_A : A ;
|
||||
country_N : N ;
|
||||
count_V2 : V2 ;
|
||||
cousin_N : N ;
|
||||
cow_N : N ;
|
||||
cut_V2 : V2 ;
|
||||
day_N : N ;
|
||||
die_V : V ;
|
||||
dig_V : V ;
|
||||
dirty_A : A ;
|
||||
distance_N3 : N3 ;
|
||||
doctor_N : N ;
|
||||
dog_N : N ;
|
||||
door_N : N ;
|
||||
do_V2 : V2 ;
|
||||
drink_V2 : V2 ;
|
||||
dry_A : A ;
|
||||
dull_A : A ;
|
||||
dust_N : N ;
|
||||
ear_N : N ;
|
||||
earth_N : N ;
|
||||
easy_A2V : A2 ;
|
||||
eat_V2 : V2 ;
|
||||
egg_N : N ;
|
||||
empty_A : A ;
|
||||
enemy_N : N ;
|
||||
eye_N : N ;
|
||||
factory_N : N ;
|
||||
fall_V : V ;
|
||||
far_Adv : Adv ;
|
||||
father_N2 : N2 ;
|
||||
fat_N : N ;
|
||||
fear_VS : VS ;
|
||||
fear_V2 : V2 ;
|
||||
feather_N : N ;
|
||||
fight_V2 : V2 ;
|
||||
find_V2 : V2 ;
|
||||
fingernail_N : N ;
|
||||
fire_N : N ;
|
||||
fish_N : N ;
|
||||
float_V : V ;
|
||||
floor_N : N ;
|
||||
flower_N : N ;
|
||||
flow_V : V ;
|
||||
fly_V : V ;
|
||||
fog_N : N ;
|
||||
foot_N : N ;
|
||||
forest_N : N ;
|
||||
forget_V2 : V2 ;
|
||||
freeze_V : V ;
|
||||
fridge_N : N ;
|
||||
friend_N : N ;
|
||||
fruit_N : N ;
|
||||
full_A : A ;
|
||||
fun_AV : A ;
|
||||
garden_N : N ;
|
||||
girl_N : N ;
|
||||
give_V3 : V3 ;
|
||||
glove_N : N ;
|
||||
gold_N : N ;
|
||||
good_A : A ;
|
||||
go_V : V ;
|
||||
grammar_N : N ;
|
||||
grass_N : N ;
|
||||
green_A : A ;
|
||||
guts_N : N ;
|
||||
hair_N : N ;
|
||||
hand_N : N ;
|
||||
harbour_N : N ;
|
||||
hate_V2 : V2 ;
|
||||
hat_N : N ;
|
||||
head_N : N ;
|
||||
heart_N : N ;
|
||||
hear_V2 : V2 ;
|
||||
heavy_A : A ;
|
||||
hill_N : N ;
|
||||
hit_V2 : V2 ;
|
||||
hold_V2 : V2 ;
|
||||
hope_VS : VS ;
|
||||
horn_N : N ;
|
||||
horse_N : N ;
|
||||
hot_A : A ;
|
||||
house_N : N ;
|
||||
hunt_V2 : V2 ;
|
||||
husband_N : N ;
|
||||
ice_N : N ;
|
||||
important_A : A ;
|
||||
industry_N : N ;
|
||||
iron_N : N ;
|
||||
john_PN : PN ;
|
||||
jump_V : V ;
|
||||
kill_V2 : V2 ;
|
||||
king_N : N ;
|
||||
knee_N : N ;
|
||||
know_V2 : V2 ;
|
||||
know_VQ : VQ ;
|
||||
know_VS : VS ;
|
||||
lake_N : N ;
|
||||
lamp_N : N ;
|
||||
language_N : N ;
|
||||
laugh_V : V ;
|
||||
leaf_N : N ;
|
||||
learn_V2 : V2 ;
|
||||
leather_N : N ;
|
||||
leave_V2 : V2 ;
|
||||
left_Ord : Ord ;
|
||||
leg_N : N ;
|
||||
lie_V : V ;
|
||||
like_V2 : V2 ;
|
||||
listen_V2 : V2 ;
|
||||
liver_N : N ;
|
||||
live_V : V ;
|
||||
long_A : A ;
|
||||
lose_V2 : V2 ;
|
||||
louse_N : N ;
|
||||
love_N : N ;
|
||||
love_V2 : V2 ;
|
||||
man_N : N ;
|
||||
married_A2 : A2 ;
|
||||
meat_N : N ;
|
||||
milk_N : N ;
|
||||
moon_N : N ;
|
||||
mother_N2 : N2 ;
|
||||
mountain_N : N ;
|
||||
mouth_N : N ;
|
||||
music_N : N ;
|
||||
name_N : N ;
|
||||
narrow_A : A ;
|
||||
near_A : A ;
|
||||
neck_N : N ;
|
||||
new_A : A ;
|
||||
newspaper_N : N ;
|
||||
night_N : N ;
|
||||
nose_N : N ;
|
||||
now_Adv : Adv ;
|
||||
number_N : N ;
|
||||
oil_N : N ;
|
||||
old_A : A ;
|
||||
open_V2 : V2 ;
|
||||
paint_V2A : V2A ;
|
||||
paper_N : N ;
|
||||
paris_PN : PN ;
|
||||
peace_N : N ;
|
||||
pen_N : N ;
|
||||
person_N : N ;
|
||||
planet_N : N ;
|
||||
plastic_N : N ;
|
||||
play_V2 : V2 ;
|
||||
play_V : V ;
|
||||
policeman_N : N ;
|
||||
priest_N : N ;
|
||||
probable_AS : A ;
|
||||
pull_V2 : V2 ;
|
||||
push_V2 : V2 ;
|
||||
put_V2 : V2 ;
|
||||
queen_N : N ;
|
||||
question_N : N ;
|
||||
radio_N : N ;
|
||||
rain_N : N ;
|
||||
rain_V0 : V ;
|
||||
read_V2 : V2 ;
|
||||
ready_A : A ;
|
||||
reason_N : N ;
|
||||
red_A : A ;
|
||||
religion_N : N ;
|
||||
restaurant_N : N ;
|
||||
right_Ord : Ord ;
|
||||
river_N : N ;
|
||||
road_N : N ;
|
||||
rock_N : N ;
|
||||
roof_N : N ;
|
||||
root_N : N ;
|
||||
rope_N : N ;
|
||||
rotten_A : A ;
|
||||
round_A : A ;
|
||||
rubber_N : N ;
|
||||
rub_V2 : V2 ;
|
||||
rule_N : N ;
|
||||
run_V : V ;
|
||||
salt_N : N ;
|
||||
sand_N : N ;
|
||||
say_VS : VS ;
|
||||
school_N : N ;
|
||||
science_N : N ;
|
||||
scratch_V2 : V2 ;
|
||||
sea_N : N ;
|
||||
seed_N : N ;
|
||||
seek_V2 : V2 ;
|
||||
see_V2 : V2 ;
|
||||
sell_V3 : V3 ;
|
||||
send_V3 : V3 ;
|
||||
sew_V : V ;
|
||||
sharp_A : A ;
|
||||
sheep_N : N ;
|
||||
ship_N : N ;
|
||||
shirt_N : N ;
|
||||
shoe_N : N ;
|
||||
shop_N : N ;
|
||||
short_A : A ;
|
||||
silver_N : N ;
|
||||
sing_V : V ;
|
||||
sister_N : N ;
|
||||
sit_V : V ;
|
||||
skin_N : N ;
|
||||
sky_N : N ;
|
||||
sleep_V : V ;
|
||||
small_A : A ;
|
||||
smell_V : V ;
|
||||
smoke_N : N ;
|
||||
smooth_A : A ;
|
||||
snake_N : N ;
|
||||
snow_N : N ;
|
||||
sock_N : N ;
|
||||
song_N : N ;
|
||||
speak_V2 : V2 ;
|
||||
spit_V : V ;
|
||||
split_V2 : V2 ;
|
||||
squeeze_V2 : V2 ;
|
||||
stab_V2 : V2 ;
|
||||
stand_V : V ;
|
||||
star_N : N ;
|
||||
steel_N : N ;
|
||||
stick_N : N ;
|
||||
stone_N : N ;
|
||||
stop_V : V ;
|
||||
stove_N : N ;
|
||||
straight_A : A ;
|
||||
student_N : N ;
|
||||
stupid_A : A ;
|
||||
suck_V2 : V2 ;
|
||||
sun_N : N ;
|
||||
swell_V : V ;
|
||||
swim_V : V ;
|
||||
switch8off_V2 : V2 ;
|
||||
switch8on_V2 : V2 ;
|
||||
table_N : N ;
|
||||
tail_N : N ;
|
||||
talk_V3 : V3 ;
|
||||
teacher_N : N ;
|
||||
teach_V2 : V2 ;
|
||||
television_N : N ;
|
||||
thick_A : A ;
|
||||
thin_A : A ;
|
||||
think_V : V ;
|
||||
throw_V2 : V2 ;
|
||||
tie_V2 : V2 ;
|
||||
today_Adv : Adv ;
|
||||
tongue_N : N ;
|
||||
tooth_N : N ;
|
||||
train_N : N ;
|
||||
travel_V : V ;
|
||||
tree_N : N ;
|
||||
turn_V : V ;
|
||||
ugly_A : A ;
|
||||
uncertain_A : A ;
|
||||
understand_V2 : V2 ;
|
||||
university_N : N ;
|
||||
village_N : N ;
|
||||
vomit_V : V ;
|
||||
wait_V2 : V2 ;
|
||||
walk_V : V ;
|
||||
warm_A : A ;
|
||||
war_N : N ;
|
||||
wash_V2 : V2 ;
|
||||
watch_V2 : V2 ;
|
||||
water_N : N ;
|
||||
wet_A : A ;
|
||||
white_A : A ;
|
||||
wide_A : A ;
|
||||
wife_N : N ;
|
||||
wind_N : N ;
|
||||
window_N : N ;
|
||||
wine_N : N ;
|
||||
wing_N : N ;
|
||||
win_V2 : V2 ;
|
||||
wipe_V2 : V2 ;
|
||||
woman_N : N ;
|
||||
wonder_VQ : VQ ;
|
||||
wood_N : N ;
|
||||
worm_N : N ;
|
||||
write_V2 : V2 ;
|
||||
year_N : N ;
|
||||
yellow_A : A ;
|
||||
young_A : A ;
|
||||
|
||||
}
|
||||
206
src/rukiga/LexiconCgg.gf
Executable file
206
src/rukiga/LexiconCgg.gf
Executable file
@@ -0,0 +1,206 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete LexiconCgg of Lexicon = CatCgg **
|
||||
open ParadigmsCgg, ResCgg, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
--NOTE: Those commented out are not in the abstract
|
||||
--burn_V = mkV "sya" ;
|
||||
--die_V = mkV "fa" ;
|
||||
--fly_V = mkV "guruka" ;
|
||||
|
||||
bird_N = mkN "ekinyonyi" KI_BI ;
|
||||
boat_N = mkN "eryato" RI_MA ;
|
||||
book_N = mkN "ekitabo" KI_BI ;
|
||||
boy_N = mkN "omwojo" "abojo" MU_BA ;
|
||||
bread_N = mkN "omugati" MU_MI;
|
||||
car_N = mkN "emootoka" N_N ;
|
||||
cat_N = mkN "enjangu" N_N ;
|
||||
--chair_N = mkN "entebbe" N_N ;
|
||||
child_N = mkN "omwana" MU_BA ;
|
||||
city_N = mkN "ekibúga" KI_BI; --orurêmbo pl endêmbo
|
||||
cloud_N = mkN "ekikyu" KI_BI ;
|
||||
computer_N = mkN "kanyabwêngye" ZERO_ZERO ; --kanyabwêngye, embiikabwengye, kompyuta
|
||||
cow_N = mkN "ente" N_N ;
|
||||
dog_N = mkN "embwa" N_N ;
|
||||
--person_N = mkN "omuntu" "abantu" MU_BA ;
|
||||
fire_N = mkN "omuriro" MU_MI ;
|
||||
fish_N = mkN "eky'ényanja" KI_BI ;
|
||||
flower_N = mkN "ekimuri" KI_BI ;
|
||||
friend_N = mkN "omunywâni" MU_MI ; -- omunywâni, omunyamukago, omugyenzi
|
||||
girl_N = mkN "omwishiki" MU_BA ;
|
||||
--shoe_N = mkN "ekaito" N_N ;
|
||||
--table_N = mkN "emeza" N_N ;
|
||||
--airplane_N = mkN "enyonyi" N_N ; -- mkN "endégye" N_N;
|
||||
animal_N = mkN "enyamaishwa" N_N ;
|
||||
apple_N = mkN "apple" ZERO_ZERO ;
|
||||
baby_N = mkN "omwana" MU_BA ;
|
||||
beer_N = mkN "amarwa" ZERO_MA ;
|
||||
bike_N = mkN "egaari" N_N ;
|
||||
bird_N = mkN "ekinyonyi" KI_BI ;
|
||||
blood_N = mkN "eshágama" N_ZERO ;
|
||||
grammar_N = mkN "enyómbeka y'órurími" "enyómbeka z'endími" ZERO_ZERO ; -- two words representing one word
|
||||
horse_N = mkN "embaráàsi" N_N ;
|
||||
house_N = mkN "enju" N_N ;
|
||||
language_N = mkN "orurími" "endími" RU_N ;
|
||||
man_N = mkN "omushaija" MU_BA ;
|
||||
milk_N = mkN "amate" ZERO_MA ;
|
||||
music_N = mkN "music" ZERO_ZERO ; -- I have not found the translation
|
||||
river_N = mkN "omugyera" MU_MI ; --omurîndi,
|
||||
sea_N = mkN "enyanja" N_N ;
|
||||
ship_N = mkN "ekyombo" KI_BI ; -- eméèri [NC_n_n]
|
||||
star_N = mkN "enyonyóòzi" N_N ;
|
||||
train_N = mkN "egaari y'omwika" N_N ; -- plural would be egáàri z'omwika
|
||||
tree_N = mkN "omuti" MU_MI ;
|
||||
water_N = mkN "amáìzi" ZERO_MA ;
|
||||
wine_N = mkN "víìnyo" ZERO_ZERO ;
|
||||
woman_N = mkN "omwishiki" MU_BA ;
|
||||
|
||||
--Proper Nouns
|
||||
john_PN = mkPN "Yohana" (AgP3 Sg MU_BA) False;
|
||||
paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places???
|
||||
|
||||
--Adjectives
|
||||
bad_A = mkAdjective "bi" Post False False; --False means the adjective is a stem and comes after the complete noun
|
||||
--beautiful_A = mkAdjective "rungi" False;
|
||||
big_A = mkAdjective "hango" Post False False;
|
||||
black_A = mkAdjective "kwirangura" Post False False;
|
||||
blue_A = mkAdjective "buuru" Post True True ;
|
||||
clean_A = mkAdjective "yonjo" Post False False; --: A ;
|
||||
cold_A = mkAdjective "rikufuka" Post False False; --: A ;
|
||||
good_A =mkAdjective "rungi" Post False False; --: A ;
|
||||
heavy_A = mkAdjective "rikuremeera" Post False False; --: A ; --notice ri as a verb is
|
||||
hot_A = mkAdjective "rikwotsya" Post False False; -- rikutagata -- problematic words like hot we need a new set of clitics
|
||||
new_A = mkAdjective "sya" Post False False; --: A ;
|
||||
old_A = mkAdjective "kúru" Post False False; --: A ;
|
||||
ready_A = mkAdjective "eteekateekire" Post False False; --: A ;
|
||||
red_A = mkAdjective "ríkutukura" Post False False; --: A ;
|
||||
small_A = mkAdjective "kye" Post False False;
|
||||
warm_A = mkAdjective "rikutagata" Post False False;--: A ;
|
||||
white_A = mkAdjective "rikwera" Post False False;--: A ;
|
||||
yellow_A = mkAdjective "kinekye" Post True True;--: A ; or yero, or kyenju
|
||||
young_A = mkAdjective "to" Post False False;--: A ;
|
||||
green_A =mkAdjective "kijubwe" Post False True;
|
||||
|
||||
--ditransitive verbs
|
||||
bite_V2 = mkV2 "rum";
|
||||
break_V2 = mkV2 "hend"; --: V2 ;
|
||||
buy_V2 = mkV2 "gur" ; --: V2 ;
|
||||
close_V2 = mkV2 "king";
|
||||
count_V2 = mkV2 "ba" "ra" "zire";
|
||||
cut_V2 = mkV2 "sha" "ra" "zire";
|
||||
do_V2 = mkV2 "ko" "ra" "zire";
|
||||
drink_V2 = mkV2 "nyw";
|
||||
eat_V2 = mkV2 "ry";
|
||||
fear_V2 = mkV2 "tiin";
|
||||
find_V2 = mkV2 "bon" ; --: V2 ; -- many words; kureeba, kubóna,kushanga, kumamya,kujumbura
|
||||
kill_V2 = mkV2 "it"; --: V2 ;
|
||||
love_V2 = mkV2 "kûnd"; --: V2 ;
|
||||
read_V2 = mkV2 "shom";--: V2 ;
|
||||
see_V2 = mkV2 "reeb"; --: V2 ;
|
||||
teach_V2 = mkV2 "shomes" ; --: V2 ; or kwegyesa
|
||||
understand_V2 = mkV2 "étegyerez"; --: V2 ;
|
||||
wait_V2 = mkV2 "tegyerez"; --: V2 ;
|
||||
|
||||
-- ditransitive verbs
|
||||
add_V3 = mkV3 "gáìt";
|
||||
give_V3 = mkV3 "héére" "za" "ize";
|
||||
sell_V3 = mkV3 "gu" "za" "rize";
|
||||
send_V3 = mkV3 "tum" ;
|
||||
talk_V3 = mkV3 "gamb";
|
||||
|
||||
|
||||
-- Intransitive verbs
|
||||
come_V = mkV "ij";
|
||||
go_V = mkV "gyend"; --: V ; -- Many words: kuza, kuraba,kutoora, kugyenda=go away, kushuma=go down
|
||||
jump_V = mkV "guruk" ;
|
||||
play_V = mkV "záàn"; --: V ;
|
||||
live_V = mkV "tuur" ; --manyF: kutuura i.e. live somewhere, stay = kuráàra
|
||||
run_V = mkV "íruk"; -- : V ;
|
||||
sleep_V = mkV "nyama" ; --: V ;--Kugwejegyera, kubyama
|
||||
swim_V = mkV "og"; --: V ;
|
||||
travel_V = mkV "gyen" "da" "zire" ;--: V ;
|
||||
walk_V = mkV "ribá" "ta" "si"; --: V ; or kuribata Runynakore it is different
|
||||
|
||||
-- A verb whose complement is a sentence
|
||||
fear_VS = mkVS (lin V (mkV "tin")); --: VS ;
|
||||
hope_VS = mkVS (lin V (mkV "siga")); --: VS ; -- a bit complicated because what we normally use is nyine amatsiko i.e usin the noun. The verb should be kwesiga but this seems borrowed from Luganda
|
||||
know_VS = mkVS (lin V (mkV "manya")); --: VS ;
|
||||
say_VS = mkVS (lin V (mkV "gi" "ra" "zire"));--: VS ;
|
||||
|
||||
-- verbs whose complements are questions
|
||||
know_VQ = mkVQ (lin V (mkV "many")); --: VQ ;
|
||||
--wonder_VQ : VQ ;
|
||||
|
||||
-- Verb whose complement is an adjective
|
||||
become_VA = mkVA (lin V mkBecome);--: VA ;
|
||||
|
||||
|
||||
--Verbs that have a noun Phrase complement and a verb phrase complement (V2V)
|
||||
--beg_V2V : V2V ;
|
||||
--Adverbs
|
||||
now_Adv = mkAdv "hati" AgrNo;
|
||||
--far_Adv = mkAdv "hare";
|
||||
|
||||
--today_Adv = mkAdv "erizooba" AgrNo;
|
||||
|
||||
father_N2 = mkN2 (mkN "tata" MU_BA) (lin Prep (mkPrep [] [] True)) ;
|
||||
|
||||
distance_N3 = mkN3 (mkN "orugyendo" ZERO_BU) (lin Prep (mkPrep "kurunga" "" False)) (lin Prep (mkPrep "mpáka" "" False)); --could orugyendo work in its place?
|
||||
|
||||
alas_Interj ={s="ryakareeba"; }; --: Interj ;
|
||||
|
||||
oper
|
||||
aboutP = mkPrep "about" ;
|
||||
atP = mkPrep "at" ;
|
||||
forP = mkPrep "for" ;
|
||||
fromP = mkPrep "kurunga" "" False;
|
||||
inP = mkPrep "omu" "omuri" False;
|
||||
onP = mkPrep "aha" "ahari" False;
|
||||
toP = mkPrep "aha" [] False;
|
||||
|
||||
|
||||
|
||||
|
||||
{-
|
||||
--Old LexiconCgg.gf
|
||||
burn_V = mkV "sya" ;
|
||||
die_V = mkV "fa" ;
|
||||
fly_V = mkV "guruka" ;
|
||||
run_V = mkV "iruka" ;
|
||||
sleep_V = mkV "byama" ;
|
||||
walk_V = mkV "tabula" ;
|
||||
|
||||
bird_N = mkN "ekinyonyi" KI_BI ;
|
||||
boat_N = mkN "eryato" RI_MA ;
|
||||
book_N = mkN "ekitabo" KI_BI ;
|
||||
boy_N = mkN "omwojo" "abojo" MU_BA ;
|
||||
car_N = mkN "emootoka" N_N ;
|
||||
chair_N = mkN "entebbe" N_N;
|
||||
cloud_N = mkN "ekikyu" KI_BI ;
|
||||
person_N = mkN "omuntu" "abantu" MU_BA ;
|
||||
girl_N = mkN "omwishiki" MU_BA ;
|
||||
shoe_N = mkN "ekaito" N_N ;
|
||||
table_N = mkN "emeza" N_N ;
|
||||
bad_A = mkAdjective "bi" False; --False means the adjective is a stem and comes after the complet noun
|
||||
beautiful_A = mkAdjective "rungi" False;
|
||||
far_Adv = mkAdv "hare";
|
||||
now_Adv = mkAdv "hati";
|
||||
today_Adv = mkAdv "erizooba";
|
||||
bite_V2 = mkV2 "ruma";
|
||||
break_V2 = mkV2 "henda";
|
||||
buy_V2 = mkV2 "gura";
|
||||
close_V2 = mkV2 "kinga";
|
||||
count_V2 = mkV2 "bara";
|
||||
cut_V2 = mkV2 "shara";
|
||||
do_V2 = mkV2 "kora";
|
||||
drink_V2 = mkV2 "nywa";
|
||||
eat_V2 = mkV2 "rya";
|
||||
fear_V2 = mkV2 "tiina";
|
||||
|
||||
-------------------------Differences Rukiga only--------------------
|
||||
airplane_N : mkN "endegye" N_N;
|
||||
-}
|
||||
|
||||
}
|
||||
77786
src/rukiga/NP-treebank.txt
Normal file
77786
src/rukiga/NP-treebank.txt
Normal file
File diff suppressed because it is too large
Load Diff
378
src/rukiga/NounCgg.gf
Executable file
378
src/rukiga/NounCgg.gf
Executable file
@@ -0,0 +1,378 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete NounCgg of Noun = CatCgg **
|
||||
open ResCgg, Prelude, Predef in {
|
||||
|
||||
lin
|
||||
|
||||
--UsePN : PN -> NP ; -- John
|
||||
UsePN pn = {s = \\ _ => pn.s; agr = pn.a; nounCat = PropNoun}; -- John
|
||||
|
||||
{- need use of a pre -}
|
||||
UsePron pron =
|
||||
let default3PAgr = (AgP3 Sg KI_BI)
|
||||
in case <pron.agr> of {
|
||||
<(AgrYes a)> => {s = pron.s; agr = a; nounCat = ComNoun}; --: Pron -> NP ; -- he
|
||||
<_> => {s = pron.third !default3PAgr; agr = default3PAgr; nounCat = ComNoun}
|
||||
};
|
||||
--UsePron pron = pron; -- the result of use pron is a NounPhrase
|
||||
--MassNP : CN -> NP ; -- (beer)
|
||||
MassNP cn = {s = \\_ =>cn.s ! Sg ! Complete; agr = AgP3 Sg cn.gender; nounCat = ComNoun}; --: CN -> NP ; -- milk
|
||||
--DetCN det cn = mkDeterminer det cn; --Should be nemed mkDetCN
|
||||
DetCN det cn = mkDetCN det cn; -- the man
|
||||
{-
|
||||
case det.pos of{
|
||||
PreDeterminer =>{s = det.s ++ cn.s!det.ntype!det.num} ;
|
||||
PostDeterminer=>{s = cn.s!det.ntype!det.num ++ mkNCParticles!SubjM!AgP3 det.num cn.nc + det.s}
|
||||
}; --use a function because code is becoming long
|
||||
-}
|
||||
UseN noun = noun ;
|
||||
|
||||
--Noun = {s : NounType=>Number => Str ; nc : NClass} ;
|
||||
--AdjCN ap cn = {s=\\ntype, num=>cn.s!ntype!num ++ ap.s!AgP3 num cn.nc; nc=cn.nc};
|
||||
--AdjCN : AP -> CN -> CN ; -- big house
|
||||
AdjCN ap cn =
|
||||
case <ap.position, ap.isProper, > of {
|
||||
<Pre, True> => {
|
||||
s = \\ num, ns =>ap.s ! AgP3 num cn.gender ++ cn.s ! num ! ns ;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
};
|
||||
<Post, False> => case ap.isPrep of {
|
||||
False => {
|
||||
s = \\ num, ns => cn.s ! num ! ns ++ mkAdjPronIVClitic (AgP3 num cn.gender)
|
||||
++ ap.s ! AgP3 Sg KI_BI;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
};
|
||||
True => {
|
||||
s = \\ num, ns => (cn.s ! num ! ns) ++
|
||||
mkGenPrepNoIVClitic (AgP3 num cn.gender) ++ ap.s ! AgP3 Sg KI_BI;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
}
|
||||
};
|
||||
<Pre, False> => {
|
||||
s = \\ num, ns => mkAdjPronIVClitic (AgP3 num cn.gender)
|
||||
++ ap.s ! AgP3 num cn.gender ++ (cn.s ! num ! ns) ;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
};
|
||||
<Post, True> => {
|
||||
s = \\ num, ns => (cn.s ! num ! ns) ++ ap.s ! AgP3 num cn.gender;
|
||||
gender = cn.gender; nounCat = cn.nounCat
|
||||
}
|
||||
|
||||
}; -- big house
|
||||
|
||||
--RelCN : CN -> RS -> CN ; -- house that John bought
|
||||
RelCN cn rs = {s=\\n,ns => cn.s !n ! ns ++ rs.s! (RF RObj); gender = cn.gender; nounCat = cn.nounCat};
|
||||
|
||||
{-
|
||||
A predeterminer is any word that modifies a noun Phrase.
|
||||
These Predeterminers are found in Structural
|
||||
-}
|
||||
--PredetNP : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np = let a = np.agr;
|
||||
nomS = np.s ! Nom; --It does not matter which. Just pick out one.
|
||||
accS = np.s ! Acc;
|
||||
in
|
||||
case <predet.isMWE, predet.isInflected> of {
|
||||
<False, True> => {s = \\_ =>nomS ++ mkPredetPref a ++ predet.s ; agr = a; nounCat = np.nounCat};
|
||||
<True, True > => {s = \\_ =>nomS ++ mkPredetPref a ++ predet.s ++
|
||||
mkPredetPref a ++ predet.s2; agr = a; nounCat = np.nounCat};
|
||||
<False,False> => {s = \\_ =>nomS ++ predet.s ; agr = a; nounCat = np.nounCat};
|
||||
<True,False> => {s = \\_ =>nomS ++ predet.s ++ predet.s2; agr = a; nounCat = np.nounCat} -- never seen this case
|
||||
};
|
||||
|
||||
--AdvNP : NP -> Adv -> NP ; -- Paris today
|
||||
AdvNP np adv = {s= \\c => np.s ! c ++ adv.s; agr = np.agr; nounCat = np.nounCat };
|
||||
--PPartNP : NP -> V2 -> NP ; -- the man seen use the Passive form of the verb see. abantu abarebirwe
|
||||
PPartNP np v2 =
|
||||
{s= \\c => np.s!c ++ mkSubjClitic np.agr ++ v2.s ++ BIND ++ mkVerbMorphs!VFPastPart!RestOfVerb; agr = np.agr; nounCat = np.nounCat};
|
||||
|
||||
{-What the hell does this mean?-}
|
||||
ExtAdvNP np adv = {s= \\c => np.s ! c ++ embedInCommas adv.s; agr = np.agr; nounCat = np.nounCat}; -- how do I do the adverbial clause?
|
||||
-- Determiner: Type = {s:Str; ntype:NounType; num:Number; pos:Position}; -- type for Determier necessary for catCgg.gf
|
||||
RelNP np rs ={s = \\c => np.s ! c ++ rs.s! (RF RSubj); agr =np.agr; nounCat = np.nounCat};
|
||||
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||
-- quantifier and an optional numeral can be discerned.
|
||||
--DetQuant : Quant -> Num -> Det ; -- these five
|
||||
DetQuant quant num = case quant.isPron of {
|
||||
True => {s=[]; s2 = quant.s2; ntype = Incomplete; num = num.n; pos=Pre; doesAgree = quant.doesAgree};
|
||||
False => {s= quant.s.s ! Nom; s2 =\\_ =>[]; ntype = Complete; num = num.n; pos=Pre; doesAgree = quant.doesAgree} --
|
||||
};
|
||||
|
||||
--DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
||||
DetQuantOrd quant num ord = {
|
||||
s =[];
|
||||
s2 =\\agr => mkThis!agr ++ quant.s2 ! agr ++ ord.s!agr;
|
||||
ntype = Complete;
|
||||
num = num.n;
|
||||
pos = Pre;
|
||||
doesAgree = True
|
||||
};
|
||||
|
||||
NumSg = {s=\\_=>[]; n=Sg}; --Num
|
||||
NumPl = {s=\\_=>[]; n=Pl}; --Num
|
||||
--NumCard : Card -> Num ; -- one/five [explicit numeral]
|
||||
NumCard card = {s =\\agr =>card.s ! agr; n=card.n };
|
||||
--Quant = {s : Res.Pronoun; s2 :Res.Agreement => Str; doesAgree : Bool; isPron: Bool} ;
|
||||
IndefArt = {s={s=\\_=>[]; third = \\_,_=>[];agr = AgrNo }; s2 = \\_=>[]; doesAgree = False; isPron=False};
|
||||
DefArt = {s={s =\\_=>[]; third = \\_,_=>[]; agr = AgrNo }; s2 = \\_=>[]; doesAgree = False; isPron = False}; -- noun with initial vowel
|
||||
|
||||
--NumDigits : Digits -> Card ; -- 51
|
||||
NumDigits dig = {s = dig.s!NCard ; n=dig.n};
|
||||
--NumNumeral : Numeral -> Card ; -- fifty-one
|
||||
NumNumeral numeral = {s=numeral.s!NCard; n=numeral.n};
|
||||
--OrdDigits : Digits -> Ord ; -- 51st
|
||||
OrdDigits dig ={s=dig.s!NOrd ; position = Post};
|
||||
|
||||
--OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
OrdNumeral numeral ={s=numeral.s!NOrd; position = Post};
|
||||
--OrdSuperl : A -> Ord ; -- warmest
|
||||
--Adjective : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool};
|
||||
OrdSuperl a = {s= \\c => (mkAdjPronIVClitic c) ++ BIND ++ "kukirayo" ++ "obu" ++ BIND ++ a.s; position= a.position} ;--{s= \\c => "okukirayo" ++ (mkAdjPronIVClitic c) ++ a.s ++ ++ BIND ++ "ona"; position = a.position};
|
||||
-- One can combine a numeral and a superlative.
|
||||
--OrdNumeralSuperl : Numeral -> A -> Ord ; -- third largest
|
||||
OrdNumeralSuperl numeral a = {s= \\c => numeral.s !NOrd !c ++ "omu" ++ "kukirayo" ++ "obu" ++ BIND ++ a.s; position = a.position};
|
||||
-- AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||
AdvCN cn adv ={s=\\ntype,num =>cn.s!ntype!num ++ adv.s; gender=cn.gender; nounCat = cn.nounCat};
|
||||
-- Pronouns have possessive forms. Genitives of other kinds
|
||||
-- of noun phrases are not given here, since they are not possible
|
||||
-- in e.g. Romance languages. They can be found in $Extra$ modules.
|
||||
|
||||
--PossPron : Pron -> Quant ; -- my (house)
|
||||
PossPron pron = {s =pron; s2 =\\_=> []; doesAgree = True; isPron = True};
|
||||
|
||||
--3 Conjoinable determiners and ones with adjectives
|
||||
|
||||
--AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
||||
|
||||
AdjDAP dap ap =
|
||||
{ s = dap.s ++ ap.s! AgP3 Sg KI_BI ; -- does no harm since they are all same strings
|
||||
s2 = dap.s2;
|
||||
ntype = dap.ntype ;
|
||||
num = dap.num ;
|
||||
pos = dap.pos;
|
||||
doesAgree= True
|
||||
};
|
||||
|
||||
--DetDAP : Det -> DAP ; -- this (or that)
|
||||
DetDAP det =det;
|
||||
|
||||
--AdNum : AdN -> Card -> Card ; -- almost 51
|
||||
AdNum adn card = {s = \\a => adn.s ++ card.s ! a; n = card.n};
|
||||
--ComplN2 : N2->NP -> CN
|
||||
|
||||
ComplN2 n2 np =
|
||||
{ s = \\n, ns => n2.s ! n ! ns ++ n2.c2 ! mkAgreement n2.gender P1 n ++ np.s !Acc;
|
||||
gender=n2.gender; nounCat = n2.nounCat};
|
||||
--ComplN3 : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
||||
|
||||
ComplN3 n3 np =
|
||||
{s = \\n, ns => n3.s ! n ! ns ++ n3.c2 ! mkAgreement n3.gender P1 n ++ np.s !Acc;
|
||||
c2 = n3.c3;
|
||||
gender=n3.gender; nounCat = n3.nounCat}; -- we choose n3 because it is important when using the na conjunction
|
||||
|
||||
--2 Apposition
|
||||
|
||||
-- This is certainly overgenerating.
|
||||
|
||||
--ApposCN : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||
ApposCN cn np ={s = \\n, ns => cn.s! n!ns ++ np.s !Nom; gender = cn.gender; nounCat = cn.nounCat};
|
||||
-- This is different from the partitive, as shown by many languages.
|
||||
|
||||
--CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
||||
CountNP det np = case det.doesAgree of {
|
||||
True => {s=\\c=> np.s!c ++ "emye ahari" ++ det.s2 ! np.agr; agr = np.agr; nounCat = np.nounCat};
|
||||
False => {s=\\c=> np.s!c ++ det.s; agr = np.agr; nounCat = np.nounCat}
|
||||
};
|
||||
|
||||
--Determiners can form noun phrases directly.
|
||||
--DetNP : Det -> NP ; -- these five
|
||||
DetNP det = case det.doesAgree of {
|
||||
True => {s=\\_=> det.s2 ! AgP3 Sg KI_BI; agr = AgP3 Sg KI_BI; nounCat = ComNoun};
|
||||
False => {s=\\c=> det.s; agr = AgP3 Sg KI_BI; nounCat = ComNoun}
|
||||
};
|
||||
-- Nouns can also be modified by embedded sentences and questions.
|
||||
-- For some nouns this makes little sense, but we leave this for applications
|
||||
-- to decide. Sentential complements are defined in [Verb Verb.html].
|
||||
--SentCN : CN -> SC -> CN
|
||||
SentCN cn sc = {s = \\ n, ns => cn.s!n!ns ++ sc.s; gender = cn.gender; nounCat = cn.nounCat};
|
||||
|
||||
|
||||
-- Relational nouns can also be used without their arguments.
|
||||
-- The semantics is typically derivative of the relational meaning.
|
||||
|
||||
--UseN2 : N2 -> CN ; -- mother
|
||||
UseN2 n2 = {s = n2.s; gender = n2.gender; nounCat = n2.nounCat};
|
||||
--Use2N3 : N3 -> N2 ; -- distance (from this city)
|
||||
Use2N3 n3 = {s = n3.s; gender = n3.gender; nounCat = n3.nounCat; c2 = n3.c2};
|
||||
--Use3N3 : N3 -> N2 ; -- distance (to Paris)
|
||||
Use3N3 n3 = {s = n3.s; gender = n3.gender; nounCat = n3.nounCat; c2 = n3.c3};
|
||||
|
||||
-- (New 13/3/2013 AR; Structural.possess_Prep and part_Prep should be deprecated in favour of these.)
|
||||
|
||||
--PossNP : CN -> NP -> CN ; -- house of Paris, house of mine
|
||||
PossNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIVClitic np.agr ++ np.s ! Nom; gender = cn.gender; nounCat = cn.nounCat};
|
||||
--PartNP : CN -> NP -> CN ; -- glass of wine
|
||||
PartNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIVClitic np.agr ++ np.s ! Nom; gender = cn.gender; nounCat = cn.nounCat};
|
||||
{-
|
||||
--1 Noun: Nouns, noun phrases, and determiners
|
||||
|
||||
abstract Noun = Cat ** {
|
||||
|
||||
|
||||
--2 Noun phrases
|
||||
|
||||
-- The three main types of noun phrases are
|
||||
-- - common nouns with determiners
|
||||
-- - proper names
|
||||
-- - pronouns
|
||||
--
|
||||
--
|
||||
fun
|
||||
DetCN : Det -> CN -> NP ; -- the man
|
||||
UsePN : PN -> NP ; -- John
|
||||
UsePron : Pron -> NP ; -- he
|
||||
|
||||
-- Pronouns are defined in the module [``Structural`` Structural.html].
|
||||
|
||||
-- A noun phrase already formed can be modified by a $Predet$erminer.
|
||||
|
||||
PredetNP : Predet -> NP -> NP ; -- only the man
|
||||
|
||||
-- A noun phrase can also be postmodified by the past participle of a
|
||||
-- verb, by an adverb, or by a relative clause
|
||||
|
||||
PPartNP : NP -> V2 -> NP ; -- the man seen
|
||||
AdvNP : NP -> Adv -> NP ; -- Paris today
|
||||
ExtAdvNP: NP -> Adv -> NP ; -- boys, such as ..
|
||||
RelNP : NP -> RS -> NP ; -- Paris, which is here
|
||||
|
||||
-- Determiners can form noun phrases directly.
|
||||
|
||||
DetNP : Det -> NP ; -- these five
|
||||
|
||||
|
||||
--2 Determiners
|
||||
|
||||
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||
-- quantifier and an optional numeral can be discerned.
|
||||
|
||||
DetQuant : Quant -> Num -> Det ; -- these five
|
||||
DetQuantOrd : Quant -> Num -> Ord -> Det ; -- these five best
|
||||
|
||||
-- Whether the resulting determiner is singular or plural depends on the
|
||||
-- cardinal.
|
||||
|
||||
-- All parts of the determiner can be empty, except $Quant$, which is
|
||||
-- the "kernel" of a determiner. It is, however, the $Num$ that determines
|
||||
-- the inherent number.
|
||||
|
||||
NumSg : Num ; -- [no numeral, but marked as singular]
|
||||
NumPl : Num ; -- [no numeral, but marked as plural]
|
||||
NumCard : Card -> Num ; -- one/five [explicit numeral]
|
||||
|
||||
-- $Card$ consists of either digits or numeral words.
|
||||
|
||||
data
|
||||
NumDigits : Digits -> Card ; -- 51
|
||||
NumNumeral : Numeral -> Card ; -- fifty-one
|
||||
|
||||
-- The construction of numerals is defined in [Numeral Numeral.html].
|
||||
|
||||
-- A $Card$ can be modified by certain adverbs.
|
||||
|
||||
fun
|
||||
AdNum : AdN -> Card -> Card ; -- almost 51
|
||||
|
||||
-- An $Ord$ consists of either digits or numeral words.
|
||||
-- Also superlative forms of adjectives behave syntactically like ordinals.
|
||||
|
||||
OrdDigits : Digits -> Ord ; -- 51st
|
||||
OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
OrdSuperl : A -> Ord ; -- warmest
|
||||
|
||||
-- One can combine a numeral and a superlative.
|
||||
|
||||
OrdNumeralSuperl : Numeral -> A -> Ord ; -- third largest
|
||||
|
||||
-- Definite and indefinite noun phrases are sometimes realized as
|
||||
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
|
||||
-- any particular word (Finnish; Swedish definites).
|
||||
|
||||
IndefArt : Quant ; -- a/an
|
||||
DefArt : Quant ; -- the
|
||||
|
||||
-- Nouns can be used without an article as mass nouns. The resource does
|
||||
-- not distinguish mass nouns from other common nouns, which can result
|
||||
-- in semantically odd expressions.
|
||||
|
||||
MassNP : CN -> NP ; -- (beer)
|
||||
|
||||
-- Pronouns have possessive forms. Genitives of other kinds
|
||||
-- of noun phrases are not given here, since they are not possible
|
||||
-- in e.g. Romance languages. They can be found in $Extra$ modules.
|
||||
|
||||
PossPron : Pron -> Quant ; -- my (house)
|
||||
|
||||
-- Other determiners are defined in [Structural Structural.html].
|
||||
|
||||
|
||||
|
||||
--2 Common nouns
|
||||
|
||||
-- Simple nouns can be used as nouns outright.
|
||||
|
||||
UseN : N -> CN ; -- house
|
||||
|
||||
-- Relational nouns take one or two arguments.
|
||||
|
||||
ComplN2 : N2 -> NP -> CN ; -- mother of the king
|
||||
ComplN3 : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
||||
|
||||
-- Relational nouns can also be used without their arguments.
|
||||
-- The semantics is typically derivative of the relational meaning.
|
||||
|
||||
UseN2 : N2 -> CN ; -- mother
|
||||
Use2N3 : N3 -> N2 ; -- distance (from this city)
|
||||
Use3N3 : N3 -> N2 ; -- distance (to Paris)
|
||||
|
||||
-- Nouns can be modified by adjectives, relative clauses, and adverbs
|
||||
-- (the last rule will give rise to many 'PP attachment' ambiguities
|
||||
-- when used in connection with verb phrases).
|
||||
|
||||
|
||||
AdjCN : AP -> CN -> CN ; -- big house
|
||||
RelCN : CN -> RS -> CN ; -- house that John bought
|
||||
AdvCN : CN -> Adv -> CN ; -- house on the hill
|
||||
|
||||
-- Nouns can also be modified by embedded sentences and questions.
|
||||
-- For some nouns this makes little sense, but we leave this for applications
|
||||
-- to decide. Sentential complements are defined in [Verb Verb.html].
|
||||
|
||||
SentCN : CN -> SC -> CN ; -- question where she sleeps
|
||||
|
||||
--2 Apposition
|
||||
|
||||
-- This is certainly overgenerating.
|
||||
|
||||
ApposCN : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||
|
||||
--2 Possessive and partitive constructs
|
||||
|
||||
-- (New 13/3/2013 AR; Structural.possess_Prep and part_Prep should be deprecated in favour of these.)
|
||||
|
||||
PossNP : CN -> NP -> CN ; -- house of Paris, house of mine
|
||||
PartNP : CN -> NP -> CN ; -- glass of wine
|
||||
|
||||
-- This is different from the partitive, as shown by many languages.
|
||||
|
||||
CountNP : Det -> NP -> NP ; -- three of them, some of the boys
|
||||
|
||||
--3 Conjoinable determiners and ones with adjectives
|
||||
|
||||
AdjDAP : DAP -> AP -> DAP ; -- the large (one)
|
||||
DetDAP : Det -> DAP ; -- this (or that)
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
38893
src/rukiga/NounPhrases.txt
Normal file
38893
src/rukiga/NounPhrases.txt
Normal file
File diff suppressed because it is too large
Load Diff
191
src/rukiga/NumeralCgg.gf
Executable file
191
src/rukiga/NumeralCgg.gf
Executable file
@@ -0,0 +1,191 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete NumeralCgg of Numeral = CatCgg [Numeral,Digits] **
|
||||
open ResCgg, Prelude in {
|
||||
|
||||
lincat
|
||||
Digit = { s : Str; unit : { s:Str ; g : Gender; stem : Str}; ten : { s:Str ; g : Gender} };
|
||||
Sub10 = { s : Str; unit : { s:Str ; g : Gender; stem : Str}; ten : { s:Str ; g : Gender}; n:Number};
|
||||
Sub100 = {s : Str ; g:Gender; n : Number} ;
|
||||
Sub1000 = {s : Str ; g:Gender; n : Number} ;
|
||||
Sub1000000 = {s : Str ; g:Gender; n : Number} ;
|
||||
|
||||
|
||||
lin num x = {s = \\_,_=> x.s; g=x.g; n=x.n} ; --Numeral = {s : Res.CardOrd => Res.Agreement => Str ; n : Res.Number} ;
|
||||
lin n2 = mkNum "biri" "ibiri" ZERO_ZERO "abiri" I_MA True;
|
||||
lin n3 = mkNum "shatu" "ishatu" I_ZERO "ashatu" I_MA True;
|
||||
lin n4 = mkNum "na" "ina" I_ZERO "ana" I_MA True;
|
||||
lin n5 = mkNum "taano" "itaano" I_ZERO "ataano" I_MA True;
|
||||
lin n6 = mkNum "kaaga" "mukaaga" MU_MI "nkaaga" N_ZERO False;
|
||||
lin n7 = mkNum "shanju" "mushanju" MU_MI "nshanju" N_ZERO False;
|
||||
lin n8 = mkNum "naana" "munaana" MU_MI "kinaana" KI_ZERO False;
|
||||
lin n9 = mkNum "enda" "mwenda" MU_MI "kyenda" KI_ZERO False;
|
||||
|
||||
|
||||
lin pot01 = {s = [];
|
||||
unit ={s = "emwe"; g = ZERO_ZERO; stem ="mwe"};
|
||||
ten = {s = "ikumi" ; g = I_MA};
|
||||
ordinal = "kabanza";
|
||||
isOrdDifferent = True;
|
||||
n = Sg
|
||||
}; -- 1
|
||||
lin pot0 d = d ** {n = Pl} ; -- Sub10 d * 1
|
||||
lin pot110 = {s = "ikumi" ; g= I_MA; n = Pl}; --10 -Sub100
|
||||
lin pot111 = {s = "ikumi na emwe" ; g = ZERO_ZERO; n = Pl}; --11
|
||||
lin pot1to19 d = {s = "ikumi ne" ++ d.unit.s; g=d.unit.g } ** {n = Pl} ; --12-19
|
||||
lin pot0as1 n = {s = n.unit.s; g=n.unit.g} ** {n = n.n} ; --Sub100 -- coercion of 1..9
|
||||
lin pot1 d = {s = d.ten.s; g = d.ten.g} ** {n = Pl} ;
|
||||
|
||||
lin pot1plus d e = {s = d.ten.s ++ "na" ++ e.unit.s; g = ZERO_ZERO; n=Pl }; --Sub100 ; -- d * 10 + n
|
||||
|
||||
lin pot1as2 n = {s = n.s; g = ZERO_ZERO; n=n.n} ;
|
||||
|
||||
lin pot2 d = let
|
||||
numStr = case d.unit.g of{
|
||||
MU_MI => d.unit.s;
|
||||
_ => d.ten.s
|
||||
};
|
||||
in {s = "magana" ++ numStr; g = ZERO_ZERO} ** {n = Pl} ;
|
||||
|
||||
lin pot2plus d e = let
|
||||
unitFigure = case d.n of{
|
||||
Sg => "igana";
|
||||
_ => "magana"
|
||||
};
|
||||
|
||||
numStr = case d.unit.g of{
|
||||
MU_MI => d.unit.s;
|
||||
_ => d.ten.s
|
||||
};
|
||||
in {s = unitFigure ++ numStr ++ "na" ++ e.s; g = ZERO_ZERO} ** {n = Pl} ; -- Sub10 -> Sub100 -> Sub1000 ; * 100 + n
|
||||
|
||||
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = let
|
||||
unitFigure = case <n.n> of{
|
||||
<Sg> => "rukumi";
|
||||
_ => "enkumi" ++ n.s
|
||||
};
|
||||
in {s = unitFigure; g = ZERO_ZERO; n=n.n}; -- Sub1000 -> Sub1000000 ; -- m * 1000
|
||||
|
||||
lin pot3plus n m = let
|
||||
thousand = case <n.n> of{
|
||||
<Sg> => "akasirira";
|
||||
_ => "obusirira" ++ n.s
|
||||
};
|
||||
in { s = thousand ++ m.s; g = ZERO_ZERO; n = n.n} ;
|
||||
|
||||
|
||||
|
||||
lincat
|
||||
Dig = TDigit ;
|
||||
|
||||
lin
|
||||
IDig d = d ** {tail = T1} ;
|
||||
|
||||
IIDig d i = {
|
||||
s = \\o,agr => d.s ! NCard ! agr ++ commaIf i.tail ++ i.s ! o ! agr ;
|
||||
n = Pl ;
|
||||
tail = inc i.tail
|
||||
} ;
|
||||
|
||||
D_0 = mkDig "0" ;
|
||||
D_1 = mk3Dig "1" "1" Sg ;
|
||||
D_2 = mkDig "2" ;
|
||||
D_3 = mkDig "3" ;
|
||||
D_4 = mkDig "4" ;
|
||||
D_5 = mkDig "5" ;
|
||||
D_6 = mkDig "6" ;
|
||||
D_7 = mkDig "7" ;
|
||||
D_8 = mkDig "8" ;
|
||||
D_9 = mkDig "9" ;
|
||||
|
||||
oper
|
||||
commaIf : DTail -> Str = \t -> case t of {
|
||||
T3 => BIND ++ "," ++ BIND ;
|
||||
_ => BIND
|
||||
} ;
|
||||
|
||||
inc : DTail -> DTail = \t -> case t of {
|
||||
T1 => T2 ;
|
||||
T2 => T3 ;
|
||||
T3 => T1
|
||||
};
|
||||
|
||||
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
|
||||
mkDig : Str -> TDigit = \c -> mk2Dig c c;
|
||||
|
||||
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
||||
s = table {NCard =>\\_=> c ; NOrd => mkOrdinal c } ;
|
||||
n = n
|
||||
} ;
|
||||
|
||||
TDigit = {
|
||||
s : CardOrd =>Agreement => Str;
|
||||
n : Number
|
||||
} ;
|
||||
|
||||
mkOrdinal : Str -> Agreement => Str =\c -> \\agr => mkGenPrepWithIVClitic ! agr ++ c;
|
||||
{-
|
||||
--1 Numerals
|
||||
|
||||
-- This grammar defines numerals from 1 to 999999.
|
||||
-- The implementations are adapted from the
|
||||
-- [numerals library http://www.cs.chalmers.se/~aarne/GF/examples/numerals/]
|
||||
-- which defines numerals for 88 languages.
|
||||
-- The resource grammar implementations add to this inflection (if needed)
|
||||
-- and ordinal numbers.
|
||||
--
|
||||
-- *Note* 1. Number 1 as defined
|
||||
-- in the category $Numeral$ here should not be used in the formation of
|
||||
-- noun phrases, and should therefore be removed. Instead, one should use
|
||||
-- [Structural Structural.html]$.one_Quant$. This makes the grammar simpler
|
||||
-- because we can assume that numbers form plural noun phrases.
|
||||
--
|
||||
-- *Note* 2. The implementations introduce spaces between
|
||||
-- parts of a numeral, which is often incorrect - more work on
|
||||
-- (un)lexing is needed to solve this problem.
|
||||
|
||||
abstract Numeral = Cat [Numeral,Digits] ** {
|
||||
|
||||
cat
|
||||
Digit ; -- 2..9
|
||||
Sub10 ; -- 1..9
|
||||
Sub100 ; -- 1..99
|
||||
Sub1000 ; -- 1..999
|
||||
Sub1000000 ; -- 1..999999
|
||||
|
||||
data
|
||||
num : Sub1000000 -> Numeral ; -- 123456 [coercion to top category]
|
||||
|
||||
n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
|
||||
|
||||
pot01 : Sub10 ; -- 1
|
||||
pot0 : Digit -> Sub10 ; -- d * 1
|
||||
pot110 : Sub100 ; -- 10
|
||||
pot111 : Sub100 ; -- 11
|
||||
pot1to19 : Digit -> Sub100 ; -- 10 + d
|
||||
pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9
|
||||
pot1 : Digit -> Sub100 ; -- d * 10
|
||||
pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
|
||||
pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99
|
||||
pot2 : Sub10 -> Sub1000 ; -- m * 100
|
||||
pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
|
||||
pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
||||
pot3 : Sub1000 -> Sub1000000 ; -- m * 1000
|
||||
pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
||||
|
||||
-- Numerals as sequences of digits have a separate, simpler grammar
|
||||
|
||||
cat
|
||||
Dig ; -- single digit 0..9
|
||||
|
||||
data
|
||||
IDig : Dig -> Digits ; -- 8
|
||||
IIDig : Dig -> Digits -> Digits ; -- 876
|
||||
|
||||
D_0, D_1, D_2, D_3, D_4, D_5, D_6, D_7, D_8, D_9 : Dig ;
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
3
src/rukiga/OverloadCgg.gf
Executable file
3
src/rukiga/OverloadCgg.gf
Executable file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
resource OverloadCgg = Overload with (Grammar = GrammarCgg) ;
|
||||
288
src/rukiga/ParadigmsCgg.gf
Executable file
288
src/rukiga/ParadigmsCgg.gf
Executable file
@@ -0,0 +1,288 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
resource ParadigmsCgg =
|
||||
open (Predef=Predef), ResCgg, CatCgg, Prelude in {
|
||||
|
||||
oper
|
||||
|
||||
mkN : overload {
|
||||
mkN : (fish : Str) -> NClass -> N ;
|
||||
mkN : (man,men : Str) -> NClass -> N ;
|
||||
} ;
|
||||
|
||||
mkV : overload {
|
||||
mkV : (cry : Str) -> V ;
|
||||
mkV : (cry, pres, perf :Str) -> V;
|
||||
} ;
|
||||
|
||||
|
||||
mkN = overload {
|
||||
mkN : (fish : Str) -> Gender -> N
|
||||
= \fish,nclass -> lin N (smartNoun fish nclass) ;
|
||||
mkN : (man,men : Str) -> Gender -> N
|
||||
= \man,men,nclass -> lin N (mkNoun man men nclass) ;
|
||||
};
|
||||
|
||||
mkV = overload {
|
||||
mkV : Str -> Verb
|
||||
= \root -> lin V (smartVerb root); --{s =root; pres =[]; perf = []; morphs= mkVerbMorphs; isRegular = True}; --only those verbs whose conjugation involves change of last letter and are done in the same way in both runyankore and rukiga
|
||||
mkV : Str -> Str ->Str -> Verb
|
||||
= \root, restPres, restPerf ->lin V (mkVerb root restPres restPerf); --{s =root; pres =restPres; perf = restPerf; morphs= mkVerbMorphs; isRegular = False};
|
||||
};
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : Str -> Verb2 = \root ->mkV root ** {comp =[]};
|
||||
mkV2 : Str -> Str ->Str -> Verb2 = \root, s1, s2 ->mkV root s1 s2 ** {comp =[]};
|
||||
};
|
||||
mkV3 = overload {
|
||||
mkV3 : Str -> Verb3 = \root ->mkV2 root ** {comp2 =[]};
|
||||
mkV3 : Str -> Str ->Str -> Verb3 = \root ,s1,s2 ->mkV2 root s1 s2 ** {comp2 =[]};
|
||||
};
|
||||
|
||||
|
||||
--3 Relational nouns
|
||||
|
||||
mkN2 : overload {
|
||||
mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
|
||||
mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
|
||||
mkN2 : N -> Str -> N2 ; -- access to --%
|
||||
mkN2 : N -> Prep -> N2 ; -- e.g. access to
|
||||
mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
|
||||
} ;
|
||||
|
||||
--3 Relational nouns
|
||||
|
||||
mkN2 : overload {
|
||||
mkN2 : Str -> N2; -- reg. noun, prep. "of" --%
|
||||
mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
|
||||
mkN2 : N -> Str -> N2 ; -- access to --%
|
||||
mkN2 : N -> Prep -> N2 ; -- e.g. access to
|
||||
mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
|
||||
} ;
|
||||
|
||||
mkN2 : N -> Prep -> N2 ;
|
||||
mkN2 : N -> Prep -> N2 = \n,p -> case p.isGenPrep of{
|
||||
False => lin N2 (n ** {c2 =\\_=> p.s}) ;
|
||||
True => lin N2 (n ** {c2 = mkGenPrepWithIVClitic}) --avoiding lock_C fields
|
||||
};
|
||||
-- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||
|
||||
mkN3 : N -> Prep -> Prep -> N3 ; -- e.g. connection from x to y
|
||||
mkN3 = \n,p,q -> case <p.isGenPrep,q.isGenPrep> of{
|
||||
<False,False> => lin N3 ( lin N2 (n ** {c2 =\\_=> p.s}) ** {c3 =\\_=> q.s}); --method of avoiding lock_C fields
|
||||
<True, False> => n ** {c2 = mkGenPrepWithIVClitic ; c3 =\\_=> q.s; lock_N2 = <>;lock_N3 = <>} ;
|
||||
<False,True> => n ** {c2 =\\_=> p.s ; c3 = mkGenPrepWithIVClitic; lock_N2 = <>;lock_N3 = <>} ;
|
||||
<True,True> => n ** {c2 = mkGenPrepWithIVClitic; c3 = mkGenPrepWithIVClitic; lock_N2 = <>; lock_N3 = <>}
|
||||
};
|
||||
|
||||
mkVS : V -> VS ; -- sentence-compl e.g. say (that S)
|
||||
mkVS v = lin VS v ;
|
||||
mkVQ : V -> VQ ; -- e.g. wonder (QS)
|
||||
mkVQ v = lin VQ v ;
|
||||
|
||||
mkVA : V -> VA ; -- e.g. become (AP)
|
||||
mkVA v = lin VA v ;
|
||||
|
||||
{-
|
||||
prepV2 v p = lin V2 {s = v.s ; p = v.p ; c2 = p.s ; isRefl = v.isRefl} ;
|
||||
dirV2 v = prepV2 v noPrep ;
|
||||
|
||||
--2 Prepositions
|
||||
--
|
||||
-- A preposition as used for rection in the lexicon, as well as to
|
||||
-- build $PP$s in the resource API, just requires a string.
|
||||
|
||||
mkPrep : Str -> Prep ; -- e.g. "in front of"
|
||||
--mkPost : Str -> Prep ; -- e.g. "ago"
|
||||
noPrep : Prepostion; -- no preposition
|
||||
noPrep = mkPrep [] ;
|
||||
-}
|
||||
{-
|
||||
--V2V verbs
|
||||
mkV2V = overload {
|
||||
mkV2V : Str -> V2V = \s -> lin V2V (dirV2 (regV s) ** {c3 = [] ; typ = VVAux}) ;
|
||||
mkV2V : V -> V2V = \v -> lin V2V (dirV2 v ** {c3 = [] ; typ = VVAux}) ;
|
||||
mkV2V : V -> Prep -> Prep -> V2V = \v,p,t -> lin V2V (prepV2 v p ** {c3 = t.s ; typ = VVAux}) ;
|
||||
} ;
|
||||
|
||||
|
||||
mkV2V : overload {
|
||||
mkV2V : Str -> V2V ;
|
||||
mkV2V : V -> V2V ;
|
||||
mkV2V : V -> Prep -> Prep -> V2V ; -- e.g. want (noPrep NP) (to VP)
|
||||
} ;
|
||||
|
||||
-}
|
||||
--mkV = overload {
|
||||
--mkV : (cry : Str) -> V
|
||||
--= \cry -> lin V (mkVerb cry) ; -- what does it mean to create a lin on the fly
|
||||
--};
|
||||
|
||||
|
||||
{- Note: The following is copied from the file swahili/ParadigmsSwa.gf
|
||||
|
||||
--1 Swahili Lexical Paradigms
|
||||
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Animacy : Type ;
|
||||
|
||||
animate : Animacy ;
|
||||
inanimate : Animacy ;
|
||||
|
||||
-- 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 ;
|
||||
locative : Case ;
|
||||
|
||||
-- To abstract over nounclass names, we define the following.
|
||||
|
||||
Gender : Type ;
|
||||
|
||||
m_wa : Gender ;
|
||||
m_mi : Gender ;
|
||||
ji_ma : Gender ;
|
||||
e_ma : Gender ;
|
||||
ma_ma : Gender ;
|
||||
ki_vi : Gender ;
|
||||
e_e : Gender ;
|
||||
u_u : Gender ;
|
||||
u_ma : Gender ;
|
||||
u_e : Gender ;
|
||||
|
||||
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give all four forms and the semantic gender.
|
||||
|
||||
mkN : (mtu,watu : Str) -> Gender -> Animacy -> N ;
|
||||
|
||||
-- The regular function captures the variants for nouns depending on Gender and Number
|
||||
|
||||
regN : Str -> Gender -> Animacy -> N ;
|
||||
|
||||
-- In practice the worst case is just: give singular and plural nominative.
|
||||
|
||||
|
||||
mk2N : (mtu , watu : Str) -> Gender -> Animacy -> N ;
|
||||
mk2N x y g anim = mkNounIrreg x y g anim ** {lock_N = <>};
|
||||
|
||||
mkN2 : N -> Prep -> N2 ;
|
||||
mkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p.s ; lock_N2 = <>} ;
|
||||
|
||||
mkPrep : Str -> Prep ;
|
||||
-- mkPrep p = {s = p ; c = CPrep PNul ; isDir = False ; lock_Prep = <>} ;
|
||||
mkPrep p = {s = p ; lock_Prep = <>} ;
|
||||
|
||||
|
||||
--3 Relational nouns
|
||||
--
|
||||
-- Relational nouns ("fille de x") need a case and a preposition.
|
||||
|
||||
-- All nouns created by the previous functions are marked as
|
||||
-- $nonhuman$. If you want a $human$ noun, wrap it with the following
|
||||
-- function:
|
||||
|
||||
-- genderN : Gender -> N -> N ;
|
||||
|
||||
-- For regular adjectives, the adverbial form is derived. This holds
|
||||
-- even for cases with the variation "happy - happily".
|
||||
|
||||
regA : Str -> A ;
|
||||
|
||||
-- If comparison is formed by "kuliko", as usual in Swahili,
|
||||
-- the following pattern is used:
|
||||
|
||||
compADeg : A -> A ;
|
||||
|
||||
--2 Definitions of paradigms
|
||||
--
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
|
||||
Animacy = ResSwa.Animacy ;
|
||||
Number = ResSwa.Number ;
|
||||
Case = ResSwa.Case ;
|
||||
Gender = ResSwa.Gender ;
|
||||
animate = AN ;
|
||||
inanimate = IN ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
nominative = Nom ;
|
||||
locative = Loc ;
|
||||
m_wa = g1_2 ;
|
||||
m_mi = g3_4 ;
|
||||
ji_ma = g5_6 ;
|
||||
e_ma = g5a_6 ;
|
||||
ma_ma = g6 ;
|
||||
ki_vi = g7_8 ;
|
||||
e_e = g9_10 ;
|
||||
u_u = g11 ;
|
||||
u_ma = g11_6 ;
|
||||
u_e = g11_10 ;
|
||||
VForm = ResSwa.VForm ;
|
||||
|
||||
-- regN x g anim = mkNomReg x g anim ** {lock_N = <>} ;
|
||||
|
||||
regN = \x,g,anim ->
|
||||
mkNomReg x g anim ** {lock_N = <>} ;
|
||||
|
||||
-- mkN x y g anim = mkNounIrreg x y g anim ** {lock_N = <>} ;
|
||||
mkN = \x,y,g,anim ->
|
||||
mkNounIrreg x y g anim ** {lock_N = <>} ;
|
||||
|
||||
-- Adjectives
|
||||
|
||||
regA a = compADeg {
|
||||
s = \\_ => (mkAdjective a).s ;
|
||||
lock_A = <>} ;
|
||||
|
||||
compADeg a =
|
||||
{
|
||||
s = table {
|
||||
Posit => a.s ! Posit ;
|
||||
_ => \\f => a.s ! Posit ! f ++ "kuliko"
|
||||
} ;
|
||||
lock_A = <>} ;
|
||||
|
||||
-- Verbs
|
||||
regV : Str -> V ;
|
||||
regV = \enda -> mkV enda ** {s1 = [] ; lock_V = <>} ;
|
||||
|
||||
{--
|
||||
mkV2 = overload {
|
||||
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
|
||||
mkV2 : V -> V2 = dirV2 ;
|
||||
mkV2 : V -> Prep -> V2 = mmkV2
|
||||
} ;
|
||||
|
||||
mmkV2 : V -> Prep -> V2 ;
|
||||
mmkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 : V -> V2 = \v -> mmkV2 v "na" ;
|
||||
--}
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected. Most lexical ones have position
|
||||
-- after the verb.
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
115
src/rukiga/PhraseCgg.gf
Executable file
115
src/rukiga/PhraseCgg.gf
Executable file
@@ -0,0 +1,115 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete PhraseCgg of Phrase = CatCgg ** open Prelude, ResCgg in {
|
||||
|
||||
lin
|
||||
|
||||
UttS sent = sent ;
|
||||
UttQS qs = qs ; --: QS -> Utt ;-- does John walk
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
NoPConj = {s = ""} ;
|
||||
NoVoc = {s = ""} ;
|
||||
|
||||
-- Utterances are formed from sentences, questions, and imperatives.
|
||||
UttNP np = {s= np.s!Acc}; --: NP -> Utt ;
|
||||
UttAdv adv = {s = adv.s}; --: Adv -> Utt ; -- in the house
|
||||
UttImpSg pol imp = {s =
|
||||
case pol.p of {
|
||||
Pos => imp.s!ImpPos;
|
||||
Neg => (mkSubjClitic (AgMUBAP2 Sg)) ++ imp.s!ImpNeg
|
||||
}
|
||||
};--: Pol -> Imp -> Utt ; -- (do not) walk ----s
|
||||
--UttImpPl : Pol -> Imp -> Utt ; -- (don't) love yourselves
|
||||
UttImpPl pol imp ={s =
|
||||
case pol.p of {
|
||||
Pos => imp.s!ImpPos;
|
||||
Neg => (mkSubjClitic (AgMUBAP2 Pl)) ++ imp.s!ImpNeg
|
||||
}
|
||||
};
|
||||
UttImpPol = UttImpPl;
|
||||
--UttAdv : Adv -> Utt ; -- here
|
||||
UttAdv adv = {s= adv.s};
|
||||
|
||||
--can be improved upon
|
||||
UttVP vp = {s = vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2 ++ vp.ap };
|
||||
|
||||
UttAP ap = {s=ap.s!(AgP3 Sg KI_BI)};
|
||||
|
||||
-- There are also 'one-word utterances'. A typical use of them is
|
||||
-- as answers to questions.
|
||||
-- *Note*. This list is incomplete. More categories could be covered.
|
||||
-- Moreover, in many languages e.g. noun phrases in different cases
|
||||
-- can be used.
|
||||
|
||||
--UttIP : IP -> Utt ; -- who
|
||||
UttIP ip ={s=ip.s};
|
||||
--UttIAdv : IAdv -> Utt ; -- why
|
||||
UttIAdv iAdv = case iAdv.requiresSubjPrefix of {
|
||||
True => {s= mkSubjClitic (AgP3 Sg MU_BA) ++ iAdv.s};
|
||||
False => {s= iAdv.s}
|
||||
};
|
||||
|
||||
--UttNP : NP -> Utt ; -- this man
|
||||
--UttNP np = {s= np.s!Nom};
|
||||
--UttAdv : Adv -> Utt ; -- here
|
||||
--UttAdv adv ={s = adv.s};
|
||||
--UttVP : VP -> Utt ; -- to sleep
|
||||
--UttCN : CN -> Utt ; -- house
|
||||
UttCN cn ={s=cn.s!Sg!Complete};
|
||||
--UttCard : Card -> Utt ; -- five
|
||||
UttCard card ={s = card.s!(AgP3 Sg MU_BA)};
|
||||
--UttAP : AP -> Utt ; -- fine
|
||||
--UttInterj : Interj -> Utt ; -- alas
|
||||
UttInterj interj = let agr = AgMUBAP2 Pl in {s= mkObjClitic agr ++ interj.s};
|
||||
{-
|
||||
--1 Phrase: Phrases and Utterances
|
||||
|
||||
abstract Phrase = Cat ** {
|
||||
|
||||
-- When a phrase is built from an utterance it can be prefixed
|
||||
-- with a phrasal conjunction (such as "but", "therefore")
|
||||
-- and suffixing with a vocative (typically a noun phrase).
|
||||
|
||||
fun
|
||||
PhrUtt : PConj -> Utt -> Voc -> Phr ; -- but come here, my friend
|
||||
|
||||
-- Utterances are formed from sentences, questions, and imperatives.
|
||||
|
||||
UttS : S -> Utt ; -- John walks
|
||||
UttQS : QS -> Utt ; -- is it good
|
||||
UttImpSg : Pol -> Imp -> Utt ; -- (don't) love yourself
|
||||
UttImpPl : Pol -> Imp -> Utt ; -- (don't) love yourselves
|
||||
UttImpPol : Pol -> Imp -> Utt ; -- (don't) sleep (polite)
|
||||
|
||||
-- There are also 'one-word utterances'. A typical use of them is
|
||||
-- as answers to questions.
|
||||
-- *Note*. This list is incomplete. More categories could be covered.
|
||||
-- Moreover, in many languages e.g. noun phrases in different cases
|
||||
-- can be used.
|
||||
|
||||
UttIP : IP -> Utt ; -- who
|
||||
UttIAdv : IAdv -> Utt ; -- why
|
||||
UttNP : NP -> Utt ; -- this man
|
||||
UttAdv : Adv -> Utt ; -- here
|
||||
UttVP : VP -> Utt ; -- to sleep
|
||||
UttCN : CN -> Utt ; -- house
|
||||
UttCard : Card -> Utt ; -- five
|
||||
UttAP : AP -> Utt ; -- fine
|
||||
UttInterj : Interj -> Utt ; -- alas
|
||||
|
||||
-- The phrasal conjunction is optional. A sentence conjunction
|
||||
-- can also be used to prefix an utterance.
|
||||
|
||||
NoPConj : PConj ; -- [plain phrase without conjunction in front]
|
||||
PConjConj : Conj -> PConj ; -- and
|
||||
|
||||
-- The vocative is optional. Any noun phrase can be made into vocative,
|
||||
-- which may be overgenerating (e.g. "I").
|
||||
|
||||
NoVoc : Voc ; -- [plain phrase without vocative]
|
||||
VocNP : NP -> Voc ; -- my friend
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
260
src/rukiga/QuestionCgg.gf
Executable file
260
src/rukiga/QuestionCgg.gf
Executable file
@@ -0,0 +1,260 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete QuestionCgg of Question = CatCgg ** open ResCgg, Prelude in {
|
||||
--1 Question: Questions and Interrogative Pronouns
|
||||
-- A question can be formed from a clause ('yes-no question') or
|
||||
-- with an interrogative.
|
||||
|
||||
lin
|
||||
--QuestCl : Cl -> QCl ; -- does John walk
|
||||
QuestCl cl = cl ** {posibleSubAgr = mkSubjCliticTable};
|
||||
--QuestVP : IP -> VP -> QCl ; -- who walks
|
||||
|
||||
QuestVP ip vp = {
|
||||
s = ip.s;
|
||||
subjAgr = NONE; -- no option but to just pick one
|
||||
posibleSubAgr = mkSubjCliticTable;
|
||||
root = vp.s;
|
||||
pres = vp.pres;
|
||||
perf = vp.perf;
|
||||
--morphs = vp.morphs;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl = vp.comp -- after verb: complement, adverbs
|
||||
|
||||
} ;
|
||||
|
||||
--QuestSlash : IP -> ClSlash -> QCl ; -- whom does John love
|
||||
QuestSlash ip clSlash =
|
||||
let comp = case clSlash.complType of{
|
||||
Ap => clSlash.ap;
|
||||
Adverbial => clSlash.adv;
|
||||
AdverbialVerb => clSlash.adV;
|
||||
_ => []
|
||||
};
|
||||
in {
|
||||
s = ip.s;
|
||||
subjAgr = NONE; -- no option but to just pick one
|
||||
posibleSubAgr = mkSubjCliticTable;
|
||||
root = clSlash.s;
|
||||
pres = clSlash.pres;
|
||||
perf = clSlash.perf;
|
||||
--morphs = clSlash.morphs;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl = comp -- after verb: complement, adverbs
|
||||
} ;
|
||||
--QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
|
||||
QuestIAdv iadv cl =
|
||||
{
|
||||
s = iadv.s ++ cl.s;
|
||||
subjAgr = cl.subjAgr; -- no option but to just pick one
|
||||
posibleSubAgr = mkSubjCliticTable;
|
||||
root = cl.s;
|
||||
pres = cl.pres;
|
||||
perf = cl.perf;
|
||||
--morphs = cl.morphs;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl = cl.compl -- after verb: complement, adverbs
|
||||
} ;
|
||||
--QuestIComp : IComp -> NP -> QCl ; -- where is John
|
||||
{-
|
||||
This function always uses the auxiliary. When we meet questions that may or may not use it, we shall
|
||||
querry the usesAux field
|
||||
-}
|
||||
QuestIComp icomp np = case <icomp.endOfSentence, icomp.requiresSubjPrefix> of {
|
||||
<True, True> =>{ --such as ta?
|
||||
s = np.s ! Acc;
|
||||
subjAgr = np.agr; -- no option but to just pick one
|
||||
posibleSubAgr = mkSubjCliticTable;
|
||||
root = be_Copula.s;
|
||||
pres = be_Copula.pres;
|
||||
perf = be_Copula.perf;
|
||||
--morphs = be_Copula.morphs;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl = mkSubjCliticTable ! np.agr ++ icomp.s -- after verb: complement, adverbs
|
||||
} ;
|
||||
<True, False> =>{ -- such as nkahe?
|
||||
s = np.s ! Acc;
|
||||
subjAgr = np.agr; -- no option but to just pick one
|
||||
posibleSubAgr = mkSubjCliticTable;
|
||||
root = be_Copula.s;
|
||||
pres = be_Copula.pres;
|
||||
perf = be_Copula.perf;
|
||||
--morphs = be_Copula.morphs;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl = icomp.s -- after verb: complement, adverbs
|
||||
} ;
|
||||
<_, _> => {
|
||||
s = icomp.s;
|
||||
subjAgr = np.agr; -- no option but to just pick one
|
||||
posibleSubAgr = mkSubjCliticTable;
|
||||
root = be_Copula.s;
|
||||
pres = be_Copula.pres;
|
||||
perf = be_Copula.perf;
|
||||
--morphs = be_Copula.morphs;
|
||||
{-
|
||||
inf : Str;
|
||||
pres : Str;
|
||||
past : Str;
|
||||
presPart : Str;
|
||||
pastPart : Str; -- subject
|
||||
--root : Str ; -- dep. on Pol,Temp, e.g. "does","sleep"
|
||||
-}
|
||||
compl = np.s ! Acc -- after verb: complement, adverbs
|
||||
}
|
||||
};
|
||||
|
||||
--IdetCN : IDet -> CN -> IP ; -- which five songs
|
||||
|
||||
IdetCN idet cn = let num = case idet.n of{
|
||||
Sg => ISg;
|
||||
Pl => IPl
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
|
||||
case idet.requiresSubjPrefix of {
|
||||
True => {s = cn.s!idet.n!Complete ++ mkSubjPrefix (mkAgreement cn.gender P3 idet.n) ++ idet.s; n = num; isVerbSuffix=False; requiresIPPrefix=True; aux= "ni"; endOfSentence = True};
|
||||
False => { s = cn.s!idet.n!Complete ++ idet.s; isVerbSuffix=False; n=num; requiresIPPrefix=True; aux= "ni"; endOfSentence = True}
|
||||
};
|
||||
--IdetIP : IDet -> IP ; -- which five
|
||||
--Noun Class has been ignored
|
||||
IdetIP idet = let num = case idet.n of{
|
||||
Sg => ISg;
|
||||
Pl => IPl
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
s = idet.s ;
|
||||
|
||||
isVerbSuffix=False;
|
||||
n=num; requiresIPPrefix=True;
|
||||
aux= "ni";
|
||||
endOfSentence = True
|
||||
};
|
||||
--IdetQuant : IQuant -> Num -> IDet ; -- which (five)
|
||||
--IdetQuant iquant num = { s = iquant.s ! num.n ; requiresSubjPrefix=True};
|
||||
|
||||
-- Interrogative complements to copulas can be both adverbs and
|
||||
-- pronouns.
|
||||
|
||||
--CompIAdv : IAdv -> IComp ; -- where (is it)
|
||||
CompIAdv iadv =
|
||||
{
|
||||
s =iadv.s ;
|
||||
n = INeut;
|
||||
isVerbSuffix=False;
|
||||
requiresSubjPrefix =False;
|
||||
requiresIPPrefix=False;
|
||||
aux=[];
|
||||
usesAux = False;
|
||||
endOfSentence=iadv.endOfSentence
|
||||
};
|
||||
--CompIP : IP -> IComp ; -- who (is it)
|
||||
CompIP ip =
|
||||
{
|
||||
s = ip.s;
|
||||
n = ip.n;
|
||||
isVerbSuffix = ip.isVerbSuffix;
|
||||
requiresSubjPrefix = False;
|
||||
requiresIPPrefix = ip.requiresIPPrefix;
|
||||
aux=ip.aux;
|
||||
usesAux = True;
|
||||
endOfSentence= ip.endOfSentence;
|
||||
|
||||
};
|
||||
{-
|
||||
--1 Question: Questions and Interrogative Pronouns
|
||||
|
||||
abstract Question = Cat ** {
|
||||
|
||||
-- A question can be formed from a clause ('yes-no question') or
|
||||
-- with an interrogative.
|
||||
|
||||
fun
|
||||
QuestCl : Cl -> QCl ; -- does John walk
|
||||
QuestVP : IP -> VP -> QCl ; -- who walks
|
||||
QuestSlash : IP -> ClSlash -> QCl ; -- whom does John love
|
||||
QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
|
||||
QuestIComp : IComp -> NP -> QCl ; -- where is John
|
||||
|
||||
-- Interrogative pronouns can be formed with interrogative
|
||||
-- determiners, with or without a noun.
|
||||
|
||||
IdetCN : IDet -> CN -> IP ; -- which five songs
|
||||
IdetIP : IDet -> IP ; -- which five
|
||||
|
||||
-- They can be modified with adverbs.
|
||||
|
||||
AdvIP : IP -> Adv -> IP ; -- who in Paris
|
||||
|
||||
-- Interrogative quantifiers have number forms and can take number modifiers.
|
||||
|
||||
IdetQuant : IQuant -> Num -> IDet ; -- which (five)
|
||||
|
||||
-- Interrogative adverbs can be formed prepositionally.
|
||||
|
||||
PrepIP : Prep -> IP -> IAdv ; -- with whom
|
||||
|
||||
-- They can be modified with other adverbs.
|
||||
|
||||
AdvIAdv : IAdv -> Adv -> IAdv ; -- where in Paris
|
||||
|
||||
-- Interrogative complements to copulas can be both adverbs and
|
||||
-- pronouns.
|
||||
|
||||
CompIAdv : IAdv -> IComp ; -- where (is it)
|
||||
CompIP : IP -> IComp ; -- who (is it)
|
||||
|
||||
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
||||
|
||||
-- Wh questions with two or more question words require a new, special category.
|
||||
|
||||
cat
|
||||
QVP ; -- buy what where
|
||||
fun
|
||||
ComplSlashIP : VPSlash -> IP -> QVP ; -- buys what
|
||||
AdvQVP : VP -> IAdv -> QVP ; -- lives where
|
||||
AddAdvQVP : QVP -> IAdv -> QVP ; -- buys what where
|
||||
|
||||
QuestQVP : IP -> QVP -> QCl ; -- who buys what where
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
114
src/rukiga/RelativeCgg.gf
Executable file
114
src/rukiga/RelativeCgg.gf
Executable file
@@ -0,0 +1,114 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
concrete RelativeCgg of Relative = CatCgg ** open Prelude, ResCgg in {
|
||||
|
||||
lin
|
||||
{-
|
||||
--IdRP : RP ; -- which
|
||||
|
||||
Apparently IdRP means Identity Relative Pronoun i.e. the most atomic part
|
||||
of a relative pronoun. The abstract syntax seems to alude that more
|
||||
Relative pronouns can be formed when such a relative subject or object marker is affixed to
|
||||
a prepositional Phrase.
|
||||
In Runynakore and Rukiga, relative pronouns depend on
|
||||
Noun Class , Gender and the case of the noun they
|
||||
refer to.
|
||||
|
||||
Since this involves a table of two tables, we use ResCgg to prepare all possibilities
|
||||
|
||||
|
||||
-}
|
||||
|
||||
IdRP = {s = mkRPs; rObjVariant2 = mkRObjV2}; --: RP ; -- which
|
||||
--RelCl : Cl -> RCl ; -- such that John loves her
|
||||
-- The simplest way to form a relative clause is from a clause by
|
||||
-- a pronoun similar to "such that".
|
||||
RelCl cl = {
|
||||
s = "kugira ngu" ++ cl.s ;
|
||||
agr = AgrYes cl.subjAgr;
|
||||
rp = mkRPs;
|
||||
--rObjVariant2 = mkRObjV2;
|
||||
pres =cl.pres;
|
||||
perf =cl.perf;
|
||||
root = cl.root;
|
||||
--morphs = cl.morphs;
|
||||
compl =cl.compl;
|
||||
isCompApStem = False;
|
||||
whichRel = Such_That;
|
||||
}; -- such that John loves her. why does it need any case?
|
||||
|
||||
-- The more proper ways are from a verb phrase
|
||||
-- (formed in [``Verb`` Verb.html]) or a sentence
|
||||
-- with a missing noun phrase (formed in [``Sentence`` Sentence.html]).
|
||||
--RelVP : RP -> VP -> RCl ; -- who loves John
|
||||
|
||||
RelVP rp vp =
|
||||
{
|
||||
s = [];
|
||||
agr = AgrNo;
|
||||
rp = rp.s;
|
||||
--rObjVariant2 = rp.rObjVariant2;
|
||||
pres =vp.pres;
|
||||
perf =vp.perf;
|
||||
root = vp.s;
|
||||
--morphs = vp.morphs;
|
||||
compl =vp.comp;
|
||||
isCompApStem = vp.isCompApStem;
|
||||
whichRel = RF RSubj;
|
||||
};
|
||||
|
||||
--RelSlash : RP -> ClSlash -> RCl ; -- whom John loves
|
||||
RelSlash rp clSlash =
|
||||
let comp = case clSlash.complType of{
|
||||
Ap => clSlash.ap;
|
||||
Adverbial => clSlash.adv;
|
||||
AdverbialVerb => clSlash.adV;
|
||||
_ => []
|
||||
};
|
||||
isCompApStem = case clSlash.complType of{
|
||||
Adverbial => True;
|
||||
_ => False
|
||||
};
|
||||
in
|
||||
{
|
||||
s = clSlash.s;
|
||||
agr = AgrYes clSlash.subjAgr;
|
||||
rp = rp.s;
|
||||
--rObjVariant2 = rp.rObjVariant2;
|
||||
pres = clSlash.pres;
|
||||
perf = clSlash.perf;
|
||||
root = clSlash.root;
|
||||
--morphs = clSlash.morphs;
|
||||
compl = comp;
|
||||
isCompApStem = isCompApStem;
|
||||
whichRel = RF RObj;
|
||||
};
|
||||
|
||||
{-
|
||||
--1 Relative clauses and pronouns
|
||||
|
||||
abstract Relative = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
-- The simplest way to form a relative clause is from a clause by
|
||||
-- a pronoun similar to "such that".
|
||||
|
||||
RelCl : Cl -> RCl ; -- such that John loves her
|
||||
|
||||
-- The more proper ways are from a verb phrase
|
||||
-- (formed in [``Verb`` Verb.html]) or a sentence
|
||||
-- with a missing noun phrase (formed in [``Sentence`` Sentence.html]).
|
||||
|
||||
RelVP : RP -> VP -> RCl ; -- who loves John
|
||||
RelSlash : RP -> ClSlash -> RCl ; -- whom John loves
|
||||
|
||||
-- Relative pronouns are formed from an 'identity element' by prefixing
|
||||
-- or suffixing (depending on language) prepositional phrases or genitives.
|
||||
|
||||
IdRP : RP ; -- which
|
||||
FunRP : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
1431
src/rukiga/ResCgg.gf
Executable file
1431
src/rukiga/ResCgg.gf
Executable file
File diff suppressed because it is too large
Load Diff
910
src/rukiga/ResCggOld.gf
Normal file
910
src/rukiga/ResCggOld.gf
Normal file
@@ -0,0 +1,910 @@
|
||||
--# -path=.:../prelude:../abstract:../common
|
||||
|
||||
-- structure of module types i.e header which defines the type of module and
|
||||
-- tells what other modules it inherits also known as extension(means that a module can inherit the contents
|
||||
-- of one or more modules to which new judgements are added. You can optionally inherit parts of it using
|
||||
-- [comma separeted functions]) followed by ** and optionally an open statement(if the module type is concrete
|
||||
-- or resource i.e open <module name>[namespace identifiers]) and then followed by a mandatory body {}
|
||||
-- opening a resource means you can use its contents without inheriting them (how I do not know)
|
||||
-- module types include:
|
||||
-- 1.abstract modules
|
||||
-- 2.concrete modules
|
||||
-- 3.resource modules: these define parameter types and operations usable in several concrete syntaxes as general functions in lincat definitions
|
||||
-- general structure: <module type> <module name> [of <abstrcat module name if module type is concrete>] = [<extended modules[comma, separted list of objects inherited]>] [**][open <module names[namespace identifiers]> in]{body}
|
||||
resource ResCgg = ParamX ** --
|
||||
open Prelude, (Predef=Predef) in {
|
||||
|
||||
param
|
||||
NounType = Complete | Incomplete ;
|
||||
Position = PostDeterminer | PreDeterminer ;
|
||||
Case = Nom | Acc | Gen ;
|
||||
Agr = AgP3 Number NClass | AgMUBAP1 Number |AgMUBAP2 Number ;
|
||||
|
||||
NClass = MU_BA | -- for human beings and deity e.g. omuntu/abantu
|
||||
KI_BI | -- eki-tookye/ebi-tookye
|
||||
N_N | -- nouns that do not vary their spelling with singular and plural (normally begin with "e")
|
||||
KU_MA | -- okuguru / amaguru, (leave out the non plurals)okugyenda (Deverbative) / Amagyenda (Deverbative outward journey)
|
||||
BU_MA |
|
||||
RU_BU | -- oruro / oburo
|
||||
GU_GA | -- ogushaija / agashaija --dimunitive
|
||||
ZERO_ZERO | -- nouns without initial vowel nor class syllables e.g barugu, muha, sho
|
||||
MU_MI | --
|
||||
RI_MA |
|
||||
I_MA |
|
||||
KA_BU |
|
||||
KA_TU | --dimunitive version of KA_BU belong to same noun class
|
||||
RU_N | -- orurimi / endimi
|
||||
RU_MA |
|
||||
--those of place or location
|
||||
HA |
|
||||
MU |
|
||||
KU |
|
||||
--aditions
|
||||
ZERO_BU |
|
||||
ZERO_BI |
|
||||
ZERO_MA | -- amate takes the concords of plural particle "ma"
|
||||
ZERO_MI |
|
||||
ZERO_TU |
|
||||
ZERO_N |
|
||||
I_ZERO |
|
||||
RI_ZERO |
|
||||
KU_ZERO |
|
||||
MU_ZERO |
|
||||
RU_ZERO |
|
||||
ZERO_BAA | -- human relationships
|
||||
KA_ZERO ; --akabi (ZERO to the right means the concords of that noun are always those of the singular as used in noun-classes KA) see KA_BU, KA_TU
|
||||
|
||||
|
||||
PersonalPronounType = SubjM | Obj | RelSubj | RelObj |
|
||||
AdjPron2 | -- aAdjectival Prefixes with initial vowel with the semantics of "the" e.g. -- omuntu o-mu-rungi
|
||||
AdjPron | -- without initial vowel i.e. -- omuntu mu-rungi
|
||||
--GenPron | -- different types of pronouns
|
||||
GenPrep1 |
|
||||
GenPrep2 |
|
||||
GenAdj |
|
||||
SStandPron ; --Self-standing pronouns
|
||||
oper
|
||||
|
||||
Noun : Type ;
|
||||
Noun = {s : NounType=>Number => Str ; nc : NClass } ;
|
||||
|
||||
smartNoun : Str -> NClass -> Noun
|
||||
= \omuntu, g ->
|
||||
case <omuntu , g> of {
|
||||
-- Handling the Tone System is also another problem.
|
||||
|
||||
< "o" + "mu" + stem, MU_BA > => mkNoun omuntu ("aba" + stem) g ;
|
||||
--special cases like omwana, omwishiki, omwojo
|
||||
|
||||
< "o" + "mw" + stem, MU_BA > => mkNoun omuntu (combine_morphemes "aba" stem) g ; --same as mu_ba but the "u" + "a" of the stem to form mwa
|
||||
< "o" + "mu" + stem, MU_MI > => mkNoun omuntu (combine_morphemes "emi" stem) g ;
|
||||
< "o" + "ru" + stem, RU_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
|
||||
< "o" + "ru" + stem, RU_N > => mkNoun omuntu (combine_morphemes "en" stem) g ; --desist from providing a singlar only but give both
|
||||
< "o" + "bu" + stem, BU_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
|
||||
< "o" + "gu" + stem, GU_GA > => mkNoun omuntu (combine_morphemes "aga" stem) g ;
|
||||
< "o" + ("ku" | "kw") + stem, KU_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
|
||||
< "o" + "kw" + stem, KU_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ;
|
||||
< "o" + "ku" + stem, KU_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "o" + "mu" + stem, MU_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "o" + "mu" + stem, MU_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "o" + "ru" + stem, RU_BU > => mkNoun omuntu (combine_morphemes "obu" stem) g ;
|
||||
< "o" + "ru" + stem, RU_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
|
||||
< "a" + "ha" + stem, HA_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "a" + "ka" + stem, KA_BU > => mkNoun omuntu (combine_morphemes "obu" stem) g ;
|
||||
< "a" + "ka" + stem, KA_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
|
||||
< "e" + "ki" + stem, KI_BI > => mkNoun omuntu (combine_morphemes "ebi" stem) g ;
|
||||
< "e" + "ki" + stem, KI_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "e" + "i" + stem, I_MA > => mkNoun omuntu (combine_morphemes "ama" "") g ;
|
||||
< "e" + "i" + stem, I_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "e" + "ri" + stem, RI_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
|
||||
< "e" + "ri" + stem, RI_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
|
||||
< "e" + "ry" + stem, I_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
|
||||
-- --special cases shall be added with due course as errors are identified
|
||||
<"e" + "ky" + stem, KI_BI> => mkNoun omuntu (combine_morphemes "ebi" stem) g ;
|
||||
< _ ,N_N | ZERO_MA > => mkNoun omuntu omuntu g ;
|
||||
--< _ ,ZERO_MA > => mkNoun omuntu ("ama" + stem) g (Predef.drop 1 omuntu);
|
||||
--< _ ,> => mkNoun omuntu omuntu g (Predef.drop 1 omuntu);
|
||||
<_ , ZERO_BAA> => mkNoun omuntu ("baa" + omuntu) g;
|
||||
< _ ,ZERO_ZERO > => mkNoun omuntu omuntu g;
|
||||
< _ ,_ > => mkNoun omuntu omuntu g -- improve as we go on.
|
||||
};
|
||||
|
||||
{- Should be taken to Ajective concrete Syntanx-}
|
||||
mkNoun : Str -> Str -> NClass -> Noun ;
|
||||
mkNoun child children nc
|
||||
= { s = table {Complete => table {
|
||||
Sg => child ; Pl => children } ;
|
||||
Incomplete => table {
|
||||
Sg => Predef.drop 1 child ; Pl => Predef.drop 1 children } }; --removal of the initial vowel
|
||||
nc = nc
|
||||
} ;
|
||||
mkN = overload {
|
||||
mkN : Str -> NClass -> Noun = smartNoun ;
|
||||
mkN : Str -> Str -> NClass -> Noun = mkNoun;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
-- combine_morphemes need the function last to get
|
||||
-- the last letter in a morphme.
|
||||
-- uses Predef.length and Predef.take
|
||||
-- Please use let so that you compute Predef.length once and use if then else
|
||||
-- if possible
|
||||
{-
|
||||
last : Str -> Str ;
|
||||
last = \ w ->
|
||||
case (Predef.length w) of {
|
||||
0 => [];
|
||||
_ => Predef.drop ((Predef.length w)-1) w
|
||||
} ;
|
||||
|
||||
-}
|
||||
{-
|
||||
This function tries to handle phonological-conditioning.
|
||||
|
||||
Usage: Use it whenever you are trying to combine morphemes especially in:
|
||||
1. Pronouns
|
||||
2. Verbs and verb Phrases.
|
||||
3. Noun Phrases
|
||||
3. Adjectival Phrases e.t.c
|
||||
|
||||
Given two morphemes A and B to combine,
|
||||
1. compare the last letter of the first morpheme A with the first letter of the second morpheme B
|
||||
2. Use parttern matching to obtain the right letters for the comnined word
|
||||
|
||||
Source of rules:
|
||||
1. personal experience
|
||||
2. Morris and Kirwan Runynakore Grammar
|
||||
3. but we shall add more as we meet them during debugging
|
||||
-}
|
||||
combine_morphemes : Str -> Str -> Str ;
|
||||
combine_morphemes = \ f, s ->
|
||||
case <(Predef.dp 1 f), (Predef.take 1 s)> of {
|
||||
<"n" , "r"> => f + "d" + (Predef.drop 1 s) ;
|
||||
<"u" , "a" | "e" | "o" | "i"> => Predef.tk 1 f + "w" + s ;
|
||||
<"i" , "a" | "e" | "o"> => Predef.tk 1 f + "y" + s ;
|
||||
<"n" , "b" | "p"> => Predef.tk 1 f + "m" + s ;
|
||||
<"n" , "m"> => Predef.tk 1 f + s ; -- However, note that for pronouns, the n changes to m
|
||||
<"n" , "h"> => Predef.tk 1 f + "mp" + Predef.drop 1 s ;
|
||||
<"i", "i"> => f + Predef.drop 1 s ;
|
||||
<_ , _ > => f + s
|
||||
} ;
|
||||
Determiner : Type = {s : Str ; ntype : NounType ; num : Number ; pos : Position } ; -- type for Determier necessary for catCgg.gf
|
||||
|
||||
Pronoun : Type ={s : Str ; agr : Agr} ;
|
||||
|
||||
VerbPhrase : Type = { s : Agr => Polarity => Tense => Anteriority => Str};
|
||||
|
||||
VPSlash : Type = VerbPhrase ** { c : Str } ;
|
||||
|
||||
Numer : Type = { s: Str ; n : Number};
|
||||
|
||||
Clause : Type = {s : Polarity => Tense => Anteriority => Str};
|
||||
|
||||
Adv : Type = {s : Agr => Str } ; -- check pages 116-131 of grammar book
|
||||
mkAdv : Str -> Adv = \ s -> { s= \\ agr => s };
|
||||
|
||||
ParticleForms : Type = PersonalPronounType => Agr => Str;
|
||||
mkNCParticles : ParticleForms = table {
|
||||
SubjM => table {
|
||||
AgMUBAP1 Sg => "n" ;
|
||||
AgMUBAP1 Pl => "tu" ;
|
||||
AgMUBAP2 Sg => "wa" ;
|
||||
AgMUBAP2 Pl => "mu" ;
|
||||
AgP3 Sg MU_BA => "a" ;
|
||||
AgP3 Pl MU_BA => "ba" ;
|
||||
AgP3 Sg KI_BI => "ki" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "bi" ;
|
||||
AgP3 Sg (RU_N | RU_MA | RU_ZERO | RU_BU) => "ru" ;
|
||||
AgP3 Pl RU_N => "zi"; --| "i";
|
||||
AgP3 Sg N_N => "e";
|
||||
AgP3 Pl N_N => "zi"; --| "i";
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "gu" ;
|
||||
AgP3 Pl MU_MI => "e" ;
|
||||
AgP3 Sg (RI_MA | RI_ZERO | I_ZERO) => "ri";
|
||||
AgP3 Pl (RI_MA | BU_MA | KU_MA | ZERO_MA | I_MA |RU_MA) => "ga" ;
|
||||
AgP3 Sg (KA_BU | KA_ZERO | KA_TU) => "ka" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) => "bu" ;
|
||||
AgP3 Sg ZERO_BU => "bu" ;
|
||||
AgP3 Pl ZERO_BU => "bu" ;
|
||||
AgP3 Sg ZERO_BI => "bi" ;
|
||||
AgP3 Sg ZERO_MA => "ga" ;
|
||||
AgP3 Pl RI_ZERO => "ga" ;
|
||||
AgP3 Sg KU_ZERO => "ku" ;
|
||||
AgP3 Pl KU_ZERO => "ku" ;
|
||||
AgP3 Pl MU_ZERO => "gu" ;
|
||||
AgP3 Pl RU_ZERO => "ru" ;
|
||||
AgP3 Sg ZERO_TU => "tu" ;
|
||||
AgP3 Pl ZERO_TU => "tu" ;
|
||||
AgP3 Sg (ZERO_MI | ZERO_ZERO) => "" ;
|
||||
AgP3 Pl ZERO_MI => "e" ;
|
||||
AgP3 Pl KA_ZERO => "" ;
|
||||
_ => "XX" --for checking if there is some class unaccounted for
|
||||
};
|
||||
{-Object particle may be used as
|
||||
1. a prefix: e.g mu-kwate = catch him,
|
||||
2. an infix: o-mu-kwate = you catch him
|
||||
|
||||
-}
|
||||
Obj => table {
|
||||
AgMUBAP1 Sg => "n" ;
|
||||
AgMUBAP1 Pl => "tu" ;
|
||||
AgMUBAP2 Sg => "ku" ;
|
||||
AgMUBAP2 Pl => "ba" ;
|
||||
AgP3 Sg MU_BA => "mu" ;
|
||||
AgP3 Pl MU_BA => "ba";
|
||||
AgP3 Pl (ZERO_BU | KA_BU | KA_TU | RU_BU) => "bu" ;
|
||||
AgP3 Sg BU_MA => "bu" ;
|
||||
AgP3 Sg KI_BI => "ki" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "bi";
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "ga" ;
|
||||
AgP3 (Sg | Pl) HA => "ha";
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) => "ri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU | KA_TU) => "ka" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "ku" ;
|
||||
{-
|
||||
#comment for the following two lines
|
||||
the follwing partciles are all used by Noun Classes of Place i.e. HA, KU and MU
|
||||
We take the particle to be "ha" for all of them although noun class KU can use
|
||||
another particle "gi" -- see Table of Concords in Appendix of Dictionary by Mpairwe and Kahangi
|
||||
|
||||
Note: The particles do not change with respect to gender
|
||||
|
||||
TODO: obtain clear examples of usage
|
||||
-}
|
||||
AgP3 (Sg | Pl) (HA | MU) => "ha" ;
|
||||
AgP3 (Sg | Pl) KU => "ha" ; -- gi is also possible -- see comment above
|
||||
|
||||
AgP3 Sg (RU_N | RU_ZERO | RU_BU | RU_MA) => "ru" ;
|
||||
AgP3 Pl (KA_TU | ZERO_TU) => "tu" ;
|
||||
|
||||
AgP3 Sg (N_N | ZERO_ZERO) => "gi" ;
|
||||
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "gu" ;
|
||||
AgP3 Pl GU_GA => "ga" ;
|
||||
AgP3 Pl (MU_MI | ZERO_MI) => "gi" ;
|
||||
{-
|
||||
According to Mpaiwe & Kahangi in their table of concords, the particle for the plural
|
||||
of noun classes N_N , ZERO_ZERO , ZERO_N & RU_N can be either "i" or "zi" depending
|
||||
on object they refer to.
|
||||
|
||||
Problem:
|
||||
However, we cannot use the | operator in strings as GF will
|
||||
fail to compile to comletion.
|
||||
Implication:
|
||||
Some of our output strings will have the wrong object particle attached.
|
||||
Even if the operator | worked, we would generate two versions of the linearized
|
||||
string of which one would be right and the other wrong
|
||||
What is the solution to this?
|
||||
-}
|
||||
AgP3 Pl (N_N | ZERO_ZERO | ZERO_N | RU_N) => "zi" ; --some cases require use of particle "i"
|
||||
|
||||
_ => "-" -- Hopefully exhausted all forms
|
||||
};
|
||||
-- who, which
|
||||
RelSubj => table {
|
||||
AgMUBAP1 Sg => "o" ;
|
||||
AgMUBAP1 Pl => "aba" ;
|
||||
AgMUBAP2 Sg => "o" ;
|
||||
AgMUBAP2 Pl => "aba" ;
|
||||
AgP3 Sg MU_BA => "o" ;
|
||||
AgP3 Pl MU_BA => "aba" ;
|
||||
AgP3 Sg BU_MA => "obu" ;
|
||||
AgP3 Pl (ZERO_BU | KA_BU | RU_BU) =>"obu" ;
|
||||
AgP3 Sg KI_BI => "eki" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "ebi" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "aga" ;
|
||||
AgP3 (Sg | Pl) (HA | MU) => "ha" ; -- better AgP3 _ (HA | MU) => "ha";
|
||||
AgP3 (Sg | Pl) KU => "e" ;
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_ZERO | RI_MA) => "eri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) => "aka" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "oku" ;
|
||||
AgP3 Sg (RU_N | RU_ZERO | RU_BU | RU_MA) => "oru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) => "otu" ;
|
||||
AgP3 Pl RU_N => "ezi" ;
|
||||
AgP3 Sg N_N => "ei" ;
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | RU_N | N_N) => "ezi" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO | GU_GA) => "ogu" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N ) => "e" ;
|
||||
AgP3 Pl (MU_MI | ZERO_MI) => "e" ;
|
||||
AgP3 Pl GU_GA => "aga" ;
|
||||
_ => "=" -- means something forgoten i.e. debugging purposes
|
||||
};
|
||||
|
||||
--Relative Object paticle such as whom/which found in row 13 of Table of concords in Mpairwe & Kahangi
|
||||
RelObj => table {
|
||||
AgMUBAP1 Sg => "ou" ;
|
||||
AgMUBAP1 Pl => "abi" ; -- use of "abu" is also allowed (depending on what?) but omitted because of compiler issues with | operator
|
||||
AgMUBAP2 Sg => "ou" ;
|
||||
AgMUBAP2 Pl => "abi" ; -- use of "abu" is also allowed (depending on what?) but omitted because of compiler issues with | operator
|
||||
AgP3 Sg MU_BA => "ou" ;
|
||||
AgP3 Pl MU_BA => "abi" ; -- use of "abu" is also allowed (depending on what?) but omitted because of compiler issues with | operator
|
||||
AgP3 Sg BU_MA => "obu" ;
|
||||
AgP3 Pl (ZERO_BU | KA_BU |RU_BU) => "obu" ;
|
||||
AgP3 Sg KI_BI => "eki" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "ebi" ;
|
||||
|
||||
{-
|
||||
The noun classes ZERO_MA,KU_MA,RI_MA,I_MA & BU_MA can use of Relative object particles
|
||||
"agi" or "agu" (depending on noun class of clause -sure? (depending on what?)) but we
|
||||
choose one "agi" because of compiler issues with | operator
|
||||
|
||||
Qn: Any Solutions
|
||||
-}
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "agi" ;
|
||||
|
||||
-- of place HA & MU
|
||||
--both ahi and "ahu" are valid particles for noun classes HA and MU but "ahu" omitted
|
||||
--because of compiler issues with | operator
|
||||
AgP3 (Sg | Pl) (HA | MU) => "ahi" ; -- better AgP3 _ (HA | MU) => "ha";
|
||||
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"eri" ;
|
||||
-- of place KU
|
||||
AgP3 (Sg | Pl) KU => "ei" ;
|
||||
|
||||
--both aki and "aku" are valid particles for noun classes KA_ZERO & KA_BU but "aku" omitted
|
||||
--because of compiler issues with | operator
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"aki" ;
|
||||
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "oku" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "oru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"otu" ;
|
||||
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "ezi" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"ei" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO | GU_GA) => "ogu" ;
|
||||
AgP3 Pl (MU_MI | ZERO_MI) => "ei" ;
|
||||
|
||||
--both agi and "agu" are valid particles for noun classes GU_GA in plural but "agu" omitted
|
||||
--because of compiler issues with | operator
|
||||
AgP3 Pl GU_GA => "agi" ;
|
||||
_ => "=" -- means something forgoten i.e. debugging purposes
|
||||
};
|
||||
|
||||
-- Adjectival Prefixes with initial vowel with the semantics of the
|
||||
AdjPron2 => table {
|
||||
AgMUBAP1 Sg => "omu" ;
|
||||
AgMUBAP1 Pl => "aba" ;
|
||||
AgMUBAP2 Sg => "omu" ;
|
||||
AgMUBAP2 Pl => "aba" ;
|
||||
AgP3 Sg MU_BA => "omu" ;
|
||||
AgP3 Pl MU_BA => "aba" ;
|
||||
AgP3 Pl ZERO_BU => "obu" ;
|
||||
AgP3 Sg BU_MA => "obu" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) =>"obu" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "ebi" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "ama";
|
||||
AgP3 (Sg | Pl) (HA | MU) => "aha" ; -- of place HA & MU
|
||||
AgP3 (Sg | Pl) KU => "en" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"eri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"aka" ;
|
||||
AgP3 Sg KI_BI => "eki" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "oku" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "omu" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "oru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"otu" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"en" ;
|
||||
AgP3 Pl ZERO_MI => "en" ;
|
||||
AgP3 Pl MU_MI => "emi";
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "en" ;
|
||||
AgP3 Sg GU_GA => "ogu" ;
|
||||
AgP3 Pl GU_GA => "aga" ;
|
||||
_ => "XXX" -- error checking for any case not catered for
|
||||
};
|
||||
|
||||
-- Adjectival Prefixes without initial vowel
|
||||
AdjPron => table {
|
||||
AgMUBAP1 Sg => "mu" ;
|
||||
AgMUBAP1 Pl => "ba" ;
|
||||
AgMUBAP2 Sg => "mu" ;
|
||||
AgMUBAP2 Pl => "ba" ;
|
||||
AgP3 Sg MU_BA => "mu" ;
|
||||
AgP3 Pl MU_BA => "ba" ;
|
||||
AgP3 Pl ZERO_BU => "bu";
|
||||
AgP3 Sg BU_MA => "bu" ;
|
||||
|
||||
AgP3 Pl (KA_BU | RU_BU) =>"bu" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "bi" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "ma" ;
|
||||
|
||||
|
||||
AgP3 (Sg | Pl) (HA | MU) => "ha" ; -- of place HA & MU
|
||||
AgP3 (Sg | Pl) KU => "n" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"ri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"ka" ;
|
||||
AgP3 Sg KI_BI => "ki" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "ku" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "omu";
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "ru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"tu" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"n" ;
|
||||
AgP3 Pl ZERO_MI => "n" ;
|
||||
AgP3 Pl MU_MI => "emi" ;
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "n" ;
|
||||
AgP3 Sg GU_GA => "ogu" ;
|
||||
AgP3 Pl GU_GA => "aga" ;
|
||||
_ => "XXX" -- for debugging purposes
|
||||
} ;
|
||||
--Genetive Preposition: exclusively of (with initial vowel)
|
||||
GenPrep1 => table {
|
||||
AgMUBAP1 Sg => "owa" ;
|
||||
AgMUBAP1 Pl => "aba" ;
|
||||
AgMUBAP2 Sg => "owa" ;
|
||||
AgMUBAP2 Pl => "aba" ;
|
||||
AgP3 Sg MU_BA => "owa" ;
|
||||
AgP3 Pl MU_BA => "aba" ;
|
||||
AgP3 Pl ZERO_BU => "obwa" ;
|
||||
AgP3 Sg BU_MA => "obwa" ;
|
||||
|
||||
AgP3 Pl (KA_BU | RU_BU) =>"obwa" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "ebya" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "aga" ;
|
||||
|
||||
|
||||
AgP3 (Sg | Pl) HA => "aha" ; -- of place HA
|
||||
AgP3 (Sg | Pl) MU => "omwa" ; -- of place MU
|
||||
AgP3 (Sg | Pl) KU => "eya" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"erya" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"aka" ;
|
||||
AgP3 Sg KI_BI => "ekya" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "okwa" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "ogwa" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "orwa" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"otwa" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"eya" ;
|
||||
AgP3 Pl ZERO_MI => "eya" ;
|
||||
AgP3 Pl MU_MI => "eya" ;
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "eza" ;
|
||||
AgP3 Sg GU_GA => "ogwa" ;
|
||||
AgP3 Pl GU_GA => "aga" ;
|
||||
_ => "XYY" -- for debugging purposes
|
||||
};
|
||||
--Genetive Preposition: simply of without initial vowel
|
||||
GenPrep2 => table {
|
||||
AgMUBAP1 Sg => "wa" ;
|
||||
AgMUBAP1 Pl => "ba" ;
|
||||
AgMUBAP2 Sg => "wa" ;
|
||||
AgMUBAP2 Pl => "ba" ;
|
||||
AgP3 Sg MU_BA => "wa" ;
|
||||
AgP3 Pl MU_BA => "ba" ;
|
||||
AgP3 Pl ZERO_BU => "bwa" ;
|
||||
AgP3 Sg BU_MA => "bwa" ;
|
||||
|
||||
AgP3 Pl (KA_BU | RU_BU) =>"bwa" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "bya" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "ga" ;
|
||||
|
||||
|
||||
AgP3 (Sg | Pl) HA => "ha" ; -- of place HA
|
||||
AgP3 (Sg | Pl) MU => "mwa" ; -- of place MU
|
||||
AgP3 (Sg | Pl) KU => "ya" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"rya" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"ka" ;
|
||||
AgP3 Sg KI_BI => "kya" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "kwa" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "gwa" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "rwa";
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"twa" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"ya" ;
|
||||
AgP3 Pl ZERO_MI => "ya" ;
|
||||
AgP3 Pl MU_MI => "ya" ;
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "za" ;
|
||||
AgP3 Sg GU_GA => "gwa" ;
|
||||
AgP3 Pl GU_GA => "ga" ;
|
||||
_ => "XYY" -- for debugging purposes
|
||||
};
|
||||
-- Genetive Adjective suffixes used to form genetive adjectives when conjugated to
|
||||
-- the genetive prepositions particles
|
||||
-- examples: ekya-{ngye}= my own or mine, ekya-{itu}= our own or ours,
|
||||
-- ekya-{we}-your own or yours
|
||||
GenAdj => table {
|
||||
AgMUBAP1 Sg => "ngye" ;
|
||||
AgMUBAP1 Pl => "itu" ;
|
||||
AgMUBAP2 Sg => "we" ;
|
||||
AgMUBAP2 Pl => "nyu" ;
|
||||
AgP3 Sg MU_BA => "e" ;
|
||||
AgP3 Pl MU_BA => "bo" ;
|
||||
AgP3 Pl ZERO_BU => "bwo" ;
|
||||
AgP3 Sg BU_MA => "bwo" ;
|
||||
|
||||
AgP3 Pl (KA_BU | RU_BU) =>"bwo" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "byo" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "go" ;
|
||||
|
||||
|
||||
AgP3 (Sg | Pl) HA => "ho" ; -- of place HA
|
||||
AgP3 (Sg | Pl) MU => "mwo" ; -- of place MU
|
||||
AgP3 (Sg | Pl) KU => "yo" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"ryo" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"ko" ;
|
||||
AgP3 Sg KI_BI => "kyo" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "kwo" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "gwo" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "rwo" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"two" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"two" ;
|
||||
AgP3 Pl ZERO_MI => "yo" ;
|
||||
AgP3 Pl MU_MI => "yo" ;
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "zo" ;
|
||||
AgP3 Sg GU_GA => "gwo" ;
|
||||
AgP3 Pl GU_GA => "go" ;
|
||||
_ => "XXYY" -- for debugging purposes
|
||||
} ;
|
||||
SStandPron => table {
|
||||
AgMUBAP1 Sg =>"nyowe" ;
|
||||
AgMUBAP1 Pl =>"itwe" ;
|
||||
AgMUBAP2 Sg =>"iwe" ;
|
||||
AgMUBAP2 Pl =>"imwe" ;
|
||||
AgP3 Sg MU_BA => "uwe" ;
|
||||
AgP3 Pl MU_BA => "bo" ;
|
||||
AgP3 Pl ZERO_BU => "bwo" ;
|
||||
AgP3 Sg BU_MA => "bwo" ;
|
||||
|
||||
AgP3 Pl (KA_BU | RU_BU) =>"bwo" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => "byo" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "go" ;
|
||||
|
||||
|
||||
AgP3 (Sg | Pl) HA => "ho" ; -- of place HA
|
||||
AgP3 (Sg | Pl) MU => "mwo" ; -- of place MU
|
||||
AgP3 (Sg | Pl) KU => "yo" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>"ryo" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>"ko" ;
|
||||
AgP3 Sg KI_BI => "kyo";
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => "kwo" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => "gwo";
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "rwo" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>"two" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>"two" ;
|
||||
AgP3 Pl ZERO_MI => "yo" ;
|
||||
AgP3 Pl MU_MI => "yo" ;
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "zo" ;
|
||||
AgP3 Sg GU_GA => "gwo" ;
|
||||
AgP3 Pl GU_GA => "go" ;
|
||||
_ => "XXYY" -- for debugging purposes
|
||||
}
|
||||
} ;
|
||||
|
||||
{-
|
||||
Operation to create Noun Phrases from a Determiner and Nouns.
|
||||
In Runyankore and Rukiga, depending on the particular Determiner,
|
||||
it can appear before (we call PreDeterminer) or after (PostDeterminer) the noun.
|
||||
Examples:
|
||||
A. PreDeterminers
|
||||
1. Definite aricles: Usually using the initial vowel sufficient
|
||||
2. Demonstratives: ogu muntu (This person)
|
||||
3. Every: every man = "buri muntu"
|
||||
B. PostDeterminers
|
||||
1. Definite aricles: Usually using the initial vowel sufficient
|
||||
2. Demonstratives: omuntu ogu (person this)
|
||||
3. few: omuntu mu-kye
|
||||
|
||||
-}
|
||||
NounPhrase = { s : Str ; agr : Agr } ;
|
||||
{-This function should be renamed to mkDetCN-}
|
||||
mkDeterminer: Determiner -> Noun -> NounPhrase = \ det, cn ->
|
||||
case det.pos of {
|
||||
PreDeterminer => { s = det.s ++ cn.s ! det.ntype ! det.num; agr = AgP3 det.num cn.nc} ;
|
||||
PostDeterminer => { s = cn.s!det.ntype!det.num ++ mkNCParticles!SubjM!AgP3 det.num cn.nc ++ det.s; agr = AgP3 det.num cn.nc} -- There is a mistake here. If the determiner is empty, we end up with a meaningless subject particle standing alone. we can test if det.s is a string or empty.
|
||||
|
||||
|
||||
};
|
||||
|
||||
{-
|
||||
Operation to create scenarios in which the PRIMARY NEGATIVE MARKER
|
||||
for the verb is used. The presence of this marker negates the semantics of the verb.
|
||||
It is used in the PAST, Simultaneous and all other tenses.
|
||||
NOTE: The Primary and Secondary markers are in complementary distribution
|
||||
|
||||
TO DO: Improve this!!!
|
||||
-}
|
||||
mkPol1Marker : Polarity => Tense => Anteriority => Str = table {
|
||||
Neg => table {
|
||||
Past => table {
|
||||
Anter => "" ;
|
||||
Simul => "ti"
|
||||
} ;
|
||||
_ => table {
|
||||
_ => "ti"
|
||||
}
|
||||
} ;
|
||||
Pos => \\_ => \\_ => ""
|
||||
};
|
||||
|
||||
|
||||
{-
|
||||
Operation to create scenarios in which the SECONDARY NEGATIVE MARKER
|
||||
for the verb is used. The presence of this marker negates the semantics of the verb.
|
||||
It is used in the PAST, Anterior only.
|
||||
NOTE: The Primary and Secondary markers are in complementary distribution
|
||||
-}
|
||||
mkPol2Marker : Polarity => Tense => Anteriority => Str = table{
|
||||
Neg => table {
|
||||
Past => table {
|
||||
Anter => "ta";
|
||||
Simul => ""
|
||||
};
|
||||
_ => table{
|
||||
_ => ""
|
||||
}
|
||||
};
|
||||
Pos => \\_=>\\_=> ""
|
||||
} ;
|
||||
|
||||
|
||||
{-
|
||||
TO DO: stop here
|
||||
-}
|
||||
mkTenseMarker1 : Tense => Anteriority => Str = table{
|
||||
Past => table{
|
||||
Anter =>"baire";
|
||||
Simul =>""
|
||||
};
|
||||
Pres => table{
|
||||
_ =>""
|
||||
};
|
||||
Fut => table{
|
||||
Anter => "ijakubá";-- | "zakubá";
|
||||
Simul =>"ijaku"-- | "kuzaku" | "raa"
|
||||
};
|
||||
Cond => table{
|
||||
_ => "kaa"
|
||||
}
|
||||
};
|
||||
|
||||
mkTenseMarker2:Tense=>Anteriority=>Str = table{
|
||||
Past => table{
|
||||
Anter =>"ire";
|
||||
Simul =>"ire"
|
||||
};
|
||||
Pres => table{
|
||||
Anter =>"ire";
|
||||
Simul =>""
|
||||
};
|
||||
Fut => table{
|
||||
Anter => "ire";
|
||||
Simul =>""
|
||||
};
|
||||
Cond => table{
|
||||
Anter => "ire";
|
||||
Simul =>""
|
||||
}
|
||||
};
|
||||
|
||||
mkAuxTenseMarker: Tense =>Anteriority=>Str =table {
|
||||
Past => table {
|
||||
Anter =>"kaba" ;
|
||||
Simul =>"baire"
|
||||
};
|
||||
Pres => table {
|
||||
Anter =>"baire" ;
|
||||
Simul =>[]
|
||||
};
|
||||
Fut => table {
|
||||
Anter => "ryaba" ;
|
||||
Simul =>"ryaba"
|
||||
};
|
||||
Cond => table {
|
||||
Anter => "XX" ;
|
||||
Simul =>"XX"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Verb : Type ;
|
||||
Verb = { s : Agr => Polarity => Tense => Anteriority => Str } ;
|
||||
|
||||
AdjectivalPhrase : Type = { s : Agr => Str } ;
|
||||
mkAdjective: Str-> Bool -> { s : Agr=> Str } = \ a , b -> case b of {
|
||||
True => { s = \\ agr => a } ;
|
||||
False => { s = \\ agr => let agrM = mkNCParticles ! AdjPron ! agr in
|
||||
agrM + a --this is supposed to be a concatenation
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Verb2 : Type = Verb **{ c : Str } ;
|
||||
mkV2 : Str -> Verb2 = \s -> (mkVerb s) ** { c = [] } ;
|
||||
Adjective : Type = { s : Agr => Str } ;
|
||||
mkComp : AdjectivalPhrase -> VerbPhrase ; --comp means compula
|
||||
mkComp comp = {
|
||||
s = \\ agr , pol , tense, anter =>
|
||||
let aux = mkAuxTenseMarker ! tense ! anter;
|
||||
p2 = mkPol2Marker ! pol ! tense ! anter;
|
||||
s = mkNCParticles ! SubjM ! agr
|
||||
in aux ++ p2 + s ++ "ri" ++ comp.s!agr --why does the plus fail?
|
||||
};
|
||||
|
||||
|
||||
mkVerb : Str -> Verb ; -- write an operation for the object marker
|
||||
mkVerb run = { s = \\ subjM , pol , tense , anter =>
|
||||
let p1 = mkPol1Marker ! pol! tense ! anter ;
|
||||
p2 = mkPol2Marker ! pol! tense ! anter ;
|
||||
t1 = mkTenseMarker1 ! tense ! anter ;
|
||||
t2 = mkTenseMarker2 ! tense ! anter ;
|
||||
s = mkNCParticles ! SubjM !subjM
|
||||
in
|
||||
case < tense , anter > of {
|
||||
<Past, Anter> => p1 + s + t1 ++ s + p2 + run + t2;
|
||||
<Fut, _> => p1 + s + t1 ++ p2 + run + t2;
|
||||
_ => (p1 + s + p2 + t1 + run + t2)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
{-
|
||||
|
||||
Note: The following is copied from the file swahili/ResSwa.gf
|
||||
-}
|
||||
|
||||
--1 Swahili auxiliary operations.
|
||||
|
||||
-- This module contains operations that are needed to make the
|
||||
-- resource syntax work. To define everything that is needed to
|
||||
-- implement $Test$, it moreover contains regular lexical
|
||||
-- patterns needed for $Lex$.
|
||||
|
||||
resource ResSwa = ParamX ** open Prelude in {
|
||||
|
||||
--For $Noun$
|
||||
|
||||
-- This is the worst-case $Case$ needed for pronouns.
|
||||
|
||||
param Case = Nom | Loc ;
|
||||
|
||||
param Animacy = AN | IN ;
|
||||
|
||||
param Gender = g1_2 | g3_4 | g5_6 | g5a_6 | g6 | g7_8 | g9_10 | g11 | g11_6 | g11_10 ;
|
||||
|
||||
--2 For $Adjective$
|
||||
|
||||
AForm = AF Number Gender Animacy
|
||||
| AA ;
|
||||
|
||||
-- The order of sentence is needed already in $VP$.
|
||||
|
||||
Order = ODir | OQuest ;
|
||||
|
||||
--2 For $Verb$
|
||||
|
||||
-- Verbs will take one of the five forms
|
||||
|
||||
param
|
||||
VForm = VInf
|
||||
| VImper Number Person
|
||||
| VPres Number Gender Animacy Person
|
||||
| VPast Number Gender Animacy Person
|
||||
| VFut Number Gender Animacy Person;
|
||||
|
||||
|
||||
oper
|
||||
|
||||
Verb : Type = {s : VForm => Str} ;
|
||||
|
||||
|
||||
VerbForms : Type = Tense => Anteriority => Polarity => Agr => Str ;
|
||||
|
||||
VP : Type = {
|
||||
s : VerbForms ;
|
||||
s2 : Agr => Str
|
||||
} ;
|
||||
|
||||
|
||||
mkV : Str -> {s : VForm => Str} =
|
||||
\cheza -> {
|
||||
s = table {
|
||||
VInf => case Predef.take 2 cheza of {
|
||||
"ku" => cheza;
|
||||
_ => "ku"+cheza
|
||||
};
|
||||
VImper n p => case <n,p> of{
|
||||
<Sg,P2> => init cheza + "eni";
|
||||
<_,_> => cheza};
|
||||
VPres n g anim p => Verbprefix n g anim p + "na" + cheza;
|
||||
VPast n g anim p => Verbprefix n g anim p + "li" + cheza ;
|
||||
VFut n g anim p => Verbprefix n g anim p + "ta" + cheza
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
predV : Verb -> VP = \verb -> {
|
||||
s = \\t,ant,b,agr =>
|
||||
let
|
||||
inf = verb.s ! VInf ;
|
||||
imper = verb.s ! VImper agr.n agr.p;
|
||||
pres = verb.s ! VPres agr.n agr.g agr.anim agr.p ;
|
||||
past = verb.s ! VPast agr.n agr.g agr.anim agr.p ;
|
||||
fut = verb.s ! VFut agr.n agr.g agr.anim agr.p ;
|
||||
in
|
||||
case <t,ant,b> of {
|
||||
<_,Anter,Pos> => imper;
|
||||
<Pres,Simul,Pos> => pres ;
|
||||
<Past,Anter,Pos> => past ;
|
||||
<Fut, Anter,Pos> => fut ;
|
||||
<_,_,_> => inf
|
||||
|
||||
};
|
||||
s2 = \\_ => []
|
||||
};
|
||||
|
||||
|
||||
Verbprefix : Number -> Gender -> Animacy -> Person -> Str = \n,g,anim,p ->
|
||||
case <anim,n,g,p> of {
|
||||
<AN,Sg,_,P1> => "ni" ;
|
||||
<AN,Sg,_,P2> => "u" ;
|
||||
<AN,Pl,_,P1> => "tu" ;
|
||||
<AN,Pl,_,P2> => "m" ;
|
||||
<AN,Sg,_,_> => "a" ;
|
||||
<AN,Pl,_,_> => "wa" ;
|
||||
<_,Sg,g1_2,_> => "a" ;
|
||||
<_,Pl,g1_2,_> => "wa" ;
|
||||
<_,Sg,g3_4,_> => "u" ;
|
||||
<_,Pl,g3_4,_> => "i" ;
|
||||
<_,Sg,g5_6,_> => "li" ;
|
||||
<_,Pl,g5_6,_> => "ya" ;
|
||||
<_,Sg,g5a_6,_> => "li" ;
|
||||
<_,Pl,g5a_6,_> => "ya" ;
|
||||
<IN,_,g6,_> => "ya" ;
|
||||
<IN,Sg,g7_8,_> => "ki" ;
|
||||
<IN,Pl,g7_8,_> => "vi" ;
|
||||
<IN,Sg,g9_10,_> => "i" ;
|
||||
<IN,Pl,g9_10,_> => "zi" ;
|
||||
<IN,_,g11,_> => "u" ;
|
||||
<IN,Sg,g11_6,_> => "u" ;
|
||||
<IN,Pl,g11_6,_> => "ya" ;
|
||||
<IN,Sg,g11_10,_> => "u" ;
|
||||
<IN,Pl,g11_10,_> => "zi"
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- Auxiliary verbs have special negative forms.
|
||||
param
|
||||
VVForm =
|
||||
VVF VForm
|
||||
| VVPresNeg
|
||||
| VVPastNeg --# notpresent
|
||||
;
|
||||
|
||||
--Adjectives
|
||||
|
||||
oper Adj = {s : AForm => Str} ;
|
||||
|
||||
--2 For $Quantifiers$
|
||||
-- A 3-dimensional system of quantifiers (demonstrative pronouns) based on position of object, hearer + speaker
|
||||
-- need to find linguistic term to express this
|
||||
|
||||
param Spatial = SpHrObj | SpHr | HrObj ; --w.r.t object
|
||||
|
||||
-- Agreement of adjectives, verb phrases, and relative pronouns.
|
||||
|
||||
oper
|
||||
AGR = {n : Number ; g : Gender ; anim : Animacy ; p : Person} ;
|
||||
Agr : Type = {n : Number ; g : Gender ; anim : Animacy ; p : Person} ;
|
||||
agr : Number -> Gender -> Animacy -> Person -> Agr = \n,g,anim,p -> {n = n ; g = g ; anim = anim ; p = p} ;
|
||||
|
||||
-- For $Sentence$.
|
||||
|
||||
Clause : Type = {
|
||||
s : Tense => Anteriority => Polarity => Str
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> VP -> Clause =
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,a,b =>
|
||||
let
|
||||
verb = vp.s ! t ! a ! b ! agr
|
||||
in
|
||||
subj ++ verb
|
||||
} ;
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user