mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
ParseFin ProDrop variants ; ParseFre question word order and pronoun gender variants
This commit is contained in:
@@ -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 ;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" ;
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,6 +5,7 @@ concrete DictEngFre of DictEngAbs = CatFre ** open ParadigmsFre,
|
||||
(S = StructuralFre),
|
||||
(L = LexiconFre),
|
||||
(I = IrregFre),
|
||||
(E = ExtraFre),
|
||||
MorphoFre, ParadigmsFre, Prelude in {
|
||||
|
||||
---flags coding=utf8 ; --- because of IrregFre
|
||||
@@ -49,11 +50,11 @@ lin
|
||||
how_IAdv = S.how_IAdv; --CHECKED
|
||||
how8many_IDet = S.how8many_IDet; --CHECKED
|
||||
how8much_IAdv = S.how8much_IAdv; --CHECKED
|
||||
i_Pron = S.i_Pron; --CHECKED
|
||||
i_Pron = S.i_Pron | E.i8fem_Pron ; --CHECKED
|
||||
if_Subj = S.if_Subj; --CHECKED
|
||||
in8front_Prep = S.in8front_Prep; --CHECKED
|
||||
in_Prep = S.in_Prep; --CHECKED
|
||||
it_Pron = S.it_Pron; --CHECKED
|
||||
it_Pron = S.it_Pron | S.she_Pron ; --CHECKED
|
||||
less_CAdv = S.less_CAdv; --CHECKED
|
||||
many_Det = S.many_Det; --CHECKED
|
||||
more_CAdv = S.more_CAdv; --CHECKED
|
||||
@@ -82,7 +83,7 @@ lin
|
||||
there7to_Adv = S.there7to_Adv; --CHECKED
|
||||
there7from_Adv = S.there7from_Adv; --CHECKED
|
||||
therefore_PConj = S.therefore_PConj; --CHECKED
|
||||
they_Pron = S.they_Pron; --CHECKED
|
||||
they_Pron = S.they_Pron | E.they8fem_Pron ; --CHECKED
|
||||
this_Quant = S.this_Quant; --CHECKED
|
||||
through_Prep = S.through_Prep; --CHECKED
|
||||
to_Prep = S.to_Prep; --CHECKED
|
||||
@@ -90,22 +91,22 @@ lin
|
||||
under_Prep = S.under_Prep; --CHECKED
|
||||
very_AdA = S.very_AdA; --CHECKED
|
||||
want_VV = S.want_VV; --CHECKED
|
||||
we_Pron = S.we_Pron; --CHECKED
|
||||
we_Pron = S.we_Pron | E.we8fem_Pron ; --CHECKED
|
||||
whatPl_IP = S.whatPl_IP; --CHECKED
|
||||
whatSg_IP = S.whatSg_IP; --CHECKED
|
||||
whatSg_IP = S.whatSg_IP | E.QueestcequeIP ; --CHECKED
|
||||
when_IAdv = S.when_IAdv; --CHECKED
|
||||
when_Subj = S.when_Subj; --CHECKED
|
||||
where_IAdv = S.where_IAdv; --CHECKED
|
||||
which_IQuant = S.which_IQuant; --CHECKED
|
||||
whoPl_IP = S.whoPl_IP; --CHECKED
|
||||
whoSg_IP = S.whoSg_IP; --CHECKED
|
||||
whoSg_IP = S.whoSg_IP | E.QuiestcequeIP ; --CHECKED
|
||||
why_IAdv = S.why_IAdv; --CHECKED
|
||||
with_Prep = S.with_Prep; --CHECKED
|
||||
without_Prep = S.without_Prep; --CHECKED
|
||||
yes_Utt = S.yes_Utt; --CHECKED
|
||||
youSg_Pron = S.youSg_Pron; --CHECKED
|
||||
youPl_Pron = S.youPl_Pron; --CHECKED
|
||||
youPol_Pron = S.youPol_Pron; --CHECKED
|
||||
youSg_Pron = S.youSg_Pron | E.youSg8fem_Pron ; --CHECKED
|
||||
youPl_Pron = S.youPl_Pron | E.youPl8fem_Pron ; --CHECKED
|
||||
youPol_Pron = S.youPol_Pron | E.youPol8fem_Pron ; --CHECKED
|
||||
no_Quant = S.no_Quant; --CHECKED
|
||||
not_Predet = S.not_Predet; --CHECKED
|
||||
if_then_Conj = S.if_then_Conj; --CHECKED
|
||||
|
||||
@@ -10,8 +10,8 @@ concrete ParseFre of ParseEngAbs =
|
||||
VerbFre - [SlashV2V, PassV2, UseCopula, ComplVV],
|
||||
AdverbFre,
|
||||
PhraseFre,
|
||||
SentenceFre - [ SlashVP, SlashVS],
|
||||
QuestionFre,
|
||||
SentenceFre,
|
||||
QuestionFre - [QuestCl, QuestIAdv], -- more variants here
|
||||
RelativeFre,
|
||||
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionFre,
|
||||
@@ -22,12 +22,43 @@ concrete ParseFre of ParseEngAbs =
|
||||
ClSlash, RCl, EmptyRelSlash],
|
||||
|
||||
DictEngFre **
|
||||
open PhonoFre, MorphoFre, ResFre, ParadigmsFre, SyntaxFre, Prelude in {
|
||||
open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
coding = utf8 ;
|
||||
|
||||
-- overrides from Lang
|
||||
|
||||
lin
|
||||
QuestCl cl =
|
||||
{s = \\t,a,p => -- est-ce qu'il dort ?
|
||||
let cls = cl.s ! DDir ! t ! a ! p
|
||||
in table {
|
||||
QDir => "est-ce" ++ elisQue ++ cls ! Indic ;
|
||||
QIndir => subjIf ++ cls ! Indic
|
||||
}
|
||||
}
|
||||
| {s = \\t,a,p => -- dort-il ?
|
||||
let cls = cl.s ! DInv ! t ! a ! p
|
||||
in table {
|
||||
QDir => cls ! Indic ;
|
||||
QIndir => subjIf ++ cls ! Indic
|
||||
}
|
||||
}
|
||||
| G.QuestCl cl -- il dort ?
|
||||
;
|
||||
|
||||
|
||||
QuestIAdv iadv cl =
|
||||
G.QuestIAdv iadv cl -- où dort-il
|
||||
| {s = \\t,a,p,q => -- où est-ce qu'il dort
|
||||
let
|
||||
ord = DDir ;
|
||||
cls = cl.s ! ord ! t ! a ! p ! Indic ;
|
||||
why = iadv.s
|
||||
in why ++ "est-ce" ++ elisQue ++ cls
|
||||
} ;
|
||||
|
||||
lin
|
||||
-- missing from ExtraFre; should not really be there either
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
<tr>
|
||||
<th rowspan="3">singulier</th>
|
||||
<th>1.p</th>
|
||||
<td><form>s (VFin VPasse Sg P1)</form></td><td><form>s (VFin VFut Sg P1)</form></td><td><form>s (VFin VFut Sg P1)</form></td>
|
||||
<td><form>s (VFin VPasse Sg P1)</form></td><td><form>s (VFin VFut Sg P1)</form></td><td><form>s (VFin VCondit Sg P1)</form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>2.p</th>
|
||||
|
||||
Reference in New Issue
Block a user