changed Finnish VP so that the verb is stored as such. This makes compilation and parsing several times faster. TODO: treat passivization correctly; optimize further by only storing the stems.

This commit is contained in:
aarne
2013-12-07 11:13:17 +00:00
parent 0f2cc75490
commit a03037b830
9 changed files with 70 additions and 39 deletions

View File

@@ -21,7 +21,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
insertObj
(\\_,b,a => infVP v.sc b a vp v.vi)
(predSV {s = v.s ;
sc = case vp.sc of {
sc = case vp.s.sc of {
NPCase Nom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto
} ;
@@ -61,7 +61,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
insertObj
(\\_,b,a => infVP v.sc b a vp v.vi)
(predSV {s = v.s ;
sc = case vp.sc of {
sc = case vp.s.sc of {
NPCase Nom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto
} ;
@@ -82,10 +82,14 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
ReflVP v = insertObjPre False (\fin,b,agr -> appCompl fin b v.c2 (reflPron agr)) v ;
PassV2 v = let vp = predSV v in {
---- TODO
{- ----
s = \\vif,ant,pol,agr => case vif of {
VIFin t => vp.s ! VIPass t ! ant ! pol ! agr ;
_ => vp.s ! vif ! ant ! pol ! agr
} ;
-}
s = vp.s ;
s2 = \\_,_,_ => [] ;
adv = \\_ => [] ;
ext = [] ;
@@ -94,8 +98,6 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in {
sc = v.c2.c ; -- minut valitaan ; minua rakastetaan ; minulle kuiskataan
} ; ---- talon valitaan: should be marked like inf.
----b UseVS, UseVQ = \v -> v ** {c2 = {s = [] ; c = NPAcc ; isPre = True}} ;
CompAP ap = {
s = \\agr =>
let