mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Hun) Restructure adpositions
This commit is contained in:
@@ -12,13 +12,14 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
||||
-- : A -> NP -> AP ;
|
||||
ComparA a np = emptyAP ** {
|
||||
s = a.s ! Compar ;
|
||||
compar = np.s ! Ade ;
|
||||
compar = applyAdp (caseAdp "nál" "nél") np ; -- Adessive
|
||||
-- compar = applyAdp (prepos Nom "mint") np ;
|
||||
} ;
|
||||
|
||||
-- : A2 -> NP -> AP ; -- married to her
|
||||
ComplA2 a2 np = emptyAP ** {
|
||||
s = a2.s ! Posit ;
|
||||
compar = np.s ! a2.c2.c ++ a2.c2.s
|
||||
compar = applyAdp a2.c2 np ;
|
||||
} ;
|
||||
|
||||
-- : A2 -> AP ; -- married to itself
|
||||
|
||||
@@ -12,7 +12,7 @@ lin
|
||||
|
||||
-- : Prep -> NP -> Adv ;
|
||||
PrepNP prep np = {
|
||||
s = prep.pr ++ np.s ! prep.c ++ prep.s ;
|
||||
s = applyAdp prep np
|
||||
} ;
|
||||
|
||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||
|
||||
@@ -90,7 +90,7 @@ oper
|
||||
} ;
|
||||
|
||||
prePrep : Str -> Case -> Prep -- Preposition
|
||||
= \s,c -> lin Prep {pr=s ; s=[] ; c=c} ;
|
||||
= \s,c -> lin Prep (ResHun.prepos c s) ;
|
||||
|
||||
casePrep : Case -> Prep ; -- No postposition, only case
|
||||
|
||||
@@ -190,13 +190,13 @@ oper
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : (e : Str) -> Prep
|
||||
= \str -> lin Prep (ResHun.mkPrep str) ;
|
||||
= \str -> lin Prep (ResHun.nomAdp str) ;
|
||||
mkPrep : Str -> Case -> Prep
|
||||
= \str,c -> lin Prep (ResHun.mkPrep str ** {c = c}) ;
|
||||
= \str,c -> lin Prep (ResHun.caseAdp c str) ;
|
||||
} ;
|
||||
|
||||
casePrep : Case -> Prep
|
||||
= \c -> lin Prep (ResHun.mkPrep [] ** {c = c}) ;
|
||||
= \c -> lin Prep (ResHun.caseAdp c) ;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
@@ -120,13 +120,35 @@ oper
|
||||
-- TODO: personal suffixes, e.g. felettem, általam, not *felett/által én
|
||||
Adposition : Type = {
|
||||
pr : Str ; -- Preposition
|
||||
s : Str ; -- Postposition
|
||||
s : HarmForms ; -- Postposition
|
||||
c : Case ;
|
||||
} ;
|
||||
|
||||
mkPrep : Str -> Adposition = \str -> {s=str ; c=Nom ; pr=[]} ;
|
||||
nomAdp : Str -> Adposition = \s -> postpos Nom (harm1 s) ;
|
||||
|
||||
emptyAdp : Adposition = mkPrep [] ;
|
||||
caseAdp = overload {
|
||||
caseAdp : Case -> Adposition = \c -> postpos c (harm1 []) ;
|
||||
caseAdp : Case -> Str -> Adposition = \c,s -> postpos c (harm1 s) ;
|
||||
caseAdp : Str -> Adposition = \ért ->
|
||||
postpos OblStem (harm1 ért) ;
|
||||
caseAdp : (x,y : Str) -> Adposition = \nál,nél ->
|
||||
postpos OblStem (harm nál nél) ;
|
||||
caseAdp : (x,y,z : Str) -> Adposition = \hoz,hez,höz ->
|
||||
postpos OblStem (harm3 hoz hez höz)
|
||||
} ;
|
||||
postpos : Case -> HarmForms -> Adposition = \c,h-> {s=h ; c=c ; pr=[]} ;
|
||||
prepos : Case -> Str -> Adposition = \c,s -> {s=harm1 [] ; c=c ; pr=s} ;
|
||||
|
||||
emptyAdp : Adposition = nomAdp [] ;
|
||||
|
||||
applyAdp : Adposition -> NounPhrase -> Str = \adp,np ->
|
||||
adp.pr ++ glueIf adp.c (np.s ! adp.c) (adp.s ! np.h) ;
|
||||
|
||||
glueIf : Case -> (_,_ : Str) -> Str = \cas,a,b ->
|
||||
case cas of {
|
||||
OblStem => glue a b ;
|
||||
_ => a ++ b
|
||||
} ;
|
||||
|
||||
------------------
|
||||
-- Conj
|
||||
|
||||
@@ -94,25 +94,25 @@ lin something_NP = defNP "valami" Sg ;
|
||||
|
||||
-- List of postpositions requiring case:
|
||||
-- https://en.wiktionary.org/wiki/Appendix:Hungarian_postpositions#Postpositions_Requiring_Case
|
||||
lin above_Prep = mkPrep "fölött" ;
|
||||
lin above_Prep = nomAdp "fölött" ;
|
||||
-- lin after_Prep = mkPrep ""
|
||||
-- lin before_Prep = mkPrep "" ;
|
||||
-- lin behind_Prep = mkPrep "" ;
|
||||
-- lin between_Prep = = mkPrep "" ;
|
||||
lin by8agent_Prep = mkPrep "által" ;
|
||||
lin by8means_Prep = casePrep Ins ;
|
||||
lin by8agent_Prep = nomAdp "által" ;
|
||||
lin by8means_Prep = caseAdp Ins ;
|
||||
-- lin during_Prep = mkPrep ;
|
||||
-- lin except_Prep = mkPrep ;
|
||||
lin for_Prep = casePrep Dat ;
|
||||
lin for_Prep = caseAdp Dat ;
|
||||
-- lin from_Prep = mkPrep "" ;
|
||||
-- lin in8front_Prep = mkPrep "" ;
|
||||
lin in_Prep = casePrep Ine ;
|
||||
lin on_Prep = casePrep Sup ;
|
||||
lin in_Prep = caseAdp "ban" "ben" ;
|
||||
lin on_Prep = caseAdp Sup ;
|
||||
-- lin part_Prep = casePrep ;
|
||||
-- lin possess_Prep = -- Suffix attaches to possessee, not possessor
|
||||
-- lin through_Prep = mkPrep ;
|
||||
lin to_Prep = casePrep All ;
|
||||
lin under_Prep = mkPrep "alatt" ;
|
||||
lin to_Prep = caseAdp "hoz" "hez" "höz" ;
|
||||
lin under_Prep = nomAdp "alatt" ;
|
||||
-- lin with_Prep = mkPrep "" ;
|
||||
-- lin without_Prep = mkPrep "" ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user