mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
improved possessive ProDrop in Fin RGL and translate so that it no more returns metavariables in parsing
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 ;
|
||||
} ;
|
||||
|
||||
@@ -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 ->
|
||||
|
||||
@@ -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 } ;
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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 ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user