mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-20 16:56:18 -06:00
use consistent lin X everywhere
This commit is contained in:
@@ -33,6 +33,6 @@ lin
|
||||
{s = "بگذارید" ++ np2str np ++ showVPH (VSubj Pos np.a) np.a vp};
|
||||
|
||||
oper
|
||||
existVerb : V2 = mkV2 (mkV "وجود" haveVerb) noPrep ;
|
||||
existVerb : V2 = mkV2 (mkV "وجود" (lin V haveVerb)) noPrep ;
|
||||
|
||||
}
|
||||
|
||||
@@ -164,11 +164,11 @@ oper
|
||||
mkVV : Str -> VV -- Predictable VV, subjunctive complement, is auxiliary.
|
||||
= \s -> lin VV (regV s ** {isAux = True ; compl = subjunctive ; isDef = False}) ;
|
||||
mkVV : V -> VV -- takes its VP complement in subjunctive. Is auxiliary.
|
||||
= \v -> v ** {isAux = True ; compl = subjunctive ; isDef = False} ;
|
||||
= \v -> lin VV (v ** {isAux = True ; compl = subjunctive ; isDef = False}) ;
|
||||
mkVV : VVForm -> V -> VV -- takes its VP complement in the given VVForm
|
||||
= \vvf,v -> v ** {isAux = True ; compl = vvf ; isDef = False} ;
|
||||
= \vvf,v -> lin VV (v ** {isAux = True ; compl = vvf ; isDef = False}) ;
|
||||
mkVV : (isAux : Bool) -> VVForm -> V -> VV -- takes its VP complement in the given VVForm. Whether it's auxiliary (T/F) given as the first argument.
|
||||
= \isAux,vvf,v -> v ** {isAux = isAux ; compl = vvf ; isDef = False}
|
||||
= \isAux,vvf,v -> lin VV (v ** {isAux = isAux ; compl = vvf ; isDef = False})
|
||||
} ;
|
||||
|
||||
defVV : VV -> VV = \vv -> vv ** {isDef=True} ;
|
||||
@@ -282,19 +282,19 @@ oper
|
||||
|
||||
mkN = overload {
|
||||
mkN : (sg : Str) -> N -- Takes singular form, returns a noun with ها as the plural form.
|
||||
= \sg -> mkN01 sg inanimate ;
|
||||
= \sg -> lin N (mkN01 sg inanimate) ;
|
||||
mkN : (sg,pl : Str) -> N -- Takes singular and plural forms. Use for ان or its allomorphs, and loanwords with Arabic plural.
|
||||
= \sg,pl -> M.mkN sg pl inanimate ;
|
||||
= \sg,pl -> lin N (M.mkN sg pl inanimate) ;
|
||||
mkN : (possStem : Str) -> N -> N -- Noun with an unexpected possessive stem, e.g. مه where ه is a consonant, not vowel.
|
||||
= \ps,n -> possStemN ps n ;
|
||||
= \ps,n -> lin N (possStemN ps n) ;
|
||||
|
||||
-- hidden from API
|
||||
mkN : (sg : Str) -> Animacy -> N -- Takes singular form and animacy. Inanimate plural ها. Animate plural ان or an allomorph of it (یان or گان) depending on the singular form.
|
||||
= \sg,ani -> case ani of {
|
||||
Inanimate => mkN01 sg ani ;
|
||||
Animate => mkN02 sg ani } ;
|
||||
Inanimate => lin N (mkN01 sg ani) ;
|
||||
Animate => lin N (mkN02 sg ani) } ;
|
||||
mkN : (sg,pl : Str) -> Animacy -> N -- Worst-case constructor: takes singular and plural forms and animacy. Use for e.g. loanwords with Arabic plural, or animate nouns with ها as plural.
|
||||
= \sg,pl,ani -> M.mkN sg pl ani
|
||||
= \sg,pl,ani -> lin N (M.mkN sg pl ani)
|
||||
} ;
|
||||
|
||||
possStemN : Str -> N -> N = \possStem,n -> n ** {
|
||||
@@ -304,18 +304,18 @@ oper
|
||||
|
||||
} ;
|
||||
|
||||
mkN01 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, forms plural with ها
|
||||
mkN01 : (sg : Str) -> Animacy -> N ; -- Takes singular form and animacy, forms plural with ها
|
||||
mkN01 sg ani =
|
||||
let pl : Str = case last sg of {
|
||||
--"د"|"ذ"|"ر"|"ز"|"ژ" => sg + "ها" ; -- these letters are separated by default
|
||||
_ => zwnj sg "ها" } ; -- Using zero-width non-joiner, defined in MorphoPes
|
||||
in M.mkN sg pl ani ;
|
||||
in lin N (M.mkN sg pl ani) ;
|
||||
|
||||
mkN02 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, pattern matches singular and forms plural with either گان, یان or ان
|
||||
mkN02 : (sg : Str) -> Animacy -> N ; -- Takes singular form and animacy, pattern matches singular and forms plural with either گان, یان or ان
|
||||
mkN02 str ani = case last str of {
|
||||
"ه" => M.mkN str (init str + "گان") ani ;
|
||||
("ا"|"و") => M.mkN str (str + "یان") ani ;
|
||||
_ => M.mkN str (str + "ان") ani
|
||||
"ه" => lin N (M.mkN str (init str + "گان") ani) ;
|
||||
("ا"|"و") => lin N (M.mkN str (str + "یان") ani) ;
|
||||
_ => lin N (M.mkN str (str + "ان") ani)
|
||||
};
|
||||
|
||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||
@@ -396,7 +396,7 @@ oper
|
||||
=> {s = [] ; ra = ra ; mod=Bare ; isPrep = False} ;
|
||||
prep => {s = prep ; ra = [] ; mod=Bare ; isPrep = True}
|
||||
} ;
|
||||
noPrep = prepOrRa [] ;
|
||||
noPrep : Prep = lin Prep (prepOrRa []) ;
|
||||
|
||||
-- NB. The 'mod' field has different meaning for verbs and N2s.
|
||||
ezafeForN2 = {s = [] ; ra = [] ; mod=Ezafe ; isPrep = False} ;
|
||||
@@ -427,11 +427,11 @@ oper
|
||||
mkQuant = overload {
|
||||
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
||||
mkQuant : Str -> Str -> Quant -- hidden from public API
|
||||
= \sg,pl -> makeQuant sg pl Bare False;
|
||||
= \sg,pl -> lin Quant (makeQuant sg pl Bare False);
|
||||
mkQuant : Str -> Str -> (isNeg : Bool) -> Quant -- hidden from public API
|
||||
= \sg,pl,isneg -> makeQuant sg pl Bare isneg;
|
||||
= \sg,pl,isneg -> lin Quant (makeQuant sg pl Bare isneg);
|
||||
mkQuant : Str -> Str -> Mod -> (isNeg : Bool) -> Quant -- hidden from public API
|
||||
= \sg,pl,mod,isneg -> makeQuant sg pl mod isneg;
|
||||
= \sg,pl,mod,isneg -> lin Quant (makeQuant sg pl mod isneg);
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user