preliminary implementation of GerundN and GerundAP in ParseFin. More coverage, but some strange translations.

This commit is contained in:
aarne
2013-03-29 12:45:24 +00:00
parent ca73f4554c
commit 01f12a135b
4 changed files with 54 additions and 11 deletions

View File

@@ -117,6 +117,7 @@ oper
mkN : (pika : Str) -> (juna : N) -> N ; -- compound with invariable prefix mkN : (pika : Str) -> (juna : N) -> N ; -- compound with invariable prefix
mkN : (oma : N) -> (tunto : N) -> N ; -- compound with inflecting prefix mkN : (oma : N) -> (tunto : N) -> N ; -- compound with inflecting prefix
mkN : NK -> N ; -- noun from DictFin (Kotus) mkN : NK -> N ; -- noun from DictFin (Kotus)
mkN : V -> N ; -- verbal noun: "tekeminen"
} ; } ;
-- Some nouns are regular except for the singular nominative (e.g. "mies"). -- Some nouns are regular except for the singular nominative (e.g. "mies").
@@ -344,6 +345,7 @@ mkVS = overload {
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 -> nforms2snoun w.s ;
mkN : V -> N = \w -> sverb2snoun w ;
} ; } ;
exceptNomN : N -> Str -> N = \noun,nom -> lin N { exceptNomN : N -> Str -> N = \noun,nom -> lin N {

View File

@@ -86,18 +86,9 @@ lin
isPron = np1.isPron ; isNeg = np1.isNeg isPron = np1.isPron ; isNeg = np1.isNeg
} ; } ;
GerundN v = mkN (lin V v) ;
{-
GerundN v = { -- parsing -- GerundN : V -> N ; peseminen
s = \\n,c => v.s ! VPresPart ;
g = Neutr
} ;
GerundAP v = { -- beckoning -- V -> AP houkutteleva GerundAP v = {s = \\_ => (snoun2nounSep (sverb2nounPresPartAct v)).s} ;
s = \\agr => v.s ! VPresPart ;
isPre = True
} ;
-}
OrdCompar a = snoun2nounSep {s = \\nc => a.s ! Compar ! SAN nc ; h = a.h} ; OrdCompar a = snoun2nounSep {s = \\nc => a.s ! Compar ! SAN nc ; h = a.h} ;

View File

@@ -271,6 +271,51 @@ oper
-- (Verb ** {sc : NPForm ; qp : Bool ; p : Str}) -> VP = \verb -> { -- (Verb ** {sc : NPForm ; qp : Bool ; p : Str}) -> VP = \verb -> {
-- word formation functions
sverb2snoun : SVerb1 -> SNoun = \v -> -- syöminen
let teke = v.s ! 3 in {
s = table {
0 => partPlus teke "minen" ;
1 => partPlus teke "mise" ;
2 => partPlus teke "mista" ; ---- vh
3 => partPlus teke "misena" ; ---- vh
4 => partPlus teke "misee" ;
5 => partPlus teke "miste" ;
6 => partPlus teke "misia" ; ---- vh
7 => partPlus teke "misi" ;
8 => partPlus teke "misi" ;
9 => partPlus teke "misii"
} ;
h = v.h
} ;
sverb2nounPresPartAct : SVerb1 -> SNoun = \v -> -- syövä
let teke = v.s ! 3 in {
s = table {
0 => partPlus teke "va" ;
1 => partPlus teke "va" ;
2 => partPlus teke "vaa" ; ---- vh
3 => partPlus teke "vana" ; ---- vh
4 => partPlus teke "vaa" ;
5 => partPlus teke "vie" ;
6 => partPlus teke "via" ; ---- vh
7 => partPlus teke "vi" ;
8 => partPlus teke "vi" ;
9 => partPlus teke "vii"
} ;
h = v.h
} ;
sverb2nounPresPartPass : SVerb1 -> SNoun = \v -> -- syötävä
let a = harmonyA v.h in
nforms2snoun (dLava (partPlus (v.s ! 3) (partPlus "t" (partPlus a (partPlus "v" a))))) ;
dLava : Str -> NForms = \s -> dUkko s (s + "n") ;
--- to use these at run time in ParseFin
partPlus = glue ;
-- auxiliary -- auxiliary
plusIf : Bool -> Str -> Str -> Str = \b,x,y -> case b of { plusIf : Bool -> Str -> Str -> Str = \b,x,y -> case b of {

View File

@@ -22,4 +22,9 @@ are completely translated (but mostly not so well...)
317 no lin 317 no lin
182 lin with unknowns 182 lin with unknowns
After implementing GerundN and GerundNP, only 40 lin with unknowns. But the implementations are bad:
- applying to run-time V prevents correct vowel harmony
- composite forms with "minen" should be "mis", e.g. hinnoitteleminendetaljit