solved the issue with it_Pron not having possessive suffix in Fin; fixed a number of warnings in Fin

This commit is contained in:
aarne
2013-12-11 08:06:01 +00:00
parent 19d2e41781
commit 168e7d54a3
10 changed files with 53 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
} ;
ExtAdvNP np adv = {
s = \\c => np.s ! c ++ frontComma ++ adv.s ++ finalComma;
s = \\c => np.s ! c ++ embedInCommas adv.s ;
a = np.a
} ;

View File

@@ -7,7 +7,7 @@ concrete ConjunctionFin of Conjunction =
ConjS = conjunctDistrSS ;
ConjAdv = conjunctDistrSS ;
ConjAdv, ConjAdV = conjunctDistrSS ;
ConjIAdv = conjunctDistrSS ;
@@ -30,8 +30,8 @@ concrete ConjunctionFin of Conjunction =
BaseS = twoSS ;
ConsS = consrSS comma ;
BaseAdv = twoSS ;
ConsAdv = consrSS comma ;
BaseAdv, BaseAdV = twoSS ;
ConsAdv, ConsAdV = consrSS comma ;
BaseIAdv = twoSS ;
ConsIAdv = consrSS comma ;
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
[S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str} ;
[Adv],[AdV] = {s1,s2 : Str} ;
[IAdv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : NPForm => Str ; a : Agr ; isNeg : Bool} ;
[AP] = {s1,s2 : Bool => NForm => Str} ;

View File

@@ -1,5 +1,6 @@
--# -coding=latin1
abstract ExtraFinAbs = Extra [
IP, IQuant,Num,CN,VPSlash,
GenNP,GenIP,GenRP,
PassVPSlash, PassAgentVPSlash,
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
@@ -9,7 +10,7 @@ abstract ExtraFinAbs = Extra [
fun
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
ICompExistNP : IComp -> NP -> QCl ; -- missä/kuka on Veikko

View File

@@ -55,7 +55,14 @@ concrete IdiomFin of Idiom = CatFin **
let vps = (sverb2verbSep vp.s).s ! ImperP1Pl
in
{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 ;
@@ -67,6 +74,19 @@ concrete IdiomFin of Idiom = CatFin **
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
olla = vpVerbOlla ;

View File

@@ -61,7 +61,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
a = agrP3 Sg ;
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 = {
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
} ;
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 = {
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 ;

View File

@@ -332,11 +332,11 @@ mkVS = overload {
mkDet = overload {
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
= \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
= \isNeg,nu,noun,_ -> MorphoFin.mkDetPol isNeg nu (snoun2nounBind noun) ;
= \isNeg,nu,noun,_ -> lin Det (MorphoFin.mkDetPol isNeg nu (snoun2nounBind noun)) ;
} ;
mkInterj : Str -> Interj
@@ -403,8 +403,8 @@ mkVS = overload {
: Str) -> N = mk10N ;
mkN : (sora : Str) -> (tie : N) -> N = mkStrN ;
mkN : (oma,tunto : N) -> N = mkNN ;
mkN : (sana : NK) -> N = \w -> nforms2snoun w.s ;
mkN : V -> N = \w -> sverb2snoun w ;
mkN : (sana : NK) -> N = \w -> lin N (nforms2snoun w.s) ;
mkN : V -> N = \w -> lin N (sverb2snoun w) ;
} ;
exceptNomN : N -> Str -> N = \noun,nom -> lin N (exceptNomSNoun noun nom) ;
@@ -413,10 +413,10 @@ mkVS = overload {
---- mkNA : N -> A = snoun2sadj ;
mk1N : (talo : Str) -> N = \s -> lin N (nforms2snoun (nForms1 s)) ;
mk2N : (talo,talon : Str) -> N = \s,t -> nforms2snoun (nForms2 s t) ;
mk3N : (talo,talon,taloja : Str) -> N = \s,t,u -> nforms2snoun (nForms3 s t u) ;
mk2N : (talo,talon : Str) -> N = \s,t -> lin N (nforms2snoun (nForms2 s t)) ;
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 ->
nforms2snoun (nForms4 s t u v) ;
lin N (nforms2snoun (nForms4 s t u v)) ;
mk10N :
(talo,talon,taloa,talona,taloon,talojen,taloja,taloina,taloissa,taloihin
: Str) -> N = \a,b,c,d,e,f,g,h,i,j ->

View File

@@ -33,7 +33,7 @@ concrete StructuralFin of Structural = CatFin **
can_VV = mkVV (mkV "voida" "voi") ;
during_Prep = postGenPrep "aikana" ;
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")) ;
everything_NP = makeNP (((snoun2nounBind (mkN "kaikki" "kaiken" "kaikkena"))) **
{lock_N = <>}) Sg ;

View File

@@ -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/
AdvVP vp adv = insertAdv (\\_ => adv.s) vp ;
ExtAdvVP vp adv = insertAdv (\\_ => embedInCommas adv.s) vp ;
AdVVP adv vp = insertAdv (\\_ => adv.s) vp ;

View File

@@ -94,7 +94,8 @@ lin
} ;
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
CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.s.sc Pos a vp Inf1} ; -- VP -> Comp

View File

@@ -113,6 +113,11 @@ oper
PARA : 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
-- Identity function