mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
solved the issue with it_Pron not having possessive suffix in Fin; fixed a number of warnings in Fin
This commit is contained in:
@@ -32,7 +32,7 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP np adv = {
|
ExtAdvNP np adv = {
|
||||||
s = \\c => np.s ! c ++ frontComma ++ adv.s ++ finalComma;
|
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
||||||
a = np.a
|
a = np.a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
|
|
||||||
ConjS = conjunctDistrSS ;
|
ConjS = conjunctDistrSS ;
|
||||||
|
|
||||||
ConjAdv = conjunctDistrSS ;
|
ConjAdv, ConjAdV = conjunctDistrSS ;
|
||||||
|
|
||||||
ConjIAdv = conjunctDistrSS ;
|
ConjIAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
@@ -30,8 +30,8 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
|
|
||||||
BaseS = twoSS ;
|
BaseS = twoSS ;
|
||||||
ConsS = consrSS comma ;
|
ConsS = consrSS comma ;
|
||||||
BaseAdv = twoSS ;
|
BaseAdv, BaseAdV = twoSS ;
|
||||||
ConsAdv = consrSS comma ;
|
ConsAdv, ConsAdV = consrSS comma ;
|
||||||
BaseIAdv = twoSS ;
|
BaseIAdv = twoSS ;
|
||||||
ConsIAdv = consrSS comma ;
|
ConsIAdv = consrSS comma ;
|
||||||
BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a ; isNeg = orB x.isNeg y.isNeg} ;
|
BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a ; isNeg = orB x.isNeg y.isNeg} ;
|
||||||
@@ -45,7 +45,7 @@ concrete ConjunctionFin of Conjunction =
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
[Adv] = {s1,s2 : Str} ;
|
[Adv],[AdV] = {s1,s2 : Str} ;
|
||||||
[IAdv] = {s1,s2 : Str} ;
|
[IAdv] = {s1,s2 : Str} ;
|
||||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr ; isNeg : Bool} ;
|
[NP] = {s1,s2 : NPForm => Str ; a : Agr ; isNeg : Bool} ;
|
||||||
[AP] = {s1,s2 : Bool => NForm => Str} ;
|
[AP] = {s1,s2 : Bool => NForm => Str} ;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
--# -coding=latin1
|
--# -coding=latin1
|
||||||
abstract ExtraFinAbs = Extra [
|
abstract ExtraFinAbs = Extra [
|
||||||
|
IP, IQuant,Num,CN,VPSlash,
|
||||||
GenNP,GenIP,GenRP,
|
GenNP,GenIP,GenRP,
|
||||||
PassVPSlash, PassAgentVPSlash,
|
PassVPSlash, PassAgentVPSlash,
|
||||||
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
||||||
@@ -9,7 +10,7 @@ abstract ExtraFinAbs = Extra [
|
|||||||
fun
|
fun
|
||||||
GenCN : NP -> CN -> CN ; -- auton merkki
|
GenCN : NP -> CN -> CN ; -- auton merkki
|
||||||
|
|
||||||
AdvExistNP : Adv -> NP -> Cl ; -- kuvassa olemme me
|
AdvExistNP : Adv -> NP -> Cl ; -- kuvassa olemme me --- now obsolete because of Idiom.ExistNPAdv
|
||||||
AdvPredNP : Adv -> V -> NP -> Cl ; -- kuvassa hymyilee Veikko
|
AdvPredNP : Adv -> V -> NP -> Cl ; -- kuvassa hymyilee Veikko
|
||||||
|
|
||||||
ICompExistNP : IComp -> NP -> QCl ; -- missä/kuka on Veikko
|
ICompExistNP : IComp -> NP -> QCl ; -- missä/kuka on Veikko
|
||||||
|
|||||||
@@ -55,7 +55,14 @@ concrete IdiomFin of Idiom = CatFin **
|
|||||||
let vps = (sverb2verbSep vp.s).s ! ImperP1Pl
|
let vps = (sverb2verbSep vp.s).s ! ImperP1Pl
|
||||||
in
|
in
|
||||||
{s = vps ++
|
{s = vps ++
|
||||||
vp.s2 ! True ! Pos ! Ag Pl P1 ++ vp.ext
|
vp.s2 ! True ! Pos ! Ag Pl P1 ++ vp.adv ! Pos ++ vp.ext
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ImpP3 np vp =
|
||||||
|
let vps = (sverb2verbSep vp.s).s ! ImperP3 (verbAgr np.a).n
|
||||||
|
in
|
||||||
|
{s = np.s ! vp.s.sc ++ vps ++
|
||||||
|
vp.s2 ! True ! Pos ! np.a ++ vp.adv ! Pos ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SelfAdvVP vp = insertAdv (\\_ => "itse") vp ;
|
SelfAdvVP vp = insertAdv (\\_ => "itse") vp ;
|
||||||
@@ -67,6 +74,19 @@ concrete IdiomFin of Idiom = CatFin **
|
|||||||
isNeg = np.isNeg
|
isNeg = np.isNeg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
ExistNPAdv np adv =
|
||||||
|
mkClause (\_ -> adv.s) np.a (insertObj
|
||||||
|
(\\_,b,_ => np.s ! NPCase Nom) (predV vpVerbOlla)) ;
|
||||||
|
|
||||||
|
ExistIPAdv ip adv =
|
||||||
|
let
|
||||||
|
c = case ip.n of {Sg => Nom ; Pl => Part} ;
|
||||||
|
cl = mkClause (\_ -> ip.s ! NPCase c ++ adv.s) (agrP3 Sg) -- kuka täällä on ; keitä täällä on
|
||||||
|
(predV vpVerbOlla) ;
|
||||||
|
in {
|
||||||
|
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
|
||||||
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
olla = vpVerbOlla ;
|
olla = vpVerbOlla ;
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
|
|||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
isPron = False ; isNeg = False
|
isPron = False ; isNeg = False
|
||||||
} ;
|
} ;
|
||||||
UsePron p = p ** {isPron = True ; isNeg = False} ;
|
UsePron p = p ** {isPron = p.hasPoss ; isNeg = False} ; -- to block "se"; possessive suffix is the only use of isPron
|
||||||
|
|
||||||
PredetNP pred np = {
|
PredetNP pred np = {
|
||||||
s = \\c => pred.s ! complNumAgr np.a ! c ++ np.s ! c ;
|
s = \\c => pred.s ! complNumAgr np.a ! c ++ np.s ! c ;
|
||||||
@@ -84,6 +84,13 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
|
|||||||
isNeg = np.isNeg
|
isNeg = np.isNeg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
ExtAdvNP np adv = {
|
||||||
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
|
a = np.a ;
|
||||||
|
isPron = np.isPron ; -- minun täällä - ni
|
||||||
|
isNeg = np.isNeg
|
||||||
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
||||||
sp = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
sp = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
|
||||||
|
|||||||
@@ -332,11 +332,11 @@ mkVS = overload {
|
|||||||
|
|
||||||
mkDet = overload {
|
mkDet = overload {
|
||||||
mkDet : Number -> N -> Det
|
mkDet : Number -> N -> Det
|
||||||
= \nu,noun -> MorphoFin.mkDet nu (snoun2nounBind noun) ;
|
= \nu,noun -> lin Det (MorphoFin.mkDet nu (snoun2nounBind noun)) ;
|
||||||
mkDet : (isNeg : Bool) -> Number -> N -> Det -- use this with True to create a negative determiner
|
mkDet : (isNeg : Bool) -> Number -> N -> Det -- use this with True to create a negative determiner
|
||||||
= \isNeg,nu,noun -> MorphoFin.mkDetPol isNeg nu (snoun2nounBind noun) ;
|
= \isNeg,nu,noun -> lin Det (MorphoFin.mkDetPol isNeg nu (snoun2nounBind noun)) ;
|
||||||
mkDet : (isNeg : Bool) -> Number -> N -> Case -> Det -- paljon + False + partitive, ei yhtään + True + partitive
|
mkDet : (isNeg : Bool) -> Number -> N -> Case -> Det -- paljon + False + partitive, ei yhtään + True + partitive
|
||||||
= \isNeg,nu,noun,_ -> MorphoFin.mkDetPol isNeg nu (snoun2nounBind noun) ;
|
= \isNeg,nu,noun,_ -> lin Det (MorphoFin.mkDetPol isNeg nu (snoun2nounBind noun)) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkInterj : Str -> Interj
|
mkInterj : Str -> Interj
|
||||||
@@ -403,8 +403,8 @@ mkVS = overload {
|
|||||||
: Str) -> N = mk10N ;
|
: Str) -> N = mk10N ;
|
||||||
mkN : (sora : Str) -> (tie : N) -> N = mkStrN ;
|
mkN : (sora : Str) -> (tie : N) -> N = mkStrN ;
|
||||||
mkN : (oma,tunto : N) -> N = mkNN ;
|
mkN : (oma,tunto : N) -> N = mkNN ;
|
||||||
mkN : (sana : NK) -> N = \w -> nforms2snoun w.s ;
|
mkN : (sana : NK) -> N = \w -> lin N (nforms2snoun w.s) ;
|
||||||
mkN : V -> N = \w -> sverb2snoun w ;
|
mkN : V -> N = \w -> lin N (sverb2snoun w) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
exceptNomN : N -> Str -> N = \noun,nom -> lin N (exceptNomSNoun noun nom) ;
|
exceptNomN : N -> Str -> N = \noun,nom -> lin N (exceptNomSNoun noun nom) ;
|
||||||
@@ -413,10 +413,10 @@ mkVS = overload {
|
|||||||
---- mkNA : N -> A = snoun2sadj ;
|
---- mkNA : N -> A = snoun2sadj ;
|
||||||
|
|
||||||
mk1N : (talo : Str) -> N = \s -> lin N (nforms2snoun (nForms1 s)) ;
|
mk1N : (talo : Str) -> N = \s -> lin N (nforms2snoun (nForms1 s)) ;
|
||||||
mk2N : (talo,talon : Str) -> N = \s,t -> nforms2snoun (nForms2 s t) ;
|
mk2N : (talo,talon : Str) -> N = \s,t -> lin N (nforms2snoun (nForms2 s t)) ;
|
||||||
mk3N : (talo,talon,taloja : Str) -> N = \s,t,u -> nforms2snoun (nForms3 s t u) ;
|
mk3N : (talo,talon,taloja : Str) -> N = \s,t,u -> lin N (nforms2snoun (nForms3 s t u)) ;
|
||||||
mk4N : (talo,talon,taloa,taloja : Str) -> N = \s,t,u,v ->
|
mk4N : (talo,talon,taloa,taloja : Str) -> N = \s,t,u,v ->
|
||||||
nforms2snoun (nForms4 s t u v) ;
|
lin N (nforms2snoun (nForms4 s t u v)) ;
|
||||||
mk10N :
|
mk10N :
|
||||||
(talo,talon,taloa,talona,taloon,talojen,taloja,taloina,taloissa,taloihin
|
(talo,talon,taloa,talona,taloon,talojen,taloja,taloina,taloissa,taloihin
|
||||||
: Str) -> N = \a,b,c,d,e,f,g,h,i,j ->
|
: Str) -> N = \a,b,c,d,e,f,g,h,i,j ->
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ concrete StructuralFin of Structural = CatFin **
|
|||||||
can_VV = mkVV (mkV "voida" "voi") ;
|
can_VV = mkVV (mkV "voida" "voi") ;
|
||||||
during_Prep = postGenPrep "aikana" ;
|
during_Prep = postGenPrep "aikana" ;
|
||||||
either7or_DConj = sd2 "joko" "tai" ** {n = Sg} ;
|
either7or_DConj = sd2 "joko" "tai" ** {n = Sg} ;
|
||||||
everybody_NP = makeNP (snoun2nounBind (mkN "jokainen")) Sg ;
|
everybody_NP = lin NP (makeNP (lin N (snoun2nounBind (mkN "jokainen"))) Sg) ;
|
||||||
every_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "jokainen")) ;
|
every_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "jokainen")) ;
|
||||||
everything_NP = makeNP (((snoun2nounBind (mkN "kaikki" "kaiken" "kaikkena"))) **
|
everything_NP = makeNP (((snoun2nounBind (mkN "kaikki" "kaiken" "kaikkena"))) **
|
||||||
{lock_N = <>}) Sg ;
|
{lock_N = <>}) Sg ;
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
|
|||||||
SlashV2VNP = StemFin.slashV2VNP ; ---- compilation to pgf takes too long 6/8/2013 hence a simplified version in stemmed/
|
SlashV2VNP = StemFin.slashV2VNP ; ---- compilation to pgf takes too long 6/8/2013 hence a simplified version in stemmed/
|
||||||
|
|
||||||
AdvVP vp adv = insertAdv (\\_ => adv.s) vp ;
|
AdvVP vp adv = insertAdv (\\_ => adv.s) vp ;
|
||||||
|
ExtAdvVP vp adv = insertAdv (\\_ => embedInCommas adv.s) vp ;
|
||||||
|
|
||||||
AdVVP adv vp = insertAdv (\\_ => adv.s) vp ;
|
AdVVP adv vp = insertAdv (\\_ => adv.s) vp ;
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashV2V v ant p vp =
|
SlashV2V v ant p vp =
|
||||||
insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ;
|
insertObj (\\_,b,a => infVP v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ; ----
|
||||||
|
---- insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
CompS s = {s = \\_ => "että" ++ s.s} ; -- S -> Comp ---- what are these expected to do ? 29/3/2013
|
CompS s = {s = \\_ => "että" ++ s.s} ; -- S -> Comp ---- what are these expected to do ? 29/3/2013
|
||||||
CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.s.sc Pos a vp Inf1} ; -- VP -> Comp
|
CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.s.sc Pos a vp Inf1} ; -- VP -> Comp
|
||||||
|
|||||||
@@ -113,6 +113,11 @@ oper
|
|||||||
PARA : Str = "&-" ;
|
PARA : Str = "&-" ;
|
||||||
CAPIT : Str = "&|" ;
|
CAPIT : Str = "&|" ;
|
||||||
|
|
||||||
|
-- Embed between commas, where the latter one disappears in front of other punctuation
|
||||||
|
|
||||||
|
embedInCommas : Str -> Str = \s -> SOFT_BIND ++ "," ++ s ++ endComma ;
|
||||||
|
endComma : Str = pre {"," | "." => []; "" => SOFT_BIND ++ ","; _ => []} ;
|
||||||
|
|
||||||
--2 Miscellaneous
|
--2 Miscellaneous
|
||||||
|
|
||||||
-- Identity function
|
-- Identity function
|
||||||
|
|||||||
Reference in New Issue
Block a user