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
SSlash = \ss -> ss.s ++ ss.c2.s ! False ;
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s ! False ;
NP = \np -> np.s ! NPSep ;
VP = vpRef ;
VPSlash = \vps -> vpRef vps ++ vps.c2.s ! False ;

View File

@@ -166,10 +166,13 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
} ;
ProDropPoss p = {
s1 = \\_,_ => [] ;
s1 = \\_,_ => case p.a of {Ag _ P3 => p.s ! NPCase Gen ; _ => []} ; -- hänen nimensä ; minun nimeni
sp = \\_,_ => p.s ! NPCase Gen ;
s2 = table {Front => BIND ++ possSuffixFront p.a ;
Back => BIND ++ possSuffix p.a } ;
s2 = case p.hasPoss of {
True => table {Front => BIND ++ possSuffixFront p.a ;
Back => BIND ++ possSuffix p.a } ;
False => \\_ => [] -- sen nimi
} ;
isNum = False ;
isPoss = True ;
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
} in
{s = table {
NPCase Nom => mina ;
NPCase Nom | NPSep => mina ;
NPCase Gen => minun ;
NPCase Part => minua ;
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} ;
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} ;
UttAdv adv = adv ;
UttCN np = {s = np.s ! NCase Sg Nom} ;

View File

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

View File

@@ -1,9 +1,11 @@
--# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus
concrete ParseFin of ParseEngAbs =
TenseX, ---- - [Pol, PNeg, PPos],
TenseX, ---- TODO add potential forms
CatFin,
NounFin - [PPartNP],
NounFin - [PPartNP,
UsePron, PossPron -- replaced by variants with prodrop
],
AdjectiveFin,
NumeralFin,
SymbolFin [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP],
@@ -17,16 +19,24 @@ concrete ParseFin of ParseEngAbs =
RelativeFin,
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
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,
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
, 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 ;
-- the overrides -----
lin
UsePron p = G.UsePron (E.ProDrop p) | G.UsePron p ;
PossPron p = E.ProDropPoss p | G.PossPron p ;
----------------------
lin
ComplVV v ant pol vp =
insertObj