forked from GitHub/gf-core
Latvian: if ~object~ is a Pron and is not modified by a RCl, it is more natural/neutral if it precedes the verb. For this, the lin types of NP and Adv are extended with a boolean field isPron (in addition to the previously introduced isRel field that indicates whether a CN or NP is modified by a RCl).
This commit is contained in:
@@ -17,8 +17,13 @@ lin
|
|||||||
|
|
||||||
UseComparA a = { s = \\d,g,n,c => a.s ! (AAdj Compar d g n c) } ;
|
UseComparA a = { s = \\d,g,n,c => a.s ! (AAdj Compar d g n c) } ;
|
||||||
|
|
||||||
|
-- A2 -> NP -> AP
|
||||||
|
-- e.g. "married to her"
|
||||||
ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num)
|
s = \\d,g,n,c => case np.isPron of {
|
||||||
|
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ;
|
||||||
|
True => a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! (a.prep.c ! n) } ;
|
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! (a.prep.c ! n) } ;
|
||||||
@@ -36,4 +41,13 @@ lin
|
|||||||
|
|
||||||
UseA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) } ;
|
UseA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) } ;
|
||||||
|
|
||||||
|
-- AP -> Adv -> AP
|
||||||
|
-- e.g. "warm by nature"
|
||||||
|
AdvAP ap adv = {
|
||||||
|
s = \\d,g,n,c => case adv.isPron of {
|
||||||
|
False => ap.s ! d ! g ! n ! c ++ adv.s ;
|
||||||
|
True => adv.s ++ ap.s ! d ! g ! n ! c
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,21 +9,37 @@ flags
|
|||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PositAdvAdj a = { s = a.s ! (AAdv Posit) } ;
|
-- A -> Adv
|
||||||
|
-- e.g. "warmly"
|
||||||
|
PositAdvAdj a = {s = a.s ! (AAdv Posit) ; isPron = False} ;
|
||||||
|
|
||||||
|
-- Prep -> NP -> Adv
|
||||||
|
-- e.g. "in the house"
|
||||||
|
-- FIXME: postpozīcijas prievārdi
|
||||||
|
PrepNP prep np = {s = prep.s ++ np.s ! (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
||||||
|
|
||||||
|
-- CAdv -> A -> NP -> Adv
|
||||||
|
-- e.g. "more warmly than John"
|
||||||
-- TODO: vajag arī 'ātrāks par Jāni' un 'ātrāks nekā Jānis' pie more_CAdv
|
-- TODO: vajag arī 'ātrāks par Jāni' un 'ātrāks nekā Jānis' pie more_CAdv
|
||||||
-- TODO: vai te tiešām veido 'ātrāk par Jāni'? kurš ir pareizais adverbs? nevis 'ātrāks par Jāni'?
|
-- TODO: vai te tiešām veido 'ātrāk par Jāni'? kurš ir pareizais adverbs? nevis 'ātrāks par Jāni'?
|
||||||
ComparAdvAdj cadv a np = { s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ np.s ! Nom } ;
|
ComparAdvAdj cadv a np = {s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ np.s ! Nom ; isPron = False} ;
|
||||||
|
|
||||||
ComparAdvAdjS cadv a s = { s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ s.s } ;
|
-- CAdv -> A -> S -> Adv
|
||||||
|
-- e.g. "more warmly than he runs"
|
||||||
|
ComparAdvAdjS cadv a s = {s = cadv.s ++ a.s ! (AAdv cadv.deg) ++ cadv.prep ++ s.s ; isPron = False} ;
|
||||||
|
|
||||||
-- FIXME: postpozīcijas prievārdi
|
-- AdA -> Adv -> Adv
|
||||||
PrepNP prep np = { s = prep.s ++ np.s ! (prep.c ! (fromAgr np.agr).num) } ;
|
-- e.g. "very quickly"
|
||||||
|
AdAdv ada adv = {s = ada.s ++ adv.s ; isPron = False} ;
|
||||||
|
|
||||||
AdAdv = cc2 ;
|
-- TODO: PositAdAAdj : A -> AdA
|
||||||
|
|
||||||
SubjS = cc2 ;
|
-- Subj -> S -> Adv
|
||||||
|
-- e.g. "when she sleeps"
|
||||||
|
SubjS subj s = {s = subj.s ++ s.s ; isPron = False} ;
|
||||||
|
|
||||||
|
-- CAdv -> AdN
|
||||||
|
-- e.g. "less (than five)"
|
||||||
AdnCAdv cadv = {
|
AdnCAdv cadv = {
|
||||||
s = case cadv.deg of {
|
s = case cadv.deg of {
|
||||||
Posit => cadv.s ++ cadv.prep ;
|
Posit => cadv.s ++ cadv.prep ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:abstract:common:prelude
|
--# -path=.:abstract:common:prelude
|
||||||
|
|
||||||
concrete CatLav of Cat = CommonX - [CAdv, Voc] ** open ResLav, Prelude in {
|
concrete CatLav of Cat = CommonX - [Adv, CAdv, Voc] ** open ResLav, Prelude in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
|
|
||||||
@@ -11,35 +11,35 @@ lincat
|
|||||||
|
|
||||||
-- Sentences and clauses
|
-- Sentences and clauses
|
||||||
|
|
||||||
S, QS = { s : Str } ;
|
S, QS = {s : Str} ;
|
||||||
|
|
||||||
RS = { s : Agreement => Str } ;
|
RS = {s : Agreement => Str} ;
|
||||||
|
|
||||||
Cl = { s : VMood => Polarity => Str } ;
|
Cl = {s : VMood => Polarity => Str} ;
|
||||||
|
|
||||||
ClSlash = { s : VMood => Polarity => Str ; prep : Preposition } ;
|
ClSlash = {s : VMood => Polarity => Str ; prep : Preposition} ;
|
||||||
|
|
||||||
SSlash = { s : Str ; prep : Preposition } ;
|
SSlash = {s : Str ; prep : Preposition} ;
|
||||||
|
|
||||||
Imp = { s : Polarity => Number => Str } ;
|
Imp = {s : Polarity => Number => Str} ;
|
||||||
|
|
||||||
-- Questions and interrogatives
|
-- Questions and interrogatives
|
||||||
|
|
||||||
QCl = { s : VMood => Polarity => Str } ;
|
QCl = {s : VMood => Polarity => Str} ;
|
||||||
|
|
||||||
IP = { s : Case => Str ; num : Number } ;
|
IP = {s : Case => Str ; num : Number} ;
|
||||||
|
|
||||||
-- TODO: IComp = { s : Str ; agr : Agreement } ;
|
-- TODO: IComp = {s : Str ; agr : Agreement} ;
|
||||||
|
|
||||||
IDet = { s : Gender => Str ; num : Number } ;
|
IDet = {s : Gender => Str ; num : Number} ;
|
||||||
|
|
||||||
IQuant = { s : Gender => Number => Str } ;
|
IQuant = {s : Gender => Number => Str} ;
|
||||||
|
|
||||||
-- Relative clauses and pronouns
|
-- Relative clauses and pronouns
|
||||||
|
|
||||||
RCl = { s : VMood => Polarity => Agreement => Str } ;
|
RCl = {s : VMood => Polarity => Agreement => Str} ;
|
||||||
|
|
||||||
RP = { s : Gender => Case => Str } ;
|
RP = {s : Gender => Case => Str} ;
|
||||||
|
|
||||||
-- Verb phrases
|
-- Verb phrases
|
||||||
|
|
||||||
@@ -47,43 +47,43 @@ lincat
|
|||||||
|
|
||||||
VPSlash = ResLav.VPSlash ;
|
VPSlash = ResLav.VPSlash ;
|
||||||
|
|
||||||
Comp = { s : Agreement => Str } ;
|
Comp = {s : Agreement => Str} ;
|
||||||
|
|
||||||
-- Adjectival phrases
|
-- Adjectival phrases
|
||||||
|
|
||||||
AP = { s : Definiteness => Gender => Number => Case => Str } ;
|
AP = {s : Definiteness => Gender => Number => Case => Str} ;
|
||||||
|
|
||||||
-- Nouns and noun phrases
|
-- Nouns and noun phrases
|
||||||
|
|
||||||
CN = { s : Definiteness => Number => Case => Str ; gend : Gender ; isRel : Bool } ;
|
CN = {s : Definiteness => Number => Case => Str ; gend : Gender ; isRel : Bool} ;
|
||||||
|
|
||||||
NP = { s : Case => Str ; agr : Agreement ; pol : Polarity ; isRel : Bool } ;
|
NP = {s : Case => Str ; agr : Agreement ; pol : Polarity ; isRel : Bool ; isPron : Bool} ;
|
||||||
|
|
||||||
Pron = Pronoun ;
|
Pron = Pronoun ;
|
||||||
|
|
||||||
Det = { s : Gender => Case => Str ; num : Number ; defin : Definiteness ; pol : Polarity } ;
|
Det = {s : Gender => Case => Str ; num : Number ; defin : Definiteness ; pol : Polarity} ;
|
||||||
|
|
||||||
Predet = { s : Gender => Str } ;
|
Predet = {s : Gender => Str} ;
|
||||||
|
|
||||||
Quant = { s : Gender => Number => Case => Str ; defin : Definiteness ; pol : Polarity } ;
|
Quant = {s : Gender => Number => Case => Str ; defin : Definiteness ; pol : Polarity} ;
|
||||||
|
|
||||||
Num = { s : Gender => Case => Str ; num : Number ; hasCard : Bool } ;
|
Num = {s : Gender => Case => Str ; num : Number ; hasCard : Bool} ;
|
||||||
|
|
||||||
Card = { s : Gender => Case => Str ; num : Number } ;
|
Card = {s : Gender => Case => Str ; num : Number} ;
|
||||||
|
|
||||||
Ord = { s : Gender => Case => Str } ;
|
Ord = {s : Gender => Case => Str} ;
|
||||||
|
|
||||||
-- Numerals
|
-- Numerals
|
||||||
|
|
||||||
Numeral = { s : CardOrd => Gender => Case => Str ; num : Number } ;
|
Numeral = {s : CardOrd => Gender => Case => Str ; num : Number} ;
|
||||||
|
|
||||||
Digits = { s : CardOrd => Str ; num : Number } ;
|
Digits = {s : CardOrd => Str ; num : Number} ;
|
||||||
|
|
||||||
-- Structural words
|
-- Structural words
|
||||||
|
|
||||||
Conj = { s1, s2 : Str ; num : Number } ;
|
Conj = {s1, s2 : Str ; num : Number} ;
|
||||||
|
|
||||||
Subj = { s : Str } ;
|
Subj = {s : Str} ;
|
||||||
|
|
||||||
Prep = Preposition ;
|
Prep = Preposition ;
|
||||||
|
|
||||||
@@ -91,28 +91,30 @@ lincat
|
|||||||
|
|
||||||
V, VV, VQ, VA = Verb ;
|
V, VV, VQ, VA = Verb ;
|
||||||
|
|
||||||
V2, V2V, V2Q, V2A = Verb ** { rightVal : Preposition } ;
|
V2, V2V, V2Q, V2A = Verb ** {rightVal : Preposition} ;
|
||||||
|
|
||||||
V3 = Verb ** { rightVal1, rightVal2 : Preposition } ;
|
V3 = Verb ** {rightVal1, rightVal2 : Preposition} ;
|
||||||
|
|
||||||
VS = Verb ** { conj : Subj } ;
|
VS = Verb ** {conj : Subj} ;
|
||||||
|
|
||||||
V2S = Verb ** { conj : Subj ; rightVal : Preposition } ;
|
V2S = Verb ** {conj : Subj ; rightVal : Preposition} ;
|
||||||
|
|
||||||
A = Adjective ;
|
A = Adjective ;
|
||||||
|
|
||||||
A2 = Adjective ** { prep : Preposition } ;
|
A2 = Adjective ** {prep : Preposition} ;
|
||||||
|
|
||||||
N = Noun ;
|
N = Noun ;
|
||||||
|
|
||||||
N2 = Noun ** { prep : Preposition ; isPre : Bool } ;
|
N2 = Noun ** {prep : Preposition ; isPre : Bool} ;
|
||||||
|
|
||||||
N3 = Noun ** { prep1, prep2 : Preposition ; isPre1, isPre2 : Bool } ;
|
N3 = Noun ** {prep1, prep2 : Preposition ; isPre1, isPre2 : Bool} ;
|
||||||
|
|
||||||
PN = ProperNoun ;
|
PN = ProperNoun ;
|
||||||
|
|
||||||
-- Overriden from CommonX
|
-- Overriden from CommonX
|
||||||
|
|
||||||
CAdv = { s, prep : Str ; deg : Degree } ;
|
Adv = {s : Str ; isPron : Bool} ;
|
||||||
|
|
||||||
|
CAdv = {s, prep : Str ; deg : Degree} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,17 +14,22 @@ lin
|
|||||||
|
|
||||||
ConjS = conjunctDistrSS ;
|
ConjS = conjunctDistrSS ;
|
||||||
|
|
||||||
ConjAdv = conjunctDistrSS ;
|
ConjRS conj ss = conjunctDistrTable Agreement conj ss ;
|
||||||
|
|
||||||
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
|
||||||
agr = toAgr (fromAgr ss.agr).pers (conjNumber (fromAgr ss.agr).num conj.num) (fromAgr ss.agr).gend;
|
|
||||||
pol = Pos ;
|
|
||||||
isRel = False
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable4 Definiteness Gender Number Case conj ss ;
|
ConjAP conj ss = conjunctDistrTable4 Definiteness Gender Number Case conj ss ;
|
||||||
|
|
||||||
ConjRS conj ss = conjunctDistrTable Agreement conj ss ;
|
-- Conj -> [NP] -> NP
|
||||||
|
-- e.g. "she or we"
|
||||||
|
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||||
|
agr = toAgr (fromAgr ss.agr).pers (conjNumber (fromAgr ss.agr).num conj.num) (fromAgr ss.agr).gend;
|
||||||
|
pol = Pos ;
|
||||||
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Conj -> [Adv] -> Adv
|
||||||
|
-- e.g. "here or there"
|
||||||
|
ConjAdv or xs = (conjunctDistrSS or xs) ** {isPron = False};
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's:
|
-- These fun's are generated from the list cat's:
|
||||||
BaseS = twoSS ;
|
BaseS = twoSS ;
|
||||||
@@ -43,10 +48,13 @@ lin
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|
||||||
[S] = { s1, s2 : Str } ;
|
[S] = {s1, s2 : Str} ;
|
||||||
[Adv] = { s1, s2 : Str } ;
|
[RS] = {s1, s2 : Agreement => Str} ;
|
||||||
[NP] = { s1, s2 : Case => Str ; agr : Agreement } ;
|
[NP] = {s1, s2 : Case => Str ; agr : Agreement} ;
|
||||||
[AP] = { s1, s2 : Definiteness => Gender => Number => Case => Str } ;
|
[AP] = {s1, s2 : Definiteness => Gender => Number => Case => Str} ;
|
||||||
[RS] = { s1, s2 : Agreement => Str } ;
|
[Adv] = {s1, s2 : Str} ;
|
||||||
|
-- TODO: [AdV]{2}
|
||||||
|
-- TODO: [IAdv]{2}
|
||||||
|
-- TODO: [CN] {2}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ concrete GrammarLav of Grammar =
|
|||||||
RelativeLav,
|
RelativeLav,
|
||||||
ConjunctionLav,
|
ConjunctionLav,
|
||||||
PhraseLav,
|
PhraseLav,
|
||||||
TextX - [CAdv],
|
TextX - [Adv,CAdv],
|
||||||
StructuralLav,
|
StructuralLav,
|
||||||
IdiomLav,
|
IdiomLav,
|
||||||
TenseX - [CAdv]
|
TenseX - [Adv,CAdv]
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
|
|||||||
@@ -14,86 +14,96 @@ lin
|
|||||||
-- Det -> CN -> NP
|
-- Det -> CN -> NP
|
||||||
-- e.g. 'the man'
|
-- e.g. 'the man'
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\c => det.s ! cn.gend ! c ++ cn.s ! det.defin ! det.num ! c ;
|
s = \\c => det.s ! cn.gend ! c ++ cn.s ! det.defin ! det.num ! c ;
|
||||||
agr = AgrP3 det.num cn.gend ;
|
agr = AgrP3 det.num cn.gend ;
|
||||||
pol = det.pol ;
|
pol = det.pol ;
|
||||||
isRel = cn.isRel
|
isRel = cn.isRel ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- PN -> NP
|
-- PN -> NP
|
||||||
-- e.g. 'John'
|
-- e.g. 'John'
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = pn.s ;
|
s = pn.s ;
|
||||||
agr = AgrP3 pn.num pn.gend ;
|
agr = AgrP3 pn.num pn.gend ;
|
||||||
pol = Pos ;
|
pol = Pos ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Pron -> NP
|
-- Pron -> NP
|
||||||
-- e.g. 'he'
|
-- e.g. 'he'
|
||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = pron.s ;
|
s = pron.s ;
|
||||||
agr = pron.agr ;
|
agr = pron.agr ;
|
||||||
pol = pron.pol ;
|
pol = pron.pol ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Predet -> NP -> NP
|
-- Predet -> NP -> NP
|
||||||
-- e.g. 'only the man'
|
-- e.g. 'only the man'
|
||||||
PredetNP predet np = {
|
PredetNP predet np = {
|
||||||
s = \\c => predet.s ! (fromAgr np.agr).gend ++ np.s ! c ;
|
s = \\c => predet.s ! (fromAgr np.agr).gend ++ np.s ! c ;
|
||||||
agr = np.agr ;
|
agr = np.agr ;
|
||||||
pol = np.pol ;
|
pol = np.pol ;
|
||||||
isRel = np.isRel
|
isRel = np.isRel ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- NP -> V2 -> NP
|
-- NP -> V2 -> NP
|
||||||
-- e.g. 'the man seen'
|
-- e.g. 'the man seen'
|
||||||
PPartNP np v2 = {
|
PPartNP np v2 = {
|
||||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num c) ++ np.s ! c ;
|
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num c) ++ np.s ! c ;
|
||||||
agr = np.agr ;
|
agr = np.agr ;
|
||||||
pol = np.pol ;
|
pol = np.pol ;
|
||||||
isRel = np.isRel
|
isRel = np.isRel ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- NP -> Adv -> NP
|
-- NP -> Adv -> NP
|
||||||
-- e.g. 'Paris today'
|
-- e.g. 'Paris today'
|
||||||
AdvNP np adv = {
|
AdvNP np adv = {
|
||||||
s = \\c => np.s ! c ++ adv.s ;
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
agr = np.agr ;
|
agr = np.agr ;
|
||||||
pol = np.pol ;
|
pol = np.pol ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- NP -> RS -> NP
|
-- NP -> RS -> NP
|
||||||
-- e.g. 'Paris, which is here'
|
-- e.g. 'Paris, which is here'
|
||||||
RelNP np rs = {
|
RelNP np rs = {
|
||||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.agr ;
|
s = \\c => np.s ! c ++ "," ++ rs.s ! np.agr ;
|
||||||
agr = np.agr ;
|
agr = np.agr ;
|
||||||
pol = np.pol ;
|
pol = np.pol ;
|
||||||
isRel = True
|
isRel = True ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- CN -> NP
|
-- CN -> NP
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = cn.s ! Indef ! Sg ; -- FIXME: bet 'šis alus'? un 'zaļš alus' vs. 'zaļais alus'?
|
s = cn.s ! Indef ! Sg ; -- FIXME: bet 'šis alus'? un 'zaļš alus' vs. 'zaļais alus'?
|
||||||
agr = AgrP3 Sg cn.gend ;
|
agr = AgrP3 Sg cn.gend ;
|
||||||
pol = Pos ;
|
pol = Pos ;
|
||||||
isRel = cn.isRel
|
isRel = cn.isRel ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Det -> NP
|
-- Det -> NP
|
||||||
-- e.g. 'these five'
|
-- e.g. 'these five'
|
||||||
DetNP det = {
|
DetNP det = {
|
||||||
s = \\c => det.s ! Masc ! c ;
|
s = \\c => det.s ! Masc ! c ;
|
||||||
agr = AgrP3 det.num Masc ;
|
agr = AgrP3 det.num Masc ;
|
||||||
pol = det.pol ;
|
pol = det.pol ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} | {
|
} | {
|
||||||
s = \\c => det.s ! Fem ! c ;
|
s = \\c => det.s ! Fem ! c ;
|
||||||
agr = AgrP3 det.num Fem ;
|
agr = AgrP3 det.num Fem ;
|
||||||
pol = det.pol ;
|
pol = det.pol ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Determiners
|
-- Determiners
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ oper
|
|||||||
|
|
||||||
-- Adverbs
|
-- Adverbs
|
||||||
|
|
||||||
mkAdv : Str -> Adv = \x -> lin Adv (ss x) ;
|
mkAdv : Str -> Adv = \x -> lin Adv {s = x ; isPron = False} ;
|
||||||
mkAdV : Str -> AdV = \x -> lin AdV (ss x) ;
|
mkAdV : Str -> AdV = \x -> lin AdV (ss x) ;
|
||||||
mkAdA : Str -> AdA = \x -> lin AdA (ss x) ;
|
mkAdA : Str -> AdA = \x -> lin AdA (ss x) ;
|
||||||
mkAdN : Str -> AdN = \x -> lin AdN (ss x) ;
|
mkAdN : Str -> AdN = \x -> lin AdN (ss x) ;
|
||||||
|
|||||||
@@ -28,15 +28,19 @@ oper
|
|||||||
}
|
}
|
||||||
in lin RCl {
|
in lin RCl {
|
||||||
s = \\mood,pol,agr =>
|
s = \\mood,pol,agr =>
|
||||||
case mood of { -- subject
|
let verb : Str = case subjInTopic of {
|
||||||
|
True => buildVerb vp.v mood pol (AgrP3 (fromAgr agr).num (fromAgr agr).gend) Pos vp.rightPol ;
|
||||||
|
False => buildVerb vp.v mood pol vp.rightAgr Pos vp.rightPol
|
||||||
|
} in
|
||||||
|
case mood of { -- subject
|
||||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||||
_ => rp.s ! Masc ! vp.leftVal
|
_ => rp.s ! Masc ! vp.leftVal
|
||||||
} ++
|
} ++
|
||||||
case subjInTopic of { -- verb
|
case vp.objPron of {
|
||||||
True => buildVerb vp.v mood pol (AgrP3 (fromAgr agr).num (fromAgr agr).gend) Pos vp.rightPol ;
|
False => verb ++ vp.compl ! agr ;
|
||||||
False => buildVerb vp.v mood pol vp.rightAgr Pos vp.rightPol
|
True => (vp.compl ! agr ++ verb) --| (verb ++ vp.compl ! agr)
|
||||||
} ++
|
-- FIXME: the object should be separated from other complements that should remain on the right side
|
||||||
vp.compl ! agr -- object(s), complements, adverbial modifiers
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|||||||
@@ -65,17 +65,17 @@ param
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
Noun : Type = { s : Number => Case => Str ; gend : Gender } ;
|
Noun : Type = {s : Number => Case => Str ; gend : Gender} ;
|
||||||
|
|
||||||
ProperNoun : Type = { s : Case => Str ; gend : Gender ; num : Number } ;
|
ProperNoun : Type = {s : Case => Str ; gend : Gender ; num : Number} ;
|
||||||
|
|
||||||
Pronoun : Type = { s : Case => Str ; agr : Agreement ; poss : Gender => Number => Case => Str ; pol : Polarity } ;
|
Pronoun : Type = {s : Case => Str ; agr : Agreement ; poss : Gender => Number => Case => Str ; pol : Polarity} ;
|
||||||
|
|
||||||
Adjective : Type = { s : AForm => Str } ;
|
Adjective : Type = {s : AForm => Str} ;
|
||||||
|
|
||||||
Preposition : Type = { s : Str ; c : Number => Case } ;
|
Preposition : Type = {s : Str ; c : Number => Case} ;
|
||||||
|
|
||||||
Verb : Type = { s : Polarity => VForm => Str ; leftVal : Case } ;
|
Verb : Type = {s : Polarity => VForm => Str ; leftVal : Case} ;
|
||||||
|
|
||||||
VP : Type = {
|
VP : Type = {
|
||||||
v : Verb ;
|
v : Verb ;
|
||||||
@@ -83,34 +83,36 @@ oper
|
|||||||
voice : Voice ;
|
voice : Voice ;
|
||||||
leftVal : Case ; -- the left valence (typically, the subject)
|
leftVal : Case ; -- the left valence (typically, the subject)
|
||||||
rightAgr : Agreement ; -- for the potential subject-verb agreement (the subject can be on the right side)
|
rightAgr : Agreement ; -- for the potential subject-verb agreement (the subject can be on the right side)
|
||||||
rightPol : Polarity -- for the potential double negation
|
rightPol : Polarity ; -- for the potential double negation
|
||||||
|
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlash : Type = VP ** { rightVal : Preposition } ; -- the right valence (typically, the object)
|
VPSlash : Type = VP ** {rightVal : Preposition} ; -- the right valence (typically, the object)
|
||||||
|
|
||||||
buildVP : VP -> Polarity -> VForm -> Agreement -> Str = \vp,pol,vf,agr ->
|
buildVP : VP -> Polarity -> VForm -> Agreement -> Str = \vp,pol,vf,agr ->
|
||||||
vp.v.s ! pol ! vf ++ vp.compl ! agr ;
|
vp.v.s ! pol ! vf ++ vp.compl ! agr ;
|
||||||
|
|
||||||
insertObj : (Agreement => Str) -> VP -> VP = \obj,vp -> {
|
insertObj : (Agreement => Str) -> Bool -> Bool -> VP -> VP = \obj,isPron,isPre,vp -> {
|
||||||
v = vp.v ;
|
v = vp.v ;
|
||||||
compl = \\agr => vp.compl ! agr ++ obj ! agr ;
|
compl = \\agr => case isPre of {
|
||||||
|
False => vp.compl ! agr ++ obj ! agr ;
|
||||||
|
True => obj ! agr ++ vp.compl ! agr
|
||||||
|
} ;
|
||||||
voice = vp.voice ;
|
voice = vp.voice ;
|
||||||
leftVal = vp.leftVal ;
|
leftVal = vp.leftVal ;
|
||||||
rightAgr = vp.rightAgr ;
|
rightAgr = vp.rightAgr ;
|
||||||
rightPol = vp.rightPol
|
rightPol = vp.rightPol ;
|
||||||
|
objPron = isPron
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjPre : (Agreement => Str) -> VP -> VP = \obj,vp -> {
|
insertObjReg : (Agreement => Str) -> Bool -> VP -> VP = \obj,isPron,vp ->
|
||||||
v = vp.v ;
|
insertObj obj isPron False vp ;
|
||||||
compl = \\agr => obj ! agr ++ vp.compl ! agr ;
|
|
||||||
voice = vp.voice ;
|
insertObjPre : (Agreement => Str) -> VP -> VP = \obj,vp ->
|
||||||
leftVal = vp.leftVal ;
|
insertObj obj True True vp ;
|
||||||
rightAgr = vp.rightAgr ;
|
|
||||||
rightPol = vp.rightPol
|
|
||||||
} ;
|
|
||||||
|
|
||||||
insertObjSlash : (Agreement => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
insertObjSlash : (Agreement => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||||
insertObj obj vp ** { rightVal = vp.rightVal } ;
|
insertObj obj vp.objPron False vp ** {rightVal = vp.rightVal} ;
|
||||||
|
|
||||||
getInf : Verb -> Str = \v -> v.s ! Pos ! VInf ;
|
getInf : Verb -> Str = \v -> v.s ! Pos ! VInf ;
|
||||||
|
|
||||||
@@ -121,11 +123,11 @@ oper
|
|||||||
P3 => AgrP3 num gend
|
P3 => AgrP3 num gend
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
fromAgr : Agreement -> { pers : Person ; num : Number ; gend : Gender } = \agr ->
|
fromAgr : Agreement -> {pers : Person ; num : Number ; gend : Gender} = \agr ->
|
||||||
case agr of {
|
case agr of {
|
||||||
AgrP1 num gend => { pers = P1 ; num = num ; gend = gend } ;
|
AgrP1 num gend => {pers = P1 ; num = num ; gend = gend} ;
|
||||||
AgrP2 num gend => { pers = P2 ; num = num ; gend = gend } ;
|
AgrP2 num gend => {pers = P2 ; num = num ; gend = gend} ;
|
||||||
AgrP3 num gend => { pers = P3 ; num = num ; gend = gend }
|
AgrP3 num gend => {pers = P3 ; num = num ; gend = gend}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjAgr : Agreement -> Agreement -> Agreement = \agr1,agr2 ->
|
conjAgr : Agreement -> Agreement -> Agreement = \agr1,agr2 ->
|
||||||
|
|||||||
@@ -32,12 +32,13 @@ lin
|
|||||||
SlashVS np vs sslash = mkClause
|
SlashVS np vs sslash = mkClause
|
||||||
np
|
np
|
||||||
(lin VP {
|
(lin VP {
|
||||||
v = vs ;
|
v = vs ;
|
||||||
compl = \\_ => "," ++ vs.conj.s ++ sslash.s ;
|
compl = \\_ => "," ++ vs.conj.s ++ sslash.s ;
|
||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = vs.leftVal ;
|
leftVal = vs.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
}) ** { prep = sslash.prep } ;
|
}) ** { prep = sslash.prep } ;
|
||||||
|
|
||||||
-- ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
|
-- ComplVS v s = { v = v ; compl = \\_ => "," ++ v.subj.s ++ s.s } ;
|
||||||
@@ -74,13 +75,25 @@ oper
|
|||||||
}
|
}
|
||||||
in lin Cl {
|
in lin Cl {
|
||||||
s = \\mood,pol =>
|
s = \\mood,pol =>
|
||||||
case mood of { -- subject
|
case mood of { -- subject
|
||||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||||
_ => np.s ! vp.leftVal
|
_ => np.s ! vp.leftVal
|
||||||
} ++
|
} ++
|
||||||
closeRelCl np.isRel ++
|
closeRelCl np.isRel ++ -- comma, if necessary
|
||||||
buildVerb vp.v mood pol agr np.pol vp.rightPol ++ -- verb
|
case vp.objPron of {
|
||||||
vp.compl ! np.agr -- object(s), complements, adverbial modifiers
|
False =>
|
||||||
|
buildVerb vp.v mood pol agr np.pol vp.rightPol ++ -- verb
|
||||||
|
vp.compl ! np.agr ; -- object(s), modifiers and other complements
|
||||||
|
True =>
|
||||||
|
-- FIXME: the object should be separated from other complements that should remain on the right side
|
||||||
|
(
|
||||||
|
vp.compl ! np.agr ++ -- object(s), modifiers and other complements
|
||||||
|
buildVerb vp.v mood pol agr np.pol vp.rightPol -- verb
|
||||||
|
) --| (
|
||||||
|
--buildVerb vp.v mood pol agr np.pol vp.rightPol ++ -- verb
|
||||||
|
--vp.compl ! np.agr -- object(s), modifiers and other complements
|
||||||
|
--)
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- FIXME: quick&dirty - lai kompilētos pret RGL API
|
-- FIXME: quick&dirty - lai kompilētos pret RGL API
|
||||||
|
|||||||
@@ -15,25 +15,34 @@ lin
|
|||||||
FloatPN i = {s = \\_ => i.s ; gend = Masc ; num = Pl} ;
|
FloatPN i = {s = \\_ => i.s ; gend = Masc ; num = Pl} ;
|
||||||
NumPN i = {s = \\_ => i.s ! Masc ! Nom ; gend = Masc ; num = Pl} ;
|
NumPN i = {s = \\_ => i.s ! Masc ! Nom ; gend = Masc ; num = Pl} ;
|
||||||
|
|
||||||
|
-- CN -> Int -> NP
|
||||||
|
-- e.g. "level 53" (covered by CNNumNP)
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ;
|
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ;
|
||||||
agr = AgrP3 Sg cn.gend ;
|
agr = AgrP3 Sg cn.gend ;
|
||||||
pol = Pos ;
|
pol = Pos ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- Det -> CN -> ListSymb -> NP
|
||||||
|
-- e.g. "(the) (2) numbers x and y"
|
||||||
CNSymbNP det cn xs = {
|
CNSymbNP det cn xs = {
|
||||||
s = \\_ => det.s ! cn.gend ! Nom ++ cn.s ! det.defin ! det.num ! Nom ++ xs.s ;
|
s = \\_ => det.s ! cn.gend ! Nom ++ cn.s ! det.defin ! det.num ! Nom ++ xs.s ;
|
||||||
agr = AgrP3 det.num cn.gend ;
|
agr = AgrP3 det.num cn.gend ;
|
||||||
pol = Pos ;
|
pol = Pos ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- CN -> Card -> NP
|
||||||
|
-- e.g. "level five", "level 5"
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ! Masc ! Nom ;
|
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ! Masc ! Nom ;
|
||||||
agr = AgrP3 Sg cn.gend ;
|
agr = AgrP3 Sg cn.gend ;
|
||||||
pol = Pos ;
|
pol = Pos ;
|
||||||
isRel = False
|
isRel = False ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = sy ;
|
SymbS sy = sy ;
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ lin
|
|||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = v.leftVal ;
|
leftVal = v.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VV -> VP -> VP
|
-- VV -> VP -> VP
|
||||||
@@ -41,7 +42,8 @@ lin
|
|||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = vv.leftVal ;
|
leftVal = vv.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VS -> S -> VP
|
-- VS -> S -> VP
|
||||||
@@ -52,7 +54,8 @@ lin
|
|||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = vs.leftVal ;
|
leftVal = vs.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VQ -> QS -> VP
|
-- VQ -> QS -> VP
|
||||||
@@ -63,7 +66,8 @@ lin
|
|||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = vq.leftVal ;
|
leftVal = vq.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VA -> AP -> VP
|
-- VA -> AP -> VP
|
||||||
@@ -74,18 +78,20 @@ lin
|
|||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = va.leftVal ;
|
leftVal = va.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- V2 -> VPSlash
|
-- V2 -> VPSlash
|
||||||
-- e.g. 'love (it)'
|
-- e.g. 'love (it)'
|
||||||
SlashV2a v2 = {
|
SlashV2a v2 = {
|
||||||
v = v2 ;
|
v = v2 ;
|
||||||
compl = \\_ => [] ; -- will be overriden
|
compl = \\_ => [] ; -- will be overriden
|
||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = v2.leftVal ;
|
leftVal = v2.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ; -- will be overriden
|
rightAgr = AgrP3 Sg Masc ; -- will be overriden
|
||||||
rightPol = Pos ; -- will be overriden
|
rightPol = Pos ; -- will be overriden
|
||||||
|
objPron = False ; -- will be overriden
|
||||||
rightVal = v2.rightVal
|
rightVal = v2.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -100,6 +106,7 @@ lin
|
|||||||
leftVal = v3.leftVal ;
|
leftVal = v3.leftVal ;
|
||||||
rightAgr = np.agr ;
|
rightAgr = np.agr ;
|
||||||
rightPol = np.pol ;
|
rightPol = np.pol ;
|
||||||
|
objPron = np.isPron ;
|
||||||
rightVal = v3.rightVal1
|
rightVal = v3.rightVal1
|
||||||
} ;
|
} ;
|
||||||
-- FIXME: "vīrietis runā par ābolus ar sievieti" ("a man talks to a woman about apples")
|
-- FIXME: "vīrietis runā par ābolus ar sievieti" ("a man talks to a woman about apples")
|
||||||
@@ -117,6 +124,7 @@ lin
|
|||||||
leftVal = v3.leftVal ;
|
leftVal = v3.leftVal ;
|
||||||
rightAgr = np.agr ;
|
rightAgr = np.agr ;
|
||||||
rightPol = np.pol ;
|
rightPol = np.pol ;
|
||||||
|
objPron = np.isPron ;
|
||||||
rightVal = v3.rightVal1
|
rightVal = v3.rightVal1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -129,6 +137,7 @@ lin
|
|||||||
leftVal = v2v.leftVal ;
|
leftVal = v2v.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
|
objPron = False ; -- will be overriden
|
||||||
rightVal = v2v.rightVal
|
rightVal = v2v.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -141,6 +150,7 @@ lin
|
|||||||
leftVal = v2s.leftVal ;
|
leftVal = v2s.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
|
objPron = False ; -- will be overriden
|
||||||
rightVal = v2s.rightVal
|
rightVal = v2s.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -153,6 +163,7 @@ lin
|
|||||||
leftVal = v2q.leftVal ;
|
leftVal = v2q.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
|
objPron = False ; -- will be overriden
|
||||||
rightVal = v2q.rightVal
|
rightVal = v2q.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -165,6 +176,7 @@ lin
|
|||||||
leftVal = v2a.leftVal ;
|
leftVal = v2a.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
|
objPron = False ; -- will be overriden
|
||||||
rightVal = v2a.rightVal
|
rightVal = v2a.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -189,7 +201,8 @@ lin
|
|||||||
leftVal = vpslash.leftVal ;
|
leftVal = vpslash.leftVal ;
|
||||||
rightAgr = np.agr ;
|
rightAgr = np.agr ;
|
||||||
rightPol = np.pol ;
|
rightPol = np.pol ;
|
||||||
rightVal = vpslash.rightVal ;
|
objPron = np.isPron ;
|
||||||
|
rightVal = vpslash.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- VV -> VPSlash -> VPSlash
|
-- VV -> VPSlash -> VPSlash
|
||||||
@@ -201,6 +214,7 @@ lin
|
|||||||
leftVal = vv.leftVal ;
|
leftVal = vv.leftVal ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos ;
|
rightPol = Pos ;
|
||||||
|
objPron = False ; -- will be overriden
|
||||||
rightVal = nom_Prep
|
rightVal = nom_Prep
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -215,6 +229,7 @@ lin
|
|||||||
leftVal = v2v.leftVal ;
|
leftVal = v2v.leftVal ;
|
||||||
rightAgr = np.agr ;
|
rightAgr = np.agr ;
|
||||||
rightPol = np.pol ;
|
rightPol = np.pol ;
|
||||||
|
objPron = np.isPron ;
|
||||||
rightVal = v2v.rightVal
|
rightVal = v2v.rightVal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -234,7 +249,8 @@ lin
|
|||||||
voice = Act ;
|
voice = Act ;
|
||||||
leftVal = Nom ;
|
leftVal = Nom ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- V2 -> VP
|
-- V2 -> VP
|
||||||
@@ -245,7 +261,8 @@ lin
|
|||||||
voice = Pass ;
|
voice = Pass ;
|
||||||
leftVal = v2.rightVal.c ! Sg ;
|
leftVal = v2.rightVal.c ! Sg ;
|
||||||
rightAgr = AgrP3 Sg Masc ;
|
rightAgr = AgrP3 Sg Masc ;
|
||||||
rightPol = Pos
|
rightPol = Pos ;
|
||||||
|
objPron = False
|
||||||
--rightVal = mkPrep v2.leftVal
|
--rightVal = mkPrep v2.leftVal
|
||||||
} ;
|
} ;
|
||||||
-- TODO: val - should not be overriden in ComplSlash etc.?
|
-- TODO: val - should not be overriden in ComplSlash etc.?
|
||||||
@@ -254,7 +271,7 @@ lin
|
|||||||
|
|
||||||
-- VP -> Adv -> VP
|
-- VP -> Adv -> VP
|
||||||
-- e.g. 'sleep here'
|
-- e.g. 'sleep here'
|
||||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
AdvVP vp adv = insertObjReg (\\_ => adv.s) adv.isPron vp ;
|
||||||
|
|
||||||
-- AdV -> VP -> VP
|
-- AdV -> VP -> VP
|
||||||
-- e.g. 'always sleep'
|
-- e.g. 'always sleep'
|
||||||
@@ -268,7 +285,7 @@ lin
|
|||||||
|
|
||||||
-- VP -> Prep -> VPSlash
|
-- VP -> Prep -> VPSlash
|
||||||
-- e.g. 'live in (it)'
|
-- e.g. 'live in (it)'
|
||||||
VPSlashPrep vp prep = vp ** { rightVal = prep } ;
|
VPSlashPrep vp prep = vp ** {rightVal = prep} ;
|
||||||
-- TODO: šajā brīdī ir jāignorē prep (by8agent_Prep); tas jāaizstāj ar v2.left (?)
|
-- TODO: šajā brīdī ir jāignorē prep (by8agent_Prep); tas jāaizstāj ar v2.left (?)
|
||||||
-- Tad varēs dzēst ārā komentāru pie StructuralLav.by8agent_Prep (?)
|
-- Tad varēs dzēst ārā komentāru pie StructuralLav.by8agent_Prep (?)
|
||||||
|
|
||||||
@@ -276,19 +293,19 @@ lin
|
|||||||
|
|
||||||
-- AP -> Comp
|
-- AP -> Comp
|
||||||
-- e.g. '(be) small'
|
-- e.g. '(be) small'
|
||||||
CompAP ap = { s = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom } ;
|
CompAP ap = {s = \\agr => ap.s ! Indef ! (fromAgr agr).gend ! (fromAgr agr).num ! Nom} ;
|
||||||
|
|
||||||
-- NP -> Comp
|
-- NP -> Comp
|
||||||
-- e.g. '(be) the man'
|
-- e.g. '(be) the man'
|
||||||
CompNP np = { s = \\_ => np.s ! Nom } ;
|
CompNP np = {s = \\_ => np.s ! Nom} ;
|
||||||
|
|
||||||
-- Adv -> Comp
|
-- Adv -> Comp
|
||||||
-- e.g. '(be) here'
|
-- e.g. '(be) here'
|
||||||
CompAdv a = { s = \\_ => a.s } ;
|
CompAdv adv = {s = \\_ => adv.s} ;
|
||||||
|
|
||||||
-- CN -> Comp
|
-- CN -> Comp
|
||||||
-- e.g. '(be) a man/men'
|
-- e.g. '(be) a man/men'
|
||||||
CompCN cn = { s = \\agr => cn.s ! Indef ! (fromAgr agr).num ! Nom } ;
|
CompCN cn = {s = \\agr => cn.s ! Indef ! (fromAgr agr).num ! Nom} ;
|
||||||
|
|
||||||
-- TODO: UseCopula : VP
|
-- TODO: UseCopula : VP
|
||||||
-- e.g. 'be'
|
-- e.g. 'be'
|
||||||
|
|||||||
Reference in New Issue
Block a user