mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Hun) Restructure caseFromStem and applyCase
This commit is contained in:
@@ -23,15 +23,17 @@ oper
|
|||||||
\\n,c => caseFromStem (\a,b -> a+b) (regNounNomAcc no ac) c n ;
|
\\n,c => caseFromStem (\a,b -> a+b) (regNounNomAcc no ac) c n ;
|
||||||
|
|
||||||
caseFromStem : (Str->Str->Str) -> Noun -> Case -> Number -> Str = \bind,cn,cas,n ->
|
caseFromStem : (Str->Str->Str) -> Noun -> Case -> Number -> Str = \bind,cn,cas,n ->
|
||||||
|
let applyCase' : NumCaseStem -> Str = applyCase bind cas cn in
|
||||||
case <n,cas> of {
|
case <n,cas> of {
|
||||||
<Sg,Nom> => cn.s ! SgNom ;
|
<Sg,Nom> => cn.s ! SgNom ;
|
||||||
<Sg,Acc> => bind (cn.s ! SgAccStem) "t" ;
|
<Sg,Acc> => bind (cn.s ! SgAccStem) "t" ;
|
||||||
<Sg,Sup> => cn.s ! SgSup ;
|
<Sg,Sup> => cn.s ! SgSup ;
|
||||||
<Pl,Acc> => cn.s ! PlAcc ;
|
<Pl,Acc> => cn.s ! PlAcc ;
|
||||||
<Pl,Nom> => cn.s ! PlStem ;
|
<Pl,Nom> => cn.s ! PlStem ;
|
||||||
<Sg,Ins|Tra> => bind (cn.s ! SgInsStem) (endCase cas ! cn.h) ;
|
<Sg,Ins|Tra> => applyCase' SgInsStem ;
|
||||||
<Pl,Ins|Tra> => bind (bind (cn.s ! PlStem) "k") (endCase cas ! cn.h) ;
|
<Pl,Ins|Tra> => bind (bind (cn.s ! PlStem) "k") (endCase cas ! cn.h) ;
|
||||||
_ => applyOblCase bind (endCase cas) n cn
|
<Sg,_> => applyCase' SgStem ;
|
||||||
|
<Pl,_> => applyCase' PlStem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
BaseNP : Type = {
|
BaseNP : Type = {
|
||||||
@@ -170,11 +172,8 @@ oper
|
|||||||
applyAdp : Adposition -> NounPhrase -> Str = \adp,np ->
|
applyAdp : Adposition -> NounPhrase -> Str = \adp,np ->
|
||||||
adp.pr ++ np.s ! adp.c ++ adp.s ;
|
adp.pr ++ np.s ! adp.c ++ adp.s ;
|
||||||
|
|
||||||
applyOblCase : (Str->Str->Str) -> HarmForms -> Number -> Noun -> Str =
|
applyCase : (Str->Str->Str) -> Case -> Noun -> NumCaseStem -> Str =
|
||||||
\bind,adp,n,np ->
|
\bind,cas,cn,stem -> bind (cn.s ! stem) (endCase cas ! cn.h) ;
|
||||||
let stem : NumCaseStem = case n of {
|
|
||||||
Sg => SgStem ; Pl => PlStem } ;
|
|
||||||
in bind (np.s ! stem) (adp ! np.h) ;
|
|
||||||
|
|
||||||
------------------
|
------------------
|
||||||
-- Conj
|
-- Conj
|
||||||
|
|||||||
Reference in New Issue
Block a user