improved possessive ProDrop in Fin RGL and translate so that it no more returns metavariables in parsing

This commit is contained in:
aarne
2014-04-22 19:50:45 +00:00
parent 4b74c79c27
commit 2a5ed29a30
6 changed files with 12 additions and 14 deletions

View File

@@ -49,7 +49,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
-- The $Bool$ tells if a possessive suffix is attached, which affects the case.
CN = {s : NForm => Str ; h : Harmony} ;
Pron = {s : NPForm => Str ; a : Agr ; hasPoss : Bool} ;
Pron = {s : NPForm => Str ; a : Agr ; hasPoss : Bool ; poss : Str} ;
NP = {s : NPForm => Str ; a : Agr ; isPron : Bool ; isNeg : Bool} ;
Det = {
s1 : Case => Str ; -- minun kolme

View File

@@ -159,8 +159,9 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
IAdvAdv adv = {s = "kuinka" ++ adv.s} ;
ProDrop p = {
s = table {NPCase (Nom) => [] ; c => p.s ! c} ;
---- drop Gen only works in adjectival position: "autoni", but not in "ø täytyy mennä"
s = table {NPCase (Nom) => [] ; c => p.s ! c} ;
poss = [] ;
-- drop Gen only works in adjectival position: "autoni", but not in "ø täytyy mennä"
a = p.a ;
hasPoss = p.hasPoss ;
} ;

View File

@@ -933,10 +933,10 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
-- Personal pronouns have possessive suffix (hänen talonsa) but "se" doesn't (sen talo)
mkPronoun : (_,_,_,_,_ : Str) -> Number -> Person ->
{s : NPForm => Str ; a : Agr ; hasPoss : Bool} = mkPronounGen True ;
{s : NPForm => Str ; a : Agr ; hasPoss : Bool ; poss : Str} = mkPronounGen True ;
mkPronounGen : Bool -> (_,_,_,_,_ : Str) -> Number -> Person ->
{s : NPForm => Str ; a : Agr ; hasPoss : Bool} =
{s : NPForm => Str ; a : Agr ; hasPoss : Bool ; poss : Str} =
\hasPoss, mina, minun, minua, minuna, minuun, n, p ->
let {
minu = Predef.tk 2 minuna ;
@@ -958,7 +958,8 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
NPAcc => Predef.tk 1 minun + "t"
} ;
a = Ag n p ;
hasPoss = hasPoss
hasPoss = hasPoss ;
poss = minun ;
} ;
mkDemPronoun : (_,_,_,_,_ : Str) -> Number ->

View File

@@ -116,7 +116,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
} ;
PossPron p = {
s1,sp = \\_,_ => p.s ! NPCase Gen ;
s1,sp = \\_,_ => p.poss ;
s2 = case p.hasPoss of {
True => table {Front => BIND ++ possSuffixFront p.a ;
Back => BIND ++ possSuffix p.a } ;

View File

@@ -56,7 +56,8 @@ concrete StructuralFin of Structural = CatFin **
it_Pron = {
s = \\c => pronSe.s ! npform2case Sg c ;
a = agrP3 Sg ;
hasPoss = False
hasPoss = False ;
poss = "sen" ;
} ;
less_CAdv = X.mkCAdv "vähemmän" "kuin" ;
many_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "moni" "monia")) ;
@@ -162,7 +163,7 @@ concrete StructuralFin of Structural = CatFin **
youPl_Pron = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 ;
youPol_Pron =
let p = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 in
{s = p.s ; a = AgPol ; hasPoss = True} ;
{s = p.s ; a = AgPol ; hasPoss = True ; poss = p.poss} ;
oper
jokuPron : MorphoFin.Number => (MorphoFin.Case) => Str =

View File

@@ -5,7 +5,6 @@ concrete TranslateFin of Translate =
CatFin,
NounFin - [
PPartNP
,PossPron -- Fin specific: replaced by variants with prodrop
],
AdjectiveFin,
NumeralFin,
@@ -35,9 +34,5 @@ open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), (G = G
flags literal=Symb ; coding = utf8 ;
-- the overrides -----
lin
PossPron p = G.PossPron p | E.ProDropPoss p ;
}