forked from GitHub/gf-rgl
remove the old parse grammar
This commit is contained in:
@@ -1,162 +0,0 @@
|
||||
--# -path=.:../english:../abstract:../translator
|
||||
|
||||
concrete ParseChi of ParseEngAbs =
|
||||
TenseChi,
|
||||
--- CatChi,
|
||||
NounChi - [PPartNP],
|
||||
AdjectiveChi,
|
||||
NumeralChi,
|
||||
SymbolChi [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
ConjunctionChi,
|
||||
VerbChi - [SlashV2V, PassV2, UseCopula, ComplVV, CompAP, AdvVP],
|
||||
AdverbChi,
|
||||
PhraseChi,
|
||||
SentenceChi,
|
||||
QuestionChi - [QuestCl],
|
||||
RelativeChi,
|
||||
IdiomChi [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionChi,
|
||||
DocumentationChi,
|
||||
ExtraChi [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
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, ListCN, ConjCN, BaseCN, ConsCN],
|
||||
|
||||
DictionaryChi
|
||||
|
||||
**
|
||||
open ResChi, ParadigmsChi, SyntaxChi, Prelude, (G = GrammarChi), (E = ExtraChi) in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding = utf8 ;
|
||||
|
||||
|
||||
-- Chinese-specific overrides
|
||||
|
||||
lin
|
||||
CompAP = G.CompAP | E.CompBareAP ; -- he is good | he good
|
||||
|
||||
AdvVP vp adv = E.TopicAdvVP vp adv | G.AdvVP vp adv ; -- he *today* here sleeps | *today* he here sleeps
|
||||
|
||||
QuestCl cl = G.QuestCl cl | E.QuestRepV cl ; -- he comes 'ma' | he come not come
|
||||
|
||||
lin
|
||||
|
||||
EmptyRelSlash slash = mkRCl <which_RP : RP> <lin ClSlash slash : ClSlash> ;
|
||||
|
||||
that_RP = which_RP ;
|
||||
|
||||
-- lexical entries
|
||||
|
||||
-- another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
|
||||
-- some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
|
||||
-- anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
|
||||
-- each_Det = SyntaxChi.every_Det ;
|
||||
|
||||
-- but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
|
||||
|
||||
{-
|
||||
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 ;
|
||||
themselves_NP = regNP "themselves" plural ;
|
||||
-}
|
||||
|
||||
CompoundCN num noun cn = {s = num.s ++ noun.s ++ cn.s ; c = cn.c} ; ----
|
||||
DashCN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
|
||||
|
||||
{-
|
||||
DashCN noun1 noun2 = {
|
||||
s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ;
|
||||
g = noun2.g
|
||||
} ;
|
||||
-}
|
||||
|
||||
GerundN v = {
|
||||
s = v.s ;
|
||||
c = ge_s ---- ge
|
||||
} ;
|
||||
|
||||
GerundAP v = {
|
||||
s = v.s ++ de_s ; ----
|
||||
monoSyl = False ;
|
||||
hasAdA = True ; ---
|
||||
} ;
|
||||
|
||||
PastPartAP v = {
|
||||
s = v.s ++ de_s ;
|
||||
monoSyl = False ;
|
||||
hasAdA = True ; ---
|
||||
} ;
|
||||
|
||||
|
||||
---- PastPartAP v = v ; ----
|
||||
|
||||
{-
|
||||
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
|
||||
-}
|
||||
|
||||
PositAdVAdj a = {s = a.s} ;
|
||||
|
||||
|
||||
UseQuantPN q pn = {s = q.s ++ ge_s ++ pn.s} ; ---- ge
|
||||
|
||||
SlashV2V v a p vp =
|
||||
insertObj (ResChi.mkNP (a.s ++ p.s ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl))
|
||||
(predV v v.part) ** {c2 = v.c2 ; isPre = v.hasPrep} ; ---- aspect
|
||||
|
||||
{-
|
||||
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
|
||||
v.c3 ++
|
||||
vpi.s ! VVAux ! a)
|
||||
(predVc v) ;
|
||||
-}
|
||||
|
||||
---- TODO: find proper expressions for OSV and OVS in Chi
|
||||
PredVPosv np vp = PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
|
||||
PredVPovs np vp = PredVP np vp ; ---- (lin NP np) (lin VP vp) ; ----
|
||||
|
||||
|
||||
CompS s = insertObj s (predV copula []) ; ----
|
||||
|
||||
|
||||
CompQS qs = insertObj qs (predV copula []) ; ----
|
||||
CompVP ant p vp = insertObj (ss (infVP vp)) (predV copula []) ; ----
|
||||
|
||||
{-
|
||||
VPSlashVS vs vp =
|
||||
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs []) **
|
||||
{c2 = ""; gapInMiddle = False} ;
|
||||
|
||||
-}
|
||||
|
||||
PastPartRS ant pol vp = { ---- copied from PresPartRS
|
||||
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
|
||||
} ; ---- ??
|
||||
|
||||
|
||||
PresPartRS ant pol vp = { ---- copied from RelVP
|
||||
s = ant.s ++ pol.s ++ vp.prePart ++ useVerb vp.verb ! pol.p ! APlain ++ vp.compl ++ which_RP.s ---- aspect
|
||||
} ; ---- ??
|
||||
|
||||
ComplVV v a p vp = {
|
||||
verb = v ;
|
||||
compl = a.s ++ p.s ++ vp.topic ++ vp.prePart ++ useVerb vp.verb ! p.p ! APlain ++ vp.compl ; ---- aspect
|
||||
prePart, topic = []
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
s = np1.s ++ chcomma ++ np2.s
|
||||
} ;
|
||||
|
||||
AdAdV = cc2 ;
|
||||
|
||||
UttAdV adv = adv;
|
||||
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
--# -path=alltenses:.:../english
|
||||
concrete ParseEngFre of ParseEngAbs =
|
||||
TenseFre,
|
||||
NounFre - [PPartNP],
|
||||
AdjectiveFre,
|
||||
NumeralFre,
|
||||
SymbolFre [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
ConjunctionFre,
|
||||
VerbFre - [SlashV2V, PassV2, UseCopula, ComplVV],
|
||||
AdverbFre,
|
||||
PhraseFre,
|
||||
SentenceFre,
|
||||
QuestionFre,
|
||||
RelativeFre,
|
||||
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP],
|
||||
ExtraFre [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
|
||||
Temp, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
ClSlash, RCl, EmptyRelSlash],
|
||||
|
||||
DictEngFre **
|
||||
open MorphoFre, ResFre, ParadigmsFre, SyntaxFre, Prelude, (CR = CommonRomance) in {
|
||||
|
||||
flags literal=Symb ; coding = utf8 ;
|
||||
|
||||
lin
|
||||
ComplVV v ant p vp = insertComplement
|
||||
(\\a => prepCase v.c2.c ++ specVP vp ant p a) (predV v) ;
|
||||
|
||||
PPartNP np vp = heavyNP {
|
||||
s = \\c => (np.s ! c).comp ++
|
||||
(vp.s).s ! CR.VPart np.a.g np.a.n ++
|
||||
vp.comp ! np.a ++ vp.ext ! RPos ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
CompoundCN num noun cn = {
|
||||
s = \\n => num.s ! noun.g ++ glue (noun.s ! num.n) (cn.s ! n) ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
|
||||
DashCN noun1 noun2 = {
|
||||
s = \\n => noun1.s ! Sg ++ "-" ++ noun2.s ! n ;
|
||||
g = noun2.g
|
||||
} ;
|
||||
|
||||
GerundN v = {
|
||||
s = \\n => v.s ! VGer ;
|
||||
g = CR.Masc
|
||||
} ;
|
||||
|
||||
GerundAP v = {
|
||||
s = \\c => case c of
|
||||
{CR.AF gg nn => v.s ! CR.VGer;
|
||||
_ => "NONEXISTENT" };
|
||||
isPre = False} ;
|
||||
|
||||
PastPartAP v = {
|
||||
s = \\c => case c of
|
||||
{CR.AF gg nn => v.s ! CR.VPart gg nn ;
|
||||
_ => v.s ! CR.VPart CR.Masc Sg};
|
||||
isPre = False} ;
|
||||
|
||||
OrdCompar a = {s = \\c => a.s ! Compar ! AF c.g c.n} ;
|
||||
|
||||
PositAdVAdj a = {s = a.s ! Posit ! AA } ;
|
||||
|
||||
UseQuantPN q pn = heavyNP{
|
||||
s = \\c => q.s ! False ! Sg ! pn.g ! c ++
|
||||
pn.s ;
|
||||
a = CR.agrP3 pn.g Sg} ;
|
||||
|
||||
|
||||
SlashV2V v ant p vp =
|
||||
(insertComplement
|
||||
(\\a => prepCase v.c3.c ++ specVP vp ant p a)
|
||||
(predV v)) ** {c2 = v.c2} ;
|
||||
|
||||
-- PredVPosV np vp
|
||||
-- PredVPosv np vp TO DO : ask what they are ?
|
||||
|
||||
|
||||
|
||||
CompS s = {s = \\_ => "que" ++ s.s ! CR.Indic} ;
|
||||
CompVP ant pol vp = {s = \\a => specVP vp ant pol a} ;
|
||||
|
||||
|
||||
lin
|
||||
that_RP = which_RP ;
|
||||
|
||||
UttAdV adv = adv;
|
||||
|
||||
oper
|
||||
specVP : VP -> Ant -> Pol -> Agr -> Str = \vp,ant,pp,agr ->
|
||||
let
|
||||
iform = False ; ---- meaning: no clitics
|
||||
pol : CR.RPolarity = CR.RPos;
|
||||
inf = vp.s.s ! VInfin iform ; -- TO DO: fix anteriority
|
||||
neg = vp.neg ! pol ; --- Neg not in API
|
||||
obj = neg.p2 ++ vp.comp ! agr ++ vp.ext ! pol ; ---- pol
|
||||
refl = case vp.s.vtyp of {
|
||||
VRefl => reflPron agr.n agr.p Acc ; ---- case ?
|
||||
_ => []
|
||||
} ;
|
||||
in
|
||||
neg.p1 ++ clitInf iform (refl ++ vp.clit1 ++ vp.clit2 ++ vp.clit3) inf ++ obj ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,189 +0,0 @@
|
||||
--# -path=.:../english/:../abstract:../romance:alltenses:../translator
|
||||
concrete ParseFre of ParseEngAbs =
|
||||
TenseFre,
|
||||
-- CatFre,
|
||||
NounFre - [PPartNP],
|
||||
AdjectiveFre,
|
||||
NumeralFre,
|
||||
SymbolFre [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
ConjunctionFre,
|
||||
VerbFre - [SlashV2V, PassV2, UseCopula, ComplVV],
|
||||
AdverbFre,
|
||||
PhraseFre,
|
||||
SentenceFre,
|
||||
QuestionFre - [QuestCl, QuestIAdv], -- more variants here
|
||||
RelativeFre,
|
||||
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionFre,
|
||||
DocumentationFre,
|
||||
ExtraFre [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
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],
|
||||
|
||||
DictionaryFre **
|
||||
open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding = utf8 ;
|
||||
|
||||
-- overrides from Lang
|
||||
|
||||
lin
|
||||
QuestCl cl =
|
||||
{s = \\t,a,p => -- est-ce qu'il dort ?
|
||||
let cls = cl.s ! DDir ! t ! a ! p
|
||||
in table {
|
||||
QDir => "est-ce" ++ elisQue ++ cls ! Indic ;
|
||||
QIndir => subjIf ++ cls ! Indic
|
||||
}
|
||||
}
|
||||
| {s = \\t,a,p => -- dort-il ?
|
||||
let cls = cl.s ! DInv ! t ! a ! p
|
||||
in table {
|
||||
QDir => cls ! Indic ;
|
||||
QIndir => subjIf ++ cls ! Indic
|
||||
}
|
||||
}
|
||||
| G.QuestCl cl -- il dort ?
|
||||
;
|
||||
|
||||
|
||||
QuestIAdv iadv cl =
|
||||
G.QuestIAdv iadv cl -- où dort-il
|
||||
| {s = \\t,a,p,q => -- où est-ce qu'il dort
|
||||
let
|
||||
ord = DDir ;
|
||||
cls = cl.s ! ord ! t ! a ! p ! Indic ;
|
||||
why = iadv.s
|
||||
in why ++ "est-ce" ++ elisQue ++ cls
|
||||
} ;
|
||||
|
||||
lin
|
||||
-- missing from ExtraFre; should not really be there either
|
||||
|
||||
GenNP np =
|
||||
let denp = (np.s ! ResFre.genitive).ton in {
|
||||
s = \\_,_,_,_ => [] ;
|
||||
sp = \\_,_,_ => denp ;
|
||||
s2 = denp ;
|
||||
isNeg = False ;
|
||||
} ;
|
||||
|
||||
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
|
||||
|
||||
that_RP = which_RP ;
|
||||
|
||||
UncNeg = negativePol ;
|
||||
|
||||
-- lexical entries
|
||||
|
||||
---- another_Quant = mkQuantifier "autre" "autre" "autres" "autres" ;
|
||||
---- some_Quant = mkQuantifier "quelqu'un" "quelqu'une" "quelques-uns" "quelques-unes" ;
|
||||
---- anySg_Det = mkDeterminer "n'importe quel" "n'importe quelle" Sg False ; ---- also meaning "whichever" ?
|
||||
-- each_Det = SyntaxFre.every_Det ;
|
||||
|
||||
but_Subj = {s = "mais" ; m = Indic} ; ---- strange to have this as Subj
|
||||
|
||||
{-
|
||||
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 ;
|
||||
themselves_NP = regNP "themselves" plural ;
|
||||
-}
|
||||
|
||||
CompoundCN num noun cn = {
|
||||
s = \\n => cn.s ! n ++ elisDe ++ noun.s ! num.n ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
{-
|
||||
DashCN noun1 noun2 = {
|
||||
s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ;
|
||||
g = noun2.g
|
||||
} ;
|
||||
|
||||
GerundN v = {
|
||||
s = \\n,c => v.s ! VPresPart ;
|
||||
g = Neutr
|
||||
} ;
|
||||
|
||||
GerundAP v = {
|
||||
s = \\agr => v.s ! VPresPart ;
|
||||
isPre = True
|
||||
} ;
|
||||
-}
|
||||
|
||||
PastPartAP v = {
|
||||
s = table {
|
||||
AF g n => v.s ! VPart g n ;
|
||||
_ => v.s ! VPart Masc Sg ---- the adverb form
|
||||
} ;
|
||||
isPre = True
|
||||
} ;
|
||||
|
||||
{-
|
||||
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
|
||||
-}
|
||||
|
||||
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
|
||||
|
||||
{-
|
||||
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
|
||||
|
||||
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
|
||||
infVP v.typ vp ant.a p.p a)
|
||||
(predVc v) ;
|
||||
|
||||
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
|
||||
v.c3 ++
|
||||
vpi.s ! VVAux ! a)
|
||||
(predVc v) ;
|
||||
-}
|
||||
ComplVV v a p vp =
|
||||
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ; ---- a,p
|
||||
|
||||
---- TODO: find proper expressions for OSV and OVS in Fre
|
||||
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
|
||||
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
|
||||
|
||||
|
||||
CompS s = {s = \\_ => "de" ++ "que" ++ s.s ! Indic} ; ---- de ?
|
||||
|
||||
{-
|
||||
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
||||
infVP VVInf vp ant.a p.p a} ;
|
||||
|
||||
VPSlashVS vs vp =
|
||||
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
|
||||
{c2 = ""; gapInMiddle = False} ;
|
||||
|
||||
PastPartRS ant pol vps = {
|
||||
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
|
||||
c = npNom
|
||||
} ;
|
||||
|
||||
PresPartRS ant pol vp = {
|
||||
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
|
||||
c = npNom
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
|
||||
a = np1.a
|
||||
} ;
|
||||
|
||||
AdAdV = cc2 ;
|
||||
|
||||
UttAdV adv = adv;
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
--# -path=.:../abstract:../english:../hindustani:../translator
|
||||
concrete ParseHin of ParseEngAbs =
|
||||
TenseX - [AdN,Adv,SC,PPos,PNeg],
|
||||
-- TextX - [AdN,Adv,SC],
|
||||
CatHin,
|
||||
NounHin - [PPartNP],
|
||||
AdjectiveHin,
|
||||
NumeralHin,
|
||||
ConjunctionHin,
|
||||
VerbHin - [SlashV2V, PassV2, UseCopula, ComplVV, VPSlashPrep],
|
||||
AdverbHin,
|
||||
PhraseHin,
|
||||
SentenceHin,
|
||||
RelativeHin,
|
||||
QuestionHin,
|
||||
SymbolHin [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
-- StructuralHin,
|
||||
IdiomHin [NP, VP, Tense, Cl, ProgrVP, ExistNP],
|
||||
ExtraHin [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],
|
||||
DocumentationHin,
|
||||
DictionaryHin **
|
||||
open MorphoHin, ResHin, ParadigmsHin,CommonX, CommonHindustani, Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
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 ;
|
||||
themselves_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
|
||||
themself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Distant }; --regNP "themself" plural ;
|
||||
|
||||
CompoundCN num noun cn = {
|
||||
s = \\n,c => num.s ++ cn.s ! n ! c ++ noun.s ! num.n ! Dir;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
DashCN noun1 noun2 = {
|
||||
s = \\n,c => noun1.s ! n ! Dir ++ "-" ++ noun2.s ! n ! c ;
|
||||
g = noun2.g
|
||||
} ;
|
||||
|
||||
GerundN v = {
|
||||
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 = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ++ hwa (Ag g n Pers2_Casual) ;
|
||||
} ;
|
||||
|
||||
PastPartAP v = {
|
||||
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 = a.s ! Sg ! Masc ! Dir ! Compar ; n = Sg } ;
|
||||
|
||||
PositAdVAdj a = {s = a.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||
---------------
|
||||
--SlashV2V v p vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp ** {c2 = {s = sE ; c = VTrans}}; -- changed from VTransPost
|
||||
ComplVV v a p vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp ) VTrans; -- changed from VTransPost
|
||||
---------------
|
||||
|
||||
|
||||
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 ++
|
||||
infVP v.typ vp a)
|
||||
(predVc v) ;
|
||||
|
||||
ComplPredVP 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 ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ;
|
||||
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
|
||||
}
|
||||
} ;
|
||||
-}
|
||||
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
||||
infVP False vp a} ; -- check for vp.isAux
|
||||
|
||||
that_RP = {
|
||||
s = \\_,_ => "कि" ;
|
||||
a = RNoAg
|
||||
} ;
|
||||
--no_RP = {
|
||||
-- s = \\_,_ => "" ;
|
||||
-- a = RNoAg
|
||||
-- } ;
|
||||
|
||||
CompS s = {s = \\_ => "कि" ++ s.s} ;
|
||||
-- CompVP vp = {s = \\a => infVP VVInf vp a} ;
|
||||
|
||||
lin
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
VPSlashPrep vp p = vp ** {c2 = {s = p.s!Masc ; c = VTrans}} ;
|
||||
|
||||
PastPartRS ant pol vps = {
|
||||
s = \\agr => (vps.s!VPTense VPPast agr).inf ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
PresPartRS ant pol vp = {
|
||||
s = \\agr => (vp.s!VPTense VPPres agr).inf ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
s = \\c => np1.s!NPC Dir ++ "," ++ np2.s ! c ;
|
||||
a = np2.a
|
||||
} ;
|
||||
|
||||
AdAdV = cc2 ;
|
||||
|
||||
UttAdV adv = adv;
|
||||
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
--# -path=alltenses
|
||||
concrete ParseSpa of ParseEngAbs =
|
||||
TenseSpa,
|
||||
-- CatSpa,
|
||||
NounSpa - [PPartNP],
|
||||
AdjectiveSpa,
|
||||
NumeralSpa,
|
||||
SymbolSpa [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
|
||||
ConjunctionSpa,
|
||||
VerbSpa - [SlashV2V, PassV2, UseCopula, ComplVV],
|
||||
AdverbSpa,
|
||||
PhraseSpa,
|
||||
SentenceSpa,
|
||||
QuestionSpa,
|
||||
RelativeSpa,
|
||||
IdiomSpa [NP, VP, Tense, Cl, ProgrVP, ExistNP],
|
||||
ExtraSpa [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],
|
||||
|
||||
DictEngSpa **
|
||||
open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding = utf8 ;
|
||||
|
||||
|
||||
lin
|
||||
-- missing from ExtraSpa; should not really be there either
|
||||
|
||||
GenNP np =
|
||||
let denp = (np.s ! ResSpa.genitive).ton in {
|
||||
s = \\_,_,_,_ => [] ;
|
||||
sp = \\_,_,_ => denp ;
|
||||
s2 = denp ;
|
||||
isNeg = False ;
|
||||
} ;
|
||||
|
||||
EmptyRelSlash slash = mkRCl which_RP (lin ClSlash slash) ;
|
||||
|
||||
that_RP = which_RP ;
|
||||
|
||||
UncNeg = negativePol ;
|
||||
|
||||
-- lexical entries
|
||||
|
||||
another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
|
||||
some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
|
||||
anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
|
||||
each_Det = SyntaxSpa.every_Det ;
|
||||
|
||||
but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
|
||||
|
||||
{-
|
||||
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 ;
|
||||
themselves_NP = regNP "themselves" plural ;
|
||||
-}
|
||||
|
||||
CompoundCN num noun cn = {
|
||||
s = \\n => cn.s ! n ++ "de" ++ noun.s ! num.n ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
{-
|
||||
DashCN noun1 noun2 = {
|
||||
s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ;
|
||||
g = noun2.g
|
||||
} ;
|
||||
|
||||
GerundN v = {
|
||||
s = \\n,c => v.s ! VPresPart ;
|
||||
g = Neutr
|
||||
} ;
|
||||
|
||||
GerundAP v = {
|
||||
s = \\agr => v.s ! VPresPart ;
|
||||
isPre = True
|
||||
} ;
|
||||
-}
|
||||
|
||||
PastPartAP v = {
|
||||
s = table {
|
||||
ASg g _ => v.s ! VPart g Sg ;
|
||||
APl g _ => v.s ! VPart g Pl ;
|
||||
_ => v.s ! VPart Masc Sg ---- the adverb form
|
||||
} ;
|
||||
isPre = True
|
||||
} ;
|
||||
|
||||
{-
|
||||
OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ;
|
||||
-}
|
||||
|
||||
PositAdVAdj a = {s = a.s ! Posit ! AA} ;
|
||||
|
||||
{-
|
||||
UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
|
||||
|
||||
SlashV2V v ant p vp = insertObjc (\\a => v.c3 ++ ant.s ++ p.s ++
|
||||
infVP v.typ vp ant.a p.p a)
|
||||
(predVc v) ;
|
||||
|
||||
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
|
||||
v.c3 ++
|
||||
vpi.s ! VVAux ! a)
|
||||
(predVc v) ;
|
||||
ComplVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
|
||||
infVP v.typ vp a.a p.p agr)
|
||||
(predVV v) ;
|
||||
-}
|
||||
|
||||
---- TODO: find proper expressions for OSV and OVS in Spa
|
||||
PredVPosv np vp = mkCl (lin NP np) (lin VP vp) ;
|
||||
PredVPovs np vp = mkCl (lin NP np) (lin VP vp) ;
|
||||
|
||||
|
||||
CompS s = {s = \\_ => "de" ++ "que" ++ s.s ! Indic} ; ---- de ?
|
||||
|
||||
{-
|
||||
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
||||
infVP VVInf vp ant.a p.p a} ;
|
||||
|
||||
VPSlashVS vs vp =
|
||||
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
|
||||
{c2 = ""; gapInMiddle = False} ;
|
||||
|
||||
PastPartRS ant pol vps = {
|
||||
s = \\agr => vps.ad ++ vps.ptp ++ vps.s2 ! agr ;
|
||||
c = npNom
|
||||
} ;
|
||||
|
||||
PresPartRS ant pol vp = {
|
||||
s = \\agr => vp.ad ++ vp.prp ++ vp.s2 ! agr ;
|
||||
c = npNom
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
|
||||
a = np1.a
|
||||
} ;
|
||||
|
||||
AdAdV = cc2 ;
|
||||
|
||||
UttAdV adv = adv;
|
||||
|
||||
-}
|
||||
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
--# -path=.:../abstract:../english:../hindustani
|
||||
concrete ParseUrd of ParseEngAbs =
|
||||
TenseX - [AdN,Adv,SC,PPos,PNeg],
|
||||
-- TextX - [AdN,Adv,SC],
|
||||
CatUrd,
|
||||
NounUrd - [PPartNP],
|
||||
AdjectiveUrd,
|
||||
NumeralUrd,
|
||||
ConjunctionUrd,
|
||||
VerbUrd - [PassV2,ComplVV],
|
||||
AdverbUrd,
|
||||
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,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],
|
||||
DictEngUrd **
|
||||
-- UNDictUrd **
|
||||
open MorphoUrd, ResUrd, ParadigmsUrd,CommonX, CommonHindustani, Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
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 ;
|
||||
themselves_NP = {s = \\_ => kwd ; a = Ag Masc Pl Pers3_Distant }; --regNP "themself" plural ;
|
||||
themself_NP = {s = \\_ => kwd ; a = Ag Masc Sg Pers3_Distant }; --regNP "themself" plural ;
|
||||
|
||||
CompoundCN num noun cn = {
|
||||
s = \\n,c => num.s ++ cn.s ! n ! c ++ noun.s ! num.n ! Dir;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
DashCN noun1 noun2 = {
|
||||
s = \\n,c => noun1.s ! n ! Dir ++ "-" ++ noun2.s ! n ! c ;
|
||||
g = noun2.g
|
||||
} ;
|
||||
|
||||
GerundN v = {
|
||||
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 = \\n,g,_,_ => v.cvp ++ v.s ! VF Imperf Pers2_Casual n g ++ hwa (Ag g n Pers2_Casual) ;
|
||||
} ;
|
||||
|
||||
PastPartAP v = {
|
||||
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 } ;
|
||||
|
||||
PositAdVAdj a = {s = a.s ! Sg ! Masc ! Dir ! Posit} ;
|
||||
---------------
|
||||
--SlashV2V v p vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp ** {c2 = {s = sE ; c = VTrans}}; -- changed from VTransPost
|
||||
ComplVV v a p vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp ) VTrans; -- changed from VTransPost
|
||||
---------------
|
||||
|
||||
|
||||
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 ++
|
||||
infVP v.typ vp a)
|
||||
(predVc v) ;
|
||||
|
||||
ComplPredVP 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 ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ;
|
||||
OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf
|
||||
}
|
||||
} ;
|
||||
-}
|
||||
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
||||
infVP False vp a} ; -- check for vp.isAux
|
||||
|
||||
that_RP = {
|
||||
s = \\_,_ => "کہ" ;
|
||||
a = RNoAg
|
||||
} ;
|
||||
--no_RP = {
|
||||
-- s = \\_,_ => "" ;
|
||||
-- a = RNoAg
|
||||
-- } ;
|
||||
|
||||
CompS s = {s = \\_ => "کہ" ++ s.s} ;
|
||||
-- CompVP vp = {s = \\a => infVP VVInf vp a} ;
|
||||
|
||||
lin
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ; -- contracted: don't
|
||||
UncNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
--VPSlashPrep vp p = vp ** {c2 = {s = p.s!Masc ; c = VTrans}} ;
|
||||
|
||||
PastPartRS ant pol vps = {
|
||||
s = \\agr => (vps.s!VPTense VPPast agr).inf ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
PresPartRS ant pol vp = {
|
||||
s = \\agr => (vp.s!VPTense VPPres agr).inf ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
ApposNP np1 np2 = {
|
||||
s = \\c => np1.s!NPC Dir ++ "," ++ np2.s ! c ;
|
||||
a = np2.a
|
||||
} ;
|
||||
|
||||
AdAdV = cc2 ;
|
||||
|
||||
UttAdV adv = adv;
|
||||
|
||||
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user