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. -- The $Bool$ tells if a possessive suffix is attached, which affects the case.
CN = {s : NForm => Str ; h : Harmony} ; 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} ; NP = {s : NPForm => Str ; a : Agr ; isPron : Bool ; isNeg : Bool} ;
Det = { Det = {
s1 : Case => Str ; -- minun kolme s1 : Case => Str ; -- minun kolme

View File

@@ -159,8 +159,9 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
IAdvAdv adv = {s = "kuinka" ++ adv.s} ; IAdvAdv adv = {s = "kuinka" ++ adv.s} ;
ProDrop p = { ProDrop p = {
s = table {NPCase (Nom) => [] ; c => p.s ! c} ; s = table {NPCase (Nom) => [] ; c => p.s ! c} ;
---- drop Gen only works in adjectival position: "autoni", but not in "ø täytyy mennä" poss = [] ;
-- drop Gen only works in adjectival position: "autoni", but not in "ø täytyy mennä"
a = p.a ; a = p.a ;
hasPoss = p.hasPoss ; 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) -- Personal pronouns have possessive suffix (hänen talonsa) but "se" doesn't (sen talo)
mkPronoun : (_,_,_,_,_ : Str) -> Number -> Person -> 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 -> 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 -> \hasPoss, mina, minun, minua, minuna, minuun, n, p ->
let { let {
minu = Predef.tk 2 minuna ; minu = Predef.tk 2 minuna ;
@@ -958,7 +958,8 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
NPAcc => Predef.tk 1 minun + "t" NPAcc => Predef.tk 1 minun + "t"
} ; } ;
a = Ag n p ; a = Ag n p ;
hasPoss = hasPoss hasPoss = hasPoss ;
poss = minun ;
} ; } ;
mkDemPronoun : (_,_,_,_,_ : Str) -> Number -> mkDemPronoun : (_,_,_,_,_ : Str) -> Number ->

View File

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

View File

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

View File

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