mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
fixed Finnish youPol complement number to Sg ; some encoding things in French
This commit is contained in:
@@ -15,7 +15,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
|
||||
|
||||
Cl = {s : ResFin.Tense => Anteriority => Polarity => SType => Str} ;
|
||||
ClSlash = {s : ResFin.Tense => Anteriority => Polarity => Str ; c2 : Compl} ;
|
||||
Imp = {s : Polarity => Number => Str} ;
|
||||
Imp = {s : Polarity => Agr => Str} ;
|
||||
|
||||
-- Question
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ concrete ConjunctionFin of Conjunction =
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
||||
a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
||||
a = conjAgr (Ag conj.n P3) ss.a ; -- P3 is the maximum
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ concrete IdiomFin of Idiom = CatFin **
|
||||
-- The imperative is not available in a $VP$.
|
||||
|
||||
ImpPl1 vp =
|
||||
let vps = vp.s ! VIPass ! Simul ! Pos ! {n = Pl ; p = P1}
|
||||
let vps = vp.s ! VIPass ! Simul ! Pos ! Ag Pl P1
|
||||
in
|
||||
{s = vps.fin ++ vps.inf ++
|
||||
vp.s2 ! True ! Pos ! {n = Pl ; p = P1} ++ vp.ext
|
||||
vp.s2 ! True ! Pos ! Ag Pl P1 ++ vp.ext
|
||||
} ;
|
||||
|
||||
oper
|
||||
|
||||
@@ -866,7 +866,7 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
|
||||
NPCase Abess => minu + ("tt" + a) ;
|
||||
NPAcc => Predef.tk 1 minun + "t"
|
||||
} ;
|
||||
a = {n = n ; p = p}
|
||||
a = Ag n p
|
||||
} ;
|
||||
|
||||
mkDemPronoun : (_,_,_,_,_ : Str) -> Number ->
|
||||
|
||||
@@ -64,13 +64,13 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, Prelude in {
|
||||
UsePron p = p ** {isPron = True} ;
|
||||
|
||||
PredetNP pred np = {
|
||||
s = \\c => pred.s ! np.a.n ! c ++ np.s ! c ;
|
||||
s = \\c => pred.s ! complNumAgr np.a ! c ++ np.s ! c ;
|
||||
a = np.a ;
|
||||
isPron = np.isPron -- kaikki minun - ni
|
||||
} ;
|
||||
|
||||
PPartNP np v2 = {
|
||||
s = \\c => np.s ! c ++ v2.s ! PastPartPass (AN (NCase np.a.n Ess)) ;
|
||||
s = \\c => np.s ! c ++ v2.s ! PastPartPass (AN (NCase (complNumAgr np.a) Ess)) ;
|
||||
a = np.a ;
|
||||
isPron = np.isPron -- minun täällä - ni
|
||||
} ;
|
||||
|
||||
@@ -5,9 +5,9 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, (P = Prelude) in {
|
||||
|
||||
UttS s = s ;
|
||||
UttQS qs = {s = qs.s} ;
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Ag Sg P2} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Ag Pl P2} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! AgPol} ;
|
||||
|
||||
UttIP ip = {s = ip.s ! NPCase Nom} ;
|
||||
UttIAdv iadv = iadv ;
|
||||
|
||||
@@ -18,7 +18,7 @@ concrete RelativeFin of Relative = CatFin ** open Prelude, ResFin, MorphoFin in
|
||||
RAg a => a
|
||||
} ;
|
||||
cl = mkClause
|
||||
(subjForm {s = rp.s ! agr.n ;
|
||||
(subjForm {s = rp.s ! (complNumAgr agr) ;
|
||||
a = agr ; isPron = False} vp.sc) agr vp
|
||||
in
|
||||
cl.s ! t ! ant ! b ! SDecl ;
|
||||
@@ -29,7 +29,7 @@ concrete RelativeFin of Relative = CatFin ** open Prelude, ResFin, MorphoFin in
|
||||
s = \\t,a,p,ag =>
|
||||
let
|
||||
cls = slash.s ! t ! a ! p ;
|
||||
who = appCompl True p slash.c2 (rp2np ag.n rp)
|
||||
who = appCompl True p slash.c2 (rp2np (complNumAgr ag) rp)
|
||||
in
|
||||
who ++ cls ;
|
||||
c = slash.c2.c
|
||||
|
||||
@@ -26,11 +26,22 @@ resource ResFin = ParamX ** open Prelude in {
|
||||
| NPossNom Number | NPossGen Number --- number needed for syntax of AdjCN
|
||||
| NPossTransl Number | NPossIllat Number ;
|
||||
|
||||
-- Agreement of $NP$ is a record. We'll add $Gender$ later.
|
||||
-- Agreement of $NP$ has number*person and the polite second ("te olette valmis").
|
||||
|
||||
|
||||
Agr = Ag Number Person | AgPol ;
|
||||
|
||||
oper
|
||||
Agr = {n : Number ; p : Person} ;
|
||||
complNumAgr : Agr -> Number = \a -> case a of {
|
||||
Ag n _ => n ;
|
||||
AgPol => Sg
|
||||
} ;
|
||||
verbAgr : Agr -> {n : Number ; p : Person} = \a -> case a of {
|
||||
Ag n p => {n = n ; p = p} ;
|
||||
AgPol => {n = Pl ; p = P2}
|
||||
} ;
|
||||
|
||||
oper
|
||||
NP = {s : NPForm => Str ; a : Agr ; isPron : Bool} ;
|
||||
|
||||
--
|
||||
@@ -106,7 +117,7 @@ param
|
||||
|
||||
--2 For $Relative$
|
||||
|
||||
RAgr = RNoAg | RAg {n : Number ; p : Person} ;
|
||||
RAgr = RNoAg | RAg Agr ;
|
||||
|
||||
--2 For $Numeral$
|
||||
|
||||
@@ -116,11 +127,13 @@ param
|
||||
|
||||
oper
|
||||
agrP3 : Number -> Agr = \n ->
|
||||
{n = n ; p = P3} ;
|
||||
Ag n P3 ;
|
||||
|
||||
conjAgr : Agr -> Agr -> Agr = \a,b -> {
|
||||
n = conjNumber a.n b.n ;
|
||||
p = conjPerson a.p b.p
|
||||
conjAgr : Agr -> Agr -> Agr = \a,b -> case <a,b> of {
|
||||
<Ag n p, Ag m q> => Ag (conjNumber n m) (conjPerson p q) ;
|
||||
<Ag n p, AgPol> => Ag Pl (conjPerson p P2) ;
|
||||
<AgPol, Ag n p> => Ag Pl (conjPerson p P2) ;
|
||||
_ => b
|
||||
} ;
|
||||
|
||||
---
|
||||
@@ -163,9 +176,10 @@ oper
|
||||
} ;
|
||||
|
||||
predV : (Verb ** {sc : NPForm ; qp : Str}) -> VP = \verb -> {
|
||||
s = \\vi,ant,b,agr =>
|
||||
s = \\vi,ant,b,agr0 =>
|
||||
let
|
||||
|
||||
agr = verbAgr agr0 ;
|
||||
verbs = verb.s ;
|
||||
part : Str = case vi of {
|
||||
VIPass => verbs ! PastPartPass (AN (NCase agr.n Nom)) ;
|
||||
@@ -573,9 +587,9 @@ oper
|
||||
} ;
|
||||
|
||||
possSuffixFront : Agr -> Str = \agr ->
|
||||
table Agr ["ni" ; "si" ; "nsä" ; "mme" ; "nne" ; "nsä"] ! agr ;
|
||||
table Agr ["ni" ; "si" ; "nsä" ; "mme" ; "nne" ; "nsä" ; "nne"] ! agr ;
|
||||
possSuffix : Agr -> Str = \agr ->
|
||||
table Agr ["ni" ; "si" ; "nsa" ; "mme" ; "nne" ; "nsa"] ! agr ;
|
||||
table Agr ["ni" ; "si" ; "nsa" ; "mme" ; "nne" ; "nsa" ; "nne"] ! agr ;
|
||||
|
||||
oper
|
||||
rp2np : Number -> {s : Number => NPForm => Str ; a : RAgr} -> NP = \n,rp -> {
|
||||
|
||||
@@ -9,9 +9,8 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
|
||||
PredSCVP sc vp = mkClause (\_ -> sc.s) (agrP3 Sg) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
s = \\pol,agr =>
|
||||
let
|
||||
agr = {n = n ; p = P2} ;
|
||||
verb = vp.s ! VIImper ! Simul ! pol ! agr ;
|
||||
compl = vp.s2 ! False ! pol ! agr ++ vp.ext --- False = like inf (osta auto)
|
||||
in
|
||||
|
||||
@@ -159,8 +159,9 @@ concrete StructuralFin of Structural = CatFin **
|
||||
yes_Utt = ss "kyllä" ;
|
||||
youSg_Pron = mkPronoun "sinä" "sinun" "sinua" "sinuna" "sinuun" Sg P2 ;
|
||||
youPl_Pron = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 ;
|
||||
youPol_Pron = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 ; --- Sg
|
||||
|
||||
youPol_Pron =
|
||||
let p = mkPronoun "te" "teidän" "teitä" "teinä" "teihin" Pl P2 in
|
||||
{s = p.s ; a = AgPol} ;
|
||||
|
||||
oper
|
||||
jokuPron : MorphoFin.Number => (MorphoFin.Case) => Str =
|
||||
|
||||
@@ -33,7 +33,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
|
||||
ComplVA v ap =
|
||||
insertObj
|
||||
(\\_,b,agr =>
|
||||
ap.s ! False ! (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored
|
||||
let n = (complNumAgr agr) in
|
||||
ap.s ! False ! (NCase n (npform2case n v.c2.c))) --- v.cs.s ignored
|
||||
(predV v) ;
|
||||
|
||||
SlashV2S v s =
|
||||
@@ -90,12 +91,12 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
|
||||
CompAP ap = {
|
||||
s = \\agr =>
|
||||
let
|
||||
n = agr.n ;
|
||||
c = case agr.n of {
|
||||
Sg => Nom ; -- minä olen iso
|
||||
Pl => Part -- me olemme isoja
|
||||
n = complNumAgr agr ;
|
||||
c = case n of {
|
||||
Sg => Nom ; -- minä olen iso ; te olette iso
|
||||
Pl => Part -- me olemme isoja ; te olette isoja
|
||||
} --- definiteness of NP ?
|
||||
in ap.s ! False ! (NCase agr.n c)
|
||||
in ap.s ! False ! (NCase n c)
|
||||
} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPCase Nom} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
Reference in New Issue
Block a user