1
0
forked from GitHub/gf-rgl

Merge branch 'hungarian' of github.com:inariksit/gf-rgl into hungarian

This commit is contained in:
Julia Jansson
2020-04-19 18:54:55 +02:00
9 changed files with 54 additions and 32 deletions

View File

@@ -12,7 +12,7 @@ lin
-- : Prep -> NP -> Adv ; -- : Prep -> NP -> Adv ;
PrepNP prep np = { PrepNP prep np = {
s = np.s ! prep.c ++ prep.s ; s = prep.pr ++ np.s ! prep.c ++ prep.s ;
} ; } ;
-- Adverbs can be modified by 'adadjectives', just like adjectives. -- Adverbs can be modified by 'adadjectives', just like adjectives.

View File

@@ -87,7 +87,7 @@ concrete CatHun of Cat = CommonX ** open ResHun, Prelude in {
-- Constructed in StructuralHun. -- Constructed in StructuralHun.
Conj = ResHun.Conj ; Conj = ResHun.Conj ;
Subj = SS ; Subj = SS ;
Prep = ResHun.Postposition ; Prep = ResHun.Adposition ;

View File

@@ -32,7 +32,7 @@ lincat
lin lin
BaseNP x y = twoTable Case x y ** y ; BaseNP x y = twoTable Case x y ** y ;
ConsNP x xs = consrTable Case comma x xs ** xs ; ConsNP x xs = consrTable Case comma x xs ** xs ;
ConjNP co xs = conjunctDistrTable Case co xs ** xs ; ConjNP co xs = conjunctDistrTable Case co xs ** xs ** {agr = <P3,co.n>};
-- Relative sentences -- Relative sentences
lincat lincat

View File

@@ -8,7 +8,7 @@ concrete NounHun of Noun = CatHun ** open ResHun, Prelude, Coordination in {
-- : Det -> CN -> NP -- : Det -> CN -> NP
DetCN det cn = emptyNP ** det ** { DetCN det cn = emptyNP ** det ** {
s = \\c => det.s ! c ++ cn.s ! det.n ! c ; s = \\c => det.s ! Nom ++ cn.s ! det.n ! c ;
agr = <P3,det.n> ; agr = <P3,det.n> ;
} ; } ;

View File

@@ -37,7 +37,8 @@ oper
mkA2 : overload { mkA2 : overload {
mkA2 : Str -> Prep -> A2 ; mkA2 : Str -> Prep -> A2 ;
mkA2 : Str -> Case -> A2 mkA2 : Str -> Case -> A2 ;
mkA2 : A -> Prep -> A2 ;
} ; } ;
--2 Verbs --2 Verbs
@@ -85,6 +86,9 @@ oper
mkPrep : Str -> Case -> Prep ; -- Postposition and case mkPrep : Str -> Case -> Prep ; -- Postposition and case
} ; } ;
prePrep : Str -> Case -> Prep -- Preposition
= \s,c -> lin Prep {pr=s ; s=[] ; c=c} ;
casePrep : Case -> Prep ; -- No postposition, only case casePrep : Case -> Prep ; -- No postposition, only case
-- mkConj : (_,_ : Str) -> Number -> Conj = \s1,s2,num -> -- mkConj : (_,_ : Str) -> Number -> Conj = \s1,s2,num ->
@@ -146,10 +150,13 @@ oper
} ; } ;
mkA2 = overload { mkA2 = overload {
mkA2 : A -> A2 = \a -> a ** {c2 = casePrep Nom} ;
mkA2 : Str -> Prep -> A2 = \s,p -> mkA2 : Str -> Prep -> A2 = \s,p ->
lin A2 {s = (mkAdj s).s ; c2 = p} ; lin A2 {s = (mkAdj s).s ; c2 = p} ;
mkA2 : Str -> Case -> A2 = \s,c -> mkA2 : Str -> Case -> A2 = \s,c ->
lin A2 {s = (mkAdj s).s ; c2 = {s = [] ; c = c}} lin A2 {s = (mkAdj s).s ; c2 = casePrep c} ;
mkA2 : A -> Prep -> A2 = \a,p ->
lin A2 (a ** {c2 = p}) ;
} ; } ;
mkV = overload { mkV = overload {

View File

@@ -102,14 +102,18 @@ oper
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Postpositions -- Adpositions
-- TODO: personal suffixes, e.g. felettem, általam, not *felett/által én -- TODO: personal suffixes, e.g. felettem, általam, not *felett/által én
Postposition : Type = {s : Str ; c : Case} ; Adposition : Type = {
pr : Str ; -- Preposition
s : Str ; -- Postposition
c : Case ;
} ;
mkPrep : Str -> Postposition = \str -> {s=str ; c=Nom} ; mkPrep : Str -> Adposition = \str -> {s=str ; c=Nom ; pr=[]} ;
emptyPP : Postposition = mkPrep [] ; emptyAdp : Adposition = mkPrep [] ;
------------------ ------------------
-- Conj -- Conj
@@ -144,7 +148,7 @@ oper
s : Degree => Number => Str s : Degree => Number => Str
} ; } ;
Adjective2 : Type = Adjective ** { Adjective2 : Type = Adjective ** {
c2 : Postposition ; c2 : Adposition ;
} ; } ;
mkAdj : Str -> Adjective = \sg -> { mkAdj : Str -> Adjective = \sg -> {
@@ -274,6 +278,10 @@ oper
"vannak" "vannak"
"lenni" ; "lenni" ;
megvan : Verb = copula ** {
s = \\vf => "meg" + copula.s ! vf ;
} ;
------------------ ------------------
-- VP -- VP
@@ -326,9 +334,14 @@ oper
Sentence : Type = {s : Str} ; Sentence : Type = {s : Str} ;
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** { predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
s = let rel : RClause = relVP' (np2rp np) vp ; s = \\t,a,p => let subjcase : Case = case vp.sc of {
in \\t,a,p => rel.s ! t ! a ! p ! np.agr.p2 ! sc2case vp.sc SCNom => Nom ;
++ np.empty ; -- standard trick for prodrop+metavariable problem SCDat => Dat }
in np.s ! subjcase
++ vp.s ! agr2vf np.agr
++ vp.obj
++ vp.adv
++ np.empty -- standard trick for prodrop+metavariable problem
} ; } ;
-- Relative -- Relative
@@ -344,12 +357,12 @@ oper
relVP' : RP ** {agr : Person*Number} -> VerbPhrase -> RClause = \rp,vp -> { relVP' : RP ** {agr : Person*Number} -> VerbPhrase -> RClause = \rp,vp -> {
s = \\t,a,p,n,c => let subjcase : Case = case vp.sc of { s = \\t,a,p,n,c => let subjcase : Case = case vp.sc of {
SCNom => c ; SCNom => Nom ;
SCDat => Dat } SCDat => Dat }
in rp.s ! n ! subjcase in rp.s ! n ! subjcase
++ vp.s ! VFin rp.agr.p1 n -- variable by number
++ vp.obj ++ vp.obj
++ vp.adv ++ vp.adv
++ vp.s ! VFin rp.agr.p1 n -- variable by number
} ; } ;
relSlash : RP -> ClSlash -> RClause = \rp,cls -> { relSlash : RP -> ClSlash -> RClause = \rp,cls -> {

View File

@@ -15,7 +15,7 @@ lin
--2 Clauses missing object noun phrases --2 Clauses missing object noun phrases
-- : NP -> VPSlash -> ClSlash ; -- : NP -> VPSlash -> ClSlash ;
SlashVP np vps = predVP np (vps ** {s = vps.s ! Def ; obj = []}) ; SlashVP np vps = predVP np (vps ** {s = vps.s ! Indef ; obj = []}) ;
{- {-
-- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today -- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today
AdvSlash cls adv = cls ** insertAdv adv cls ; AdvSlash cls adv = cls ** insertAdv adv cls ;

View File

@@ -65,8 +65,8 @@ lin few_Det = mkDet "kevés" Def Sg ; -- TODO check
lin many_Det = mkDet "sok" Def Sg ; -- TODO check lin many_Det = mkDet "sok" Def Sg ; -- TODO check
--lin much_Det = --lin much_Det =
lin somePl_Det = mkDet "némely" Indef Pl ; lin somePl_Det = mkDet "néhány" Indef Sg ;
lin someSg_Det = mkDet "némely" Indef Sg ; lin someSg_Det = mkDet "néhány" Indef Sg ;
--lin no_Quant = --lin no_Quant =
lin that_Quant = mkQuant "az" "az" ; lin that_Quant = mkQuant "az" "az" ;
@@ -215,6 +215,11 @@ lin yes_Utt = ss "igen" ;
-- Verb -- Verb
lin have_V2 = datV2 copula ; lin have_V2 = datV2 copula ;
-- uncomment if prefer def obj with megvan
-- ** {
-- s = table {Indef => copula.s } ;
-- - Def => megvan.s } ;
-- } ;
{-lin can8know_VV = can_VV ; -- can (capacity) {-lin can8know_VV = can_VV ; -- can (capacity)
lin can_VV = mkVV "" ; -- can (possibility) lin can_VV = mkVV "" ; -- can (possibility)
lin must_VV = mkVV "" ; lin must_VV = mkVV "" ;

View File

@@ -2,34 +2,31 @@
-- These need to be correct -- -- These need to be correct --
------------------------------ ------------------------------
--"aki" instead of "amit" for most examples --"ami" instead of "amit" for most examples
-- LangEng: I see a man that flies -- LangEng: I see a man that flies
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))) NoVoc
LangHun: én látok egy férfit aki repül LangHun: én látok egy férfit ami repül
-- LangEng: I see the man that flies -- LangEng: I see the man that flies
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))) NoVoc
LangHun: én látom a férfit aki repül LangHun: én látom a férfit ami repül
-- LangEng: I see the man that sees a cat -- LangEng: I see the man that sees a cat
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))) NoVoc
LangHun: én látom a férfit aki lát egy macskát LangHun: én látom a férfit ami egy macskát lát
--more natural sentence would be "... aki egy macskát lát" but I think this is still correct
-- LangEng: I see the man that sees the cat -- LangEng: I see the man that sees the cat
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))))) NoVoc
LangHun: én látom a férfit aki látja a macskát LangHun: én látom a férfit ami a macskát látja
--more natural sentence would be "... aki a macskat látja"
-- LangEng: I see the man that has a cat -- LangEng: I see the man that has a cat
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))) NoVoc
LangHun: én látom a férfit akinek egy macskája van LangHun: én látom a férfit aminek egy macskája van
-- from "akinek van egy macska" to "akinek egy macskája van"
-- LangEng: I see the man that has the cat -- LangEng: I see the man that has the cat
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))))) NoVoc
LangHun: én látom a férfit akinek megvan a macska LangHun: én látom a férfit aminek megvan a macska
-- vet inte riktigt hur jag ska tänka med "the cat", tyckte det kändes mer rätt med "meg-" konstruktionen -- vet inte riktigt hur jag ska tänka med "the cat", tyckte det kändes mer rätt med "meg-" konstruktionen
-- LangEng: I see the cat that flies and that is red -- LangEng: I see the cat that flies and that is red
@@ -41,7 +38,7 @@ LangHun: én látom a macskát ami repül és piros
-- LangEng: I see the man that flies and that has a cat -- LangEng: I see the man that flies and that has a cat
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (ConjRS and_Conj (BaseRS (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (ConjRS and_Conj (BaseRS (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))))) NoVoc
LangHun: én látom a férfit aki repül és akinek egy macskája van LangHun: én látom a férfit ami repül és aminek egy macskája van
------------------------------------------------------------- -------------------------------------------------------------
@@ -50,12 +47,12 @@ LangHun: én látom a férfit aki repül és akinek egy macskája van
-- LangEng: I see the man that the cat sees -- LangEng: I see the man that the cat sees
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a see_V2)))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a see_V2)))))))))) NoVoc
LangHun: én látom a férfit akit a macska lát LangHun: én látom a férfit amit a macska lát
-- LangEng: I see a man that the cat sees -- LangEng: I see a man that the cat sees
-- Should this be "amit a macska lát"? Yes -- Should this be "amit a macska lát"? Yes
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a see_V2)))))))))) NoVoc Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a see_V2)))))))))) NoVoc
LangHun: én látok egy férfit akit a macska lát LangHun: én látok egy férfit amit a macska lát
--These last cases not corrected due to "van" confusion --These last cases not corrected due to "van" confusion
-- LangEng: I see a cat that the man has -- LangEng: I see a cat that the man has