ParseFin ProDrop variants ; ParseFre question word order and pronoun gender variants

This commit is contained in:
aarne
2013-12-17 09:54:11 +00:00
parent 120e616a28
commit 599027ff18
9 changed files with 72 additions and 25 deletions

View File

@@ -100,6 +100,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
linref linref
SSlash = \ss -> ss.s ++ ss.c2.s ! False ; SSlash = \ss -> ss.s ++ ss.c2.s ! False ;
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s ! False ; ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s ! False ;
NP = \np -> np.s ! NPSep ;
VP = vpRef ; VP = vpRef ;
VPSlash = \vps -> vpRef vps ++ vps.c2.s ! False ; VPSlash = \vps -> vpRef vps ++ vps.c2.s ! False ;

View File

@@ -166,10 +166,13 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
} ; } ;
ProDropPoss p = { ProDropPoss p = {
s1 = \\_,_ => [] ; s1 = \\_,_ => case p.a of {Ag _ P3 => p.s ! NPCase Gen ; _ => []} ; -- hänen nimensä ; minun nimeni
sp = \\_,_ => p.s ! NPCase Gen ; sp = \\_,_ => p.s ! NPCase Gen ;
s2 = table {Front => BIND ++ possSuffixFront p.a ; s2 = case p.hasPoss of {
Back => BIND ++ possSuffix p.a } ; True => table {Front => BIND ++ possSuffixFront p.a ;
Back => BIND ++ possSuffix p.a } ;
False => \\_ => [] -- sen nimi
} ;
isNum = False ; isNum = False ;
isPoss = True ; isPoss = True ;
isDef = True ; --- "minun kolme autoani ovat" ; thus "...on" is missing isDef = True ; --- "minun kolme autoani ovat" ; thus "...on" is missing

View File

@@ -943,7 +943,7 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
a = Predef.dp 1 minuna a = Predef.dp 1 minuna
} in } in
{s = table { {s = table {
NPCase Nom => mina ; NPCase Nom | NPSep => mina ;
NPCase Gen => minun ; NPCase Gen => minun ;
NPCase Part => minua ; NPCase Part => minua ;
NPCase Transl => minu + "ksi" ; NPCase Transl => minu + "ksi" ;

View File

@@ -11,7 +11,7 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, StemFin, (P = Prelude) in
UttIP ip = {s = ip.s ! NPCase Nom} ; UttIP ip = {s = ip.s ! NPCase Nom} ;
UttIAdv iadv = iadv ; UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! NPCase Nom} ; UttNP np = {s = np.s ! NPSep} ;
UttVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp Inf1} ; UttVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp Inf1} ;
UttAdv adv = adv ; UttAdv adv = adv ;
UttCN np = {s = np.s ! NCase Sg Nom} ; UttCN np = {s = np.s ! NCase Sg Nom} ;

View File

@@ -72,7 +72,7 @@ oper
-- have a uniform, special accusative form ("minut", etc). -- have a uniform, special accusative form ("minut", etc).
param param
NPForm = NPCase Case | NPAcc ; NPForm = NPCase Case | NPAcc | NPSep ; -- NPSep is NP used alone, e.g. in an Utt. Equals NPCase Nom except for pro-drop
oper oper
npform2case : Number -> NPForm -> Case = \n,f -> npform2case : Number -> NPForm -> Case = \n,f ->
@@ -81,7 +81,8 @@ oper
case <<f,n> : NPForm * Number> of { case <<f,n> : NPForm * Number> of {
<NPCase c,_> => c ; <NPCase c,_> => c ;
<NPAcc,Sg> => Gen ;-- appCompl does the job <NPAcc,Sg> => Gen ;-- appCompl does the job
<NPAcc,Pl> => Nom <NPAcc,Pl> => Nom ;
<NPSep,_> => Nom
} ; } ;
n2nform : NForm -> NForm = \nf -> case nf of { n2nform : NForm -> NForm = \nf -> case nf of {
@@ -518,7 +519,7 @@ oper
nsa = possSuffixFront agr nsa = possSuffixFront agr
in { in {
s = table { s = table {
NPCase Nom => itse ! NPossNom Sg ; NPCase Nom | NPSep => itse ! NPossNom Sg ;
NPCase Gen | NPAcc => itse ! NPossNom Sg + nsa ; NPCase Gen | NPAcc => itse ! NPossNom Sg + nsa ;
NPCase Transl => itse ! NPossTransl Sg + nsa ; NPCase Transl => itse ! NPossTransl Sg + nsa ;
NPCase Illat => itse ! NPossIllat Sg + nsa ; NPCase Illat => itse ! NPossIllat Sg + nsa ;

View File

@@ -1,9 +1,11 @@
--# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus --# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus
concrete ParseFin of ParseEngAbs = concrete ParseFin of ParseEngAbs =
TenseX, ---- - [Pol, PNeg, PPos], TenseX, ---- TODO add potential forms
CatFin, CatFin,
NounFin - [PPartNP], NounFin - [PPartNP,
UsePron, PossPron -- replaced by variants with prodrop
],
AdjectiveFin, AdjectiveFin,
NumeralFin, NumeralFin,
SymbolFin [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP], SymbolFin [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
@@ -17,16 +19,24 @@ concrete ParseFin of ParseEngAbs =
RelativeFin, RelativeFin,
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
ConstructionFin, ConstructionFin,
DocumentationFin, ---- these blow up the pgf size enormously: from 26 to 81 M! 15/12/2013 DocumentationFin,
ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash, ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash,
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV] VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
, DictEngFin , DictEngFin
** **
open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), Prelude in { open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), (G = GrammarFin), Prelude in {
flags literal=Symb ; coding = utf8 ; flags literal=Symb ; coding = utf8 ;
-- the overrides -----
lin
UsePron p = G.UsePron (E.ProDrop p) | G.UsePron p ;
PossPron p = E.ProDropPoss p | G.PossPron p ;
----------------------
lin lin
ComplVV v ant pol vp = ComplVV v ant pol vp =
insertObj insertObj

View File

@@ -5,6 +5,7 @@ concrete DictEngFre of DictEngAbs = CatFre ** open ParadigmsFre,
(S = StructuralFre), (S = StructuralFre),
(L = LexiconFre), (L = LexiconFre),
(I = IrregFre), (I = IrregFre),
(E = ExtraFre),
MorphoFre, ParadigmsFre, Prelude in { MorphoFre, ParadigmsFre, Prelude in {
---flags coding=utf8 ; --- because of IrregFre ---flags coding=utf8 ; --- because of IrregFre
@@ -49,11 +50,11 @@ lin
how_IAdv = S.how_IAdv; --CHECKED how_IAdv = S.how_IAdv; --CHECKED
how8many_IDet = S.how8many_IDet; --CHECKED how8many_IDet = S.how8many_IDet; --CHECKED
how8much_IAdv = S.how8much_IAdv; --CHECKED how8much_IAdv = S.how8much_IAdv; --CHECKED
i_Pron = S.i_Pron; --CHECKED i_Pron = S.i_Pron | E.i8fem_Pron ; --CHECKED
if_Subj = S.if_Subj; --CHECKED if_Subj = S.if_Subj; --CHECKED
in8front_Prep = S.in8front_Prep; --CHECKED in8front_Prep = S.in8front_Prep; --CHECKED
in_Prep = S.in_Prep; --CHECKED in_Prep = S.in_Prep; --CHECKED
it_Pron = S.it_Pron; --CHECKED it_Pron = S.it_Pron | S.she_Pron ; --CHECKED
less_CAdv = S.less_CAdv; --CHECKED less_CAdv = S.less_CAdv; --CHECKED
many_Det = S.many_Det; --CHECKED many_Det = S.many_Det; --CHECKED
more_CAdv = S.more_CAdv; --CHECKED more_CAdv = S.more_CAdv; --CHECKED
@@ -82,7 +83,7 @@ lin
there7to_Adv = S.there7to_Adv; --CHECKED there7to_Adv = S.there7to_Adv; --CHECKED
there7from_Adv = S.there7from_Adv; --CHECKED there7from_Adv = S.there7from_Adv; --CHECKED
therefore_PConj = S.therefore_PConj; --CHECKED therefore_PConj = S.therefore_PConj; --CHECKED
they_Pron = S.they_Pron; --CHECKED they_Pron = S.they_Pron | E.they8fem_Pron ; --CHECKED
this_Quant = S.this_Quant; --CHECKED this_Quant = S.this_Quant; --CHECKED
through_Prep = S.through_Prep; --CHECKED through_Prep = S.through_Prep; --CHECKED
to_Prep = S.to_Prep; --CHECKED to_Prep = S.to_Prep; --CHECKED
@@ -90,22 +91,22 @@ lin
under_Prep = S.under_Prep; --CHECKED under_Prep = S.under_Prep; --CHECKED
very_AdA = S.very_AdA; --CHECKED very_AdA = S.very_AdA; --CHECKED
want_VV = S.want_VV; --CHECKED want_VV = S.want_VV; --CHECKED
we_Pron = S.we_Pron; --CHECKED we_Pron = S.we_Pron | E.we8fem_Pron ; --CHECKED
whatPl_IP = S.whatPl_IP; --CHECKED whatPl_IP = S.whatPl_IP; --CHECKED
whatSg_IP = S.whatSg_IP; --CHECKED whatSg_IP = S.whatSg_IP | E.QueestcequeIP ; --CHECKED
when_IAdv = S.when_IAdv; --CHECKED when_IAdv = S.when_IAdv; --CHECKED
when_Subj = S.when_Subj; --CHECKED when_Subj = S.when_Subj; --CHECKED
where_IAdv = S.where_IAdv; --CHECKED where_IAdv = S.where_IAdv; --CHECKED
which_IQuant = S.which_IQuant; --CHECKED which_IQuant = S.which_IQuant; --CHECKED
whoPl_IP = S.whoPl_IP; --CHECKED whoPl_IP = S.whoPl_IP; --CHECKED
whoSg_IP = S.whoSg_IP; --CHECKED whoSg_IP = S.whoSg_IP | E.QuiestcequeIP ; --CHECKED
why_IAdv = S.why_IAdv; --CHECKED why_IAdv = S.why_IAdv; --CHECKED
with_Prep = S.with_Prep; --CHECKED with_Prep = S.with_Prep; --CHECKED
without_Prep = S.without_Prep; --CHECKED without_Prep = S.without_Prep; --CHECKED
yes_Utt = S.yes_Utt; --CHECKED yes_Utt = S.yes_Utt; --CHECKED
youSg_Pron = S.youSg_Pron; --CHECKED youSg_Pron = S.youSg_Pron | E.youSg8fem_Pron ; --CHECKED
youPl_Pron = S.youPl_Pron; --CHECKED youPl_Pron = S.youPl_Pron | E.youPl8fem_Pron ; --CHECKED
youPol_Pron = S.youPol_Pron; --CHECKED youPol_Pron = S.youPol_Pron | E.youPol8fem_Pron ; --CHECKED
no_Quant = S.no_Quant; --CHECKED no_Quant = S.no_Quant; --CHECKED
not_Predet = S.not_Predet; --CHECKED not_Predet = S.not_Predet; --CHECKED
if_then_Conj = S.if_then_Conj; --CHECKED if_then_Conj = S.if_then_Conj; --CHECKED

View File

@@ -10,8 +10,8 @@ concrete ParseFre of ParseEngAbs =
VerbFre - [SlashV2V, PassV2, UseCopula, ComplVV], VerbFre - [SlashV2V, PassV2, UseCopula, ComplVV],
AdverbFre, AdverbFre,
PhraseFre, PhraseFre,
SentenceFre - [ SlashVP, SlashVS], SentenceFre,
QuestionFre, QuestionFre - [QuestCl, QuestIAdv], -- more variants here
RelativeFre, RelativeFre,
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
ConstructionFre, ConstructionFre,
@@ -22,12 +22,43 @@ concrete ParseFre of ParseEngAbs =
ClSlash, RCl, EmptyRelSlash], ClSlash, RCl, EmptyRelSlash],
DictEngFre ** DictEngFre **
open PhonoFre, MorphoFre, ResFre, ParadigmsFre, SyntaxFre, Prelude in { open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in {
flags flags
literal=Symb ; literal=Symb ;
coding = utf8 ; 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 lin
-- missing from ExtraFre; should not really be there either -- missing from ExtraFre; should not really be there either

View File

@@ -178,7 +178,7 @@
<tr> <tr>
<th rowspan="3">singulier</th> <th rowspan="3">singulier</th>
<th>1.p</th> <th>1.p</th>
<td><form>s (VFin VPasse Sg P1)</form></td><td><form>s (VFin VFut Sg P1)</form></td><td><form>s (VFin VFut Sg P1)</form></td> <td><form>s (VFin VPasse Sg P1)</form></td><td><form>s (VFin VFut Sg P1)</form></td><td><form>s (VFin VCondit Sg P1)</form></td>
</tr> </tr>
<tr> <tr>
<th>2.p</th> <th>2.p</th>