finished the refactoring of Fin with unstemmed (for library use) and stemmed (for large-scale parsing use). All differences are located in the file StemFin.

This commit is contained in:
aarne
2013-08-07 09:52:40 +00:00
parent df7b8d8016
commit 4e7f3766cb
6 changed files with 30 additions and 14 deletions

View File

@@ -279,7 +279,7 @@ concrete WordsFin of Words = SentencesFin **
by = SyntaxFin.mkAdv (casePrep adessive) (mkNP n)
} ;
mkSuperl : A -> Det = \a -> mkDet the_Quant (mkOrd a) ;
mkSuperl : A -> Det = \a -> SyntaxFin.mkDet the_Quant (mkOrd a) ;
far_IAdv = E.IAdvAdv L.far_Adv ;

View File

@@ -12,10 +12,7 @@ lincat
lin
num x = x ;
n2 = co
(nhn (mkSubst "a" "kaksi" "kahde" "kahte" "kahta" "kahteen" "kaksi" "kaksi"
"kaksien" "kaksia" "kaksiin"))
(ordN "a" "kahdes") ; --- toinen
n2 = kaksi_toinenN ;
n3 = co
(nhn (mkSubst "a" "kolme" "kolme" "kolme" "kolmea" "kolmeen" "kolmi" "kolmi"
"kolmien" "kolmia" "kolmiin"))
@@ -109,6 +106,10 @@ oper
(nhn (mkSubst "ä" "yksi" "yhde" "yhte" "yhtä" "yhteen" "yksi" "yksi"
"yksien" "yksiä" "yksiin"))
(snoun2nounBind (mkN "ensimmäinen")) ; -- ensimmäinen ---- sadasensimmäinentuhannes
kaksi_toinenN = co
(nhn (mkSubst "a" "kaksi" "kahde" "kahte" "kahta" "kahteen" "kaksi" "kaksi"
"kaksien" "kaksia" "kaksiin"))
(snoun2nounBind (mkN "toinen")) ;
kymmenenN = co
(nhn (mkSubst "ä" "kymmenen" "kymmene" "kymmene" "kymmentä"
"kymmeneen" "kymmeni" "kymmeni" "kymmenien" "kymmeniä" "kymmeniin"))

View File

@@ -701,7 +701,7 @@ mkVS = overload {
caseV c v = {s = v.s ; sc = NPCase c ; h = v.h ; lock_V = <> ; p = v.p} ;
vOlla = {
s = table SVForm ["olla";"ole";"on";"o";"olk";"olla";"oli";"oli";"olisi";"oll";"oltu";"ollu";"liene";"ole"] ;
s = ollaSVerbForms ;
sc = NPCase Nom ; h = Back ; lock_V = <> ; p = []} ; ---- lieneekö
mk2V2 : V -> Prep -> V2 = \v,c -> v ** {c2 = c ; lock_V2 = <>} ;

View File

@@ -454,7 +454,7 @@ oper
infVP : NPForm -> Polarity -> Agr -> VP -> InfForm -> Str = infVPGen Pos ;
-- The definitions below were moved here from $MorphoFin$ so that we the
-- The definitions below were moved here from $MorphoFin$ so that the
-- auxiliary of predication can be defined.
verbOlla : Verb =

View File

@@ -67,13 +67,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
h = v.h ; p = v.p
}
) ** {c2 = vp.c2} ; ---- correct ??
-- { ---- 153543936 (210912,312)
SlashV2VNP v np vp =
insertObjPre np.isNeg
(\fin,b,a -> appCompl fin b v.c2 np ++ ---- compilation to pgf takes too long 6/8/2013
infVP v.sc b a vp v.vi)
(predSV v) ** {c2 = vp.c2} ;
---- }
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 ;

View File

@@ -174,6 +174,8 @@ oper
SVForm : Type = Predef.Ints 13 ;
SVerb : Type = {s : SVForm => Str ; h : Harmony} ;
ollaSVerbForms : SVForm => Str = table SVForm ["olla";"ole";"on";"o";"olk";"olla";"oli";"oli";"olisi";"oll";"oltu";"ollu";"liene";"ole"] ;
-- used in Cat
SVerb1 = {s : SVForm => Str ; sc : NPForm ; h : Harmony ; p : Str} ;
@@ -407,4 +409,22 @@ oper
_ => BIND ++ ":" ++ BIND
} ;
-----------------------------------------------------------------------
---- a hack to make VerbFin compile accurately for library (in ../),
---- and in a simplified way for ParseFin (here)
slashV2VNP : (SVerb1 ** {c2 : Compl ; vi : InfForm}) -> (NP ** {isNeg : Bool}) ->
(VP ** {c2 : Compl}) -> (VP ** {c2 : Compl})
= \v, np, vp ->
insertObjPre False ---- ignoring np.isNeg
(\fin,b,a -> np.s ! v.c2.c ++ vp.c2.s ++
---- appCompl fin b v.c2 np ++ -- ignoring Acc variation and pre/postposition
(let verb = vp.s ! VIInf v.vi ! Simul ! Pos ! a
in verb.fin ++ verb.inf ++ vp.s2 ! fin ! b ! a ++ vp.adv ! b ++ vp.ext)
---- infVP v.sc b a vp v.vi -- ignoring neg vp's and possessive suffix of inf
)
(predSV v) ** {c2 = vp.c2} ;
}