mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 22:42:52 -06:00
ParseHinandExtraUrd
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
--# -path=.:alltenses:../abstract:../english
|
||||
concrete ParseUrd of ParseEngAbs =
|
||||
TenseX - [AdN,Adv,SC],
|
||||
TenseX - [AdN,Adv,SC,PPos,PNeg],
|
||||
-- TextX - [AdN,Adv,SC],
|
||||
CatUrd,
|
||||
NounUrd,
|
||||
NounUrd - [PPartNP],
|
||||
AdjectiveUrd,
|
||||
NumeralUrd,
|
||||
ConjunctionUrd,
|
||||
@@ -12,10 +12,13 @@ concrete ParseUrd of ParseEngAbs =
|
||||
PhraseUrd,
|
||||
SentenceUrd,
|
||||
RelativeUrd,
|
||||
QuestionUrd,
|
||||
SymbolUrd [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
-- StructuralUrd,
|
||||
IdiomUrd [NP, VP, Tense, Cl, ProgrVP, ExistNP],
|
||||
ExtraUrd [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash],
|
||||
ExtraUrd [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,Temp,Pol,Conj,VPS,ListVPS,S,Num, CN,
|
||||
RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,VPI, VPIForm, VPIInf, VPIPresPart, ListVPI,
|
||||
VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,ClSlash, RCl, EmptyRelSlash],
|
||||
DictUrd2 **
|
||||
-- UNDictUrd **
|
||||
open MorphoUrd, ResUrd, ParadigmsUrd,CommonX, CommonHindustani, Prelude in {
|
||||
@@ -24,17 +27,17 @@ flags
|
||||
literal=Symb ;
|
||||
|
||||
lin
|
||||
{- myself_NP = regNP "myself" singular ;
|
||||
yourselfSg_NP = regNP "yourself" singular ;
|
||||
himself_NP = regNP "himself" singular ;
|
||||
herself_NP = regNP "herself" singular ;
|
||||
itself_NP = regNP "itself" singular ;
|
||||
ourself_NP = regNP "ourself" plural ;
|
||||
yourselfPl_NP = regNP "yourself" plural ;
|
||||
themself_NP = regNP "themself" plural ;
|
||||
-}
|
||||
myself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers1 };
|
||||
yourselfSg_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers2_Respect }; --regNP "yourself" singular ;
|
||||
himself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Distant }; --regNP "himself" singular ;
|
||||
herself_NP = {s = \\_ => kwd ; a = Ag Fem Sg Pers3_Distant }; --regNP "herself" singular ;
|
||||
itself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Near }; --regNP "itself" singular ;
|
||||
ourself_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers1 }; --regNP "ourself" plural ;
|
||||
yourselfPl_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers2_Respect }; --regNP "yourself" plural ;
|
||||
themself_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
|
||||
|
||||
CompoundCN num noun cn = {
|
||||
s = \\n,c => num.s ++ cn.s ! n ! c ++ noun.s ! num.n ! Dir;
|
||||
s = \\n,c => num.s ++ cn.s ! n ! c ++ noun.s ! num.n ! Dir;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
@@ -44,16 +47,16 @@ lin
|
||||
} ;
|
||||
|
||||
GerundN v = {
|
||||
s = \\n,c => v.cvp ++ v.s ! Inf ; --the main verb of compound verbs
|
||||
s = \\n,c => v.cvp ++ v.s ! Inf ; -- v.s ! VF Imperf Pers2_Casual n Masc ++ hwa (Ag Masc n Pers2_Casual) ; --the main verb of compound verbs
|
||||
g = Masc
|
||||
} ;
|
||||
|
||||
GerundAP v = {
|
||||
s = \\_,_,_,_ => v.cvp ++ v.s ! Inf --the main verb of compound verbs
|
||||
s = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ++ hwa (Ag g n Pers2_Casual) ;
|
||||
} ;
|
||||
|
||||
PastPartAP v = {
|
||||
s = \\_,_,_,_ => v.cvp ++ v.s ! Inf -- the main verb of compound versb needs to be attached here
|
||||
s = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ; -- the main verb of compound versb needs to be attached here
|
||||
} ;
|
||||
|
||||
-- OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
|
||||
@@ -66,6 +69,32 @@ ComplVV v a p vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp
|
||||
|
||||
|
||||
UseQuantPN q pn = {s = \\c => q.s ! Sg ! pn.g ! Dir ++ pn.s ! Dir ; a = agrP3 pn.g Sg} ;
|
||||
|
||||
PredVPosv np vp = mkClause np vp ; --{
|
||||
{- s = \\t,a,b,o =>
|
||||
let
|
||||
verb = vp.s ! t ! a ! b ! o ! np.a ;
|
||||
compl = vp.s2 ! np.a
|
||||
in
|
||||
case o of {
|
||||
ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ vp.ad ++ verb.fin ++ verb.adv ++ verb.inf ;
|
||||
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
|
||||
}
|
||||
} ;
|
||||
-}
|
||||
PredVPovs np vp = mkClause np vp ; --{
|
||||
{- s = \\t,a,b,o =>
|
||||
let
|
||||
verb = vp.s ! t ! a ! b ! o ! np.a ;
|
||||
compl = vp.s2 ! np.a
|
||||
in
|
||||
case o of {
|
||||
ODir => compl ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom ;
|
||||
OQuest => verb.aux ++ compl ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ np.s ! npNom
|
||||
}
|
||||
} ;
|
||||
-}
|
||||
|
||||
{-
|
||||
SlashV2V v p vp = insertObjc (\\a => p.s ++ case p.p of {CPos => ""; _ => "not"} ++
|
||||
v.c3 ++
|
||||
@@ -99,8 +128,9 @@ CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
||||
CompS s = {s = \\_ => "kh" ++ s.s} ;
|
||||
-- CompVP vp = {s = \\a => infVP VVInf vp a} ;
|
||||
|
||||
--lin
|
||||
-- PPos = {s = [] ; p = CPos} ;
|
||||
-- PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't
|
||||
lin
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ; -- contracted: don't
|
||||
UncNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user