mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -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.
|
-- 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
|
||||||
|
|||||||
@@ -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 ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -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 ->
|
||||||
|
|||||||
@@ -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 } ;
|
||||||
|
|||||||
@@ -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 =
|
||||||
|
|||||||
@@ -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 ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user