1
0
forked from GitHub/gf-rgl

Merge remote-tracking branch 'upstream/master' into por

This commit is contained in:
odanoburu
2018-05-28 16:22:54 -03:00
17 changed files with 142 additions and 111 deletions

View File

@@ -2,19 +2,19 @@ concrete AdverbChi of Adverb = CatChi **
open ResChi, Prelude in {
lin
PositAdvAdj a = {s = a.s ++ "地" ; advType = ATManner} ; ---- for all adjs?
PositAdvAdj a = {s = a.s ++ "地" ; advType = ATManner ; hasDe = False} ; ---- for all adjs?
PrepNP prep np = ss (appPrep prep np.s) ** {advType = prep.advType} ; --- should depend on np too ?
PrepNP prep np = ss (appPrep prep np.s) ** {advType = prep.advType ; hasDe = prep.hasDe} ; --- should depend on np too ?
ComparAdvAdj cadv a np = ss (a.s ++ cadv.s ++ cadv.p ++ np.s) ** {advType = ATManner} ;
ComparAdvAdj cadv a np = ss (a.s ++ cadv.s ++ cadv.p ++ np.s) ** {advType = ATManner ; hasDe = False} ;
ComparAdvAdjS cadv a s = ss (a.s ++ cadv.s ++ cadv.p ++ s.s) ** {advType = ATManner} ;
ComparAdvAdjS cadv a s = ss (a.s ++ cadv.s ++ cadv.p ++ s.s) ** {advType = ATManner ; hasDe = False} ;
AdAdv adv ad = ss (ad.s ++ adv.s) ** {advType = ad.advType} ;
AdAdv ad adv = adv ** {s = ad.s ++ adv.s} ;
SubjS subj s = ss (subj.prePart ++ s.s ++ subj.sufPart) ** {advType = ATTime} ;
SubjS subj s = ss (subj.prePart ++ s.s ++ subj.sufPart) ** {advType = ATTime ; hasDe = False} ;
AdnCAdv cadv = ss (cadv.s ++ conjThat) ** {advType = ATManner} ; -----
AdnCAdv cadv = ss (cadv.s ++ conjThat) ** {advType = ATManner ; hasDe = False} ; -----
PositAdAAdj a = {s = a.s} ; ----

View File

@@ -50,7 +50,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
Ord = {s : Str} ;
Num = {s : Str ; numType : NumType} ;
Adv = {s : Str ; advType : AdvType} ;
Adv = {s : Str ; advType : AdvType ; hasDe : Bool} ;
-- Numeral

View File

@@ -3,9 +3,9 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
lin
ConjS c = conjunctDistrSS (c.s ! CSent) ;
ConjAdv c as = conjunctDistrSS (c.s ! CSent) as ** {advType = as.advType} ; ---- ??
ConjAdv c as = conjunctDistrSS (c.s ! CSent) as ** {advType = as.advType ; hasDe = as.hasDe} ; ---- ??
ConjNP c = conjunctDistrSS (c.s ! CPhr CNPhrase) ;
ConjAP c as = conjunctDistrSS (c.s ! CPhr CAPhrase) as ** {monoSyl = False ; hasAdA = True} ; ---- ??
ConjAP c as = conjunctDistrSS (c.s ! CPhr CAPhrase) as ** {monoSyl = notB as.monoSyl ; hasAdA = True} ; ---- add de iff as doesn't
ConjRS c = conjunctDistrSS (c.s ! CSent) ;
ConjCN c ns = conjunctDistrSS (c.s ! CPhr CNPhrase) ns ** {c = ns.c} ;
@@ -13,12 +13,12 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
BaseS = twoSS ;
ConsS = consrSS duncomma ;
BaseAdv x y = twoSS x y ** {advType = x.advType} ; ---- ??
ConsAdv x xs = consrSS duncomma x xs ** {advType = x.advType} ; ---- ??
BaseAdv x y = twoSS x y ** {advType = x.advType ; hasDe = y.hasDe} ; ---- ??
ConsAdv x xs = consrSS duncomma x xs ** {advType = x.advType ; hasDe = xs.hasDe} ; ---- ??
BaseNP = twoSS ;
ConsNP = consrSS duncomma ;
BaseAP = twoSS ;
ConsAP = consrSS duncomma ;
BaseAP x y = twoSS x y ** {monoSyl = y.monoSyl} ;
ConsAP x xs = consrSS duncomma x xs ** {monoSyl = xs.monoSyl} ;
BaseRS = twoSS ;
ConsRS = consrSS duncomma ;
BaseCN x y = twoSS x y ** {c = x.c} ; --- classified comes from first part ; should it rather be ge?
@@ -26,9 +26,9 @@ concrete ConjunctionChi of Conjunction = CatChi ** open ResChi, Prelude, Coordin
lincat
[S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str ; advType : AdvType} ;
[Adv] = {s1,s2 : Str ; advType : AdvType ; hasDe : Bool} ;
[NP] = {s1,s2 : Str} ;
[AP] = {s1,s2 : Str} ;
[AP] = {s1,s2 : Str ; monoSyl : Bool} ;
[RS] = {s1,s2 : Str} ;
[CN] = {s1,s2 : Str ; c : Str} ;

View File

@@ -36,16 +36,16 @@ lincat
Month = N ;
Year = NP ;
lin
weekdayPunctualAdv w = lin Adv {s = w.s ; advType = timeAdvType} ;
weekdayHabitualAdv w = lin Adv {s = w.s ; advType = timeAdvType} ;
weekdayNextAdv w = lin Adv {s = "下" ++ w.s ; advType = timeAdvType} ;
weekdayLastAdv w = lin Adv {s = "上" ++ w.s ; advType = timeAdvType} ;
weekdayPunctualAdv w = lin Adv {s = w.s ; advType = timeAdvType ; hasDe = False} ;
weekdayHabitualAdv w = lin Adv {s = w.s ; advType = timeAdvType ; hasDe = False} ;
weekdayNextAdv w = lin Adv {s = "下" ++ w.s ; advType = timeAdvType ; hasDe = False} ;
weekdayLastAdv w = lin Adv {s = "上" ++ w.s ; advType = timeAdvType ; hasDe = False} ;
monthAdv m = lin Adv {s = m.s ; advType = timeAdvType} ;
yearAdv y = lin Adv {s = y.s ++ "年" ; advType = timeAdvType} ;
dayMonthAdv d m = lin Adv {s = m.s ++ d.s ++ "日" ; advType = timeAdvType} ;
monthYearAdv m y = lin Adv {s = y.s ++ "年" ++ m.s ; advType = timeAdvType} ;
dayMonthYearAdv d m y = lin Adv {s = y.s ++ "年" ++ m.s ++ d.s ++ "日" ; advType = timeAdvType} ;
monthAdv m = lin Adv {s = m.s ; advType = timeAdvType ; hasDe = False} ;
yearAdv y = lin Adv {s = y.s ++ "年" ; advType = timeAdvType ; hasDe = False} ;
dayMonthAdv d m = lin Adv {s = m.s ++ d.s ++ "日" ; advType = timeAdvType ; hasDe = False} ;
monthYearAdv m y = lin Adv {s = y.s ++ "年" ++ m.s ; advType = timeAdvType ; hasDe = False} ;
dayMonthYearAdv d m y = lin Adv {s = y.s ++ "年" ++ m.s ++ d.s ++ "日" ; advType = timeAdvType ; hasDe = False} ;
intYear i = lin NP i ;
intMonthday i = lin NP i ;

View File

@@ -20,8 +20,8 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
PPartNP np v2 = mkNP ((predV v2 v2.part).verb.s ++ possessive_s ++ np.s) ; ---- ??
AdvNP np adv = mkNP (adv.s ++ possessiveIf adv.advType ++ np.s) ;
ExtAdvNP np adv = mkNP (adv.s ++ possessiveIf adv.advType ++ embedInCommas np.s) ; ---- commas?
AdvNP np adv = mkNP (adv.s ++ possessiveIf adv.hasDe ++ np.s) ;
ExtAdvNP np adv = mkNP (adv.s ++ possessiveIf adv.hasDe ++ embedInCommas np.s) ; ---- commas?
DetQuant quant num = {
s = case num.numType of {
@@ -85,7 +85,7 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
} ;
RelCN cn rs = {s = rs.s ++ cn.s ; c = cn.c} ;
AdvCN cn ad = {s = ad.s ++ possessiveIf ad.advType ++ cn.s ; c = cn.c} ;
AdvCN cn ad = {s = ad.s ++ possessiveIf ad.hasDe ++ cn.s ; c = cn.c} ;
SentCN cn cs = {s = cs.s ++ cn.s ; c = cn.c} ;
ApposCN cn np = {s = np.s ++ cn.s ; c = cn.c} ;

View File

@@ -145,13 +145,13 @@ oper
mkAdv = overload {
mkAdv : Str -> Adv
= \s -> lin Adv {s = word s ; advType = getAdvType s} ;
= \s -> let at = getAdvType s in lin Adv {s = word s ; advType = at ; hasDe = advTypeHasDe at} ;
mkAdv : Str -> Str -> Adv
= \s,t -> lin Adv {s = word (s + t) ; advType = getAdvType s} ; ----
= \s,t -> let at = getAdvType s in lin Adv {s = word (s + t) ; advType = at ; hasDe = advTypeHasDe at} ; ----
mkAdv : Str -> AdvType -> Adv
= \s,at -> lin Adv {s = word s ; advType = at} ;
= \s,at -> lin Adv {s = word s ; advType = at ; hasDe = advTypeHasDe at} ;
mkAdv : Adv -> AdvType -> Adv -- To fix the AdvType in an Adv produced by SyntaxChi.mkAdv
= \adv,at -> adv ** {advType = at} ;
= \adv,at -> adv ** {advType = at ; hasDe = advTypeHasDe at} ;
} ;

View File

@@ -250,13 +250,19 @@ oper
s = word s
} ;
Preposition = {prepPre : Str ; prepPost : Str ; advType : AdvType} ;
Preposition = {prepPre : Str ; prepPost : Str ; advType : AdvType ; hasDe : Bool} ;
mkPreposition : Str -> Str -> AdvType -> Preposition = \s1,s2,at -> {
prepPre = word s1 ;
prepPost = word s2 ;
advType = at
advType = at ;
hasDe = advTypeHasDe at ;
} ;
advTypeHasDe : AdvType -> Bool = \at -> case at of {
ATPoss => True ;
_ => False
} ;
getAdvType : Str -> AdvType = \s -> case s of {
"的" => ATPoss ;
@@ -264,8 +270,8 @@ oper
_ => ATPlace False -- uncertain whether ATPlace
} ;
possessiveIf : AdvType -> Str = \at -> case at of {
ATPoss => [] ; --- to avoid double "de"
possessiveIf : Bool -> Str = \hasDe -> case hasDe of {
True => [] ; --- to avoid double "de"
_ => possessive_s
} ;

View File

@@ -89,8 +89,8 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
A2 = A ** {c2 : Compl} ;
N = Noun ;
N2 = CommonNoun ** {c2 : Compl ; isPre : Bool ; lock_N2 : {}} ;
N3 = CommonNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool ; lock_N3 : {}} ;
N2 = Noun ** {c2 : Compl ; isPre : Bool ; lock_N2 : {}} ;
N3 = Noun ** {c2,c3 : Compl ; isPre,isPre2 : Bool ; lock_N3 : {}} ;
PN = {s : Case => Str} ;
oper Verb1 = Verb ** { sc : NPForm} ; --what is this for? --subject case, i.e. "ma näen kassi"/"mul on kass"

View File

@@ -28,6 +28,7 @@ concrete ExtendEst of Extend =
Coordination,
Prelude,
MorphoEst,
LexiconEst,
ParadigmsEst in {
lin
@@ -44,7 +45,7 @@ concrete ExtendEst of Extend =
-- : Num -> CN -> RP ; -- whose car
GenRP num cn = {
s = \\n,c => let k = npform2case num.n c in relPron ! n ! Gen ++ cn.s ! NCase num.n k ;
s = \\n,c => let k = npform2case num.n c in relPron ! NCase n Gen ++ cn.s ! NCase num.n k ;
a = RNoAg
} ;
@@ -115,26 +116,34 @@ concrete ExtendEst of Extend =
mkVPI : VP -> VPI = \vp -> lin VPI {} ;
-----
lin
ICompAP ap = {} ; ---- IComp should have agr!
IAdvAdv adv = {} ;
-}
-- : VP -> AP ; -- (the man) looking at Mary / filme vaatav (mees)
lin
-- : AP -> IComp ; -- "how old"
ICompAP ap = icompAP "kui" ap ;
-- : Adv -> IAdv ; -- "how often"
IAdvAdv adv = { s = "kui" ++ adv.s } ;
-- : VP -> AP ; -- (the man) looking at Mary / filme vaatav (mees)
PresPartAP vp = {
s = \\_,_ => vp2adv vp True VIPresPart ;
infl = Invariable
} ;
{- TODO: need to change VP to get this to work properly:
{- TODO: need to change VP to get the following 3 functions to work properly:
1) Add "mine" form into VP (or switch to a BIND solution and just add a stem)
2) Change s2 in VP so that we can manipulate the complement to be in genitive!
-- : VP -> SC ; -- looking at Mary (is fun) / filmide vaatamine (on tore)
EmbedPresPart vp =
let vpGen = vp ; --** { s2 = \\_,_,_ => vp.s2 ! True ! Pos ! }
{s = vp2adv vp True VI } ;
-- : VP -> CN -- publishing of the document (can get a determiner)
GerundCN vp = {} ;
-- : VP -> NP -- publishing the document (by nature definite)
GerundNP vp = {} ;
-}
-- : VPSlash -> AP ; -- täna leitud
@@ -147,13 +156,7 @@ concrete ExtendEst of Extend =
s = \\_,_ => np.s ! NPCase Gen ++ "poolt"
++ vp2adv vp True (VIPass Past) ;
infl = Invariable } ;
{-
-- : VP -> CN -- publishing of the document (can get a determiner)
GerundCN vp = {} ;
-- : VP -> NP -- publishing the document (by nature definite)
GerundNP vp = {} ;
-}
-- : VP -> Adv
GerundAdv vp =
{ s = vp2adv vp True (VIInf InfDes) } ;
@@ -192,22 +195,38 @@ lin
ComplBareVS v s = insertExtra s.s (predV v) ;
SlashBareV2S v s = insertExtrac s.s (predVc v) ;
-}
-- : N -> N -> N ; -- control system / controls system / control-system
CompoundN noun cn = lin N {
s = \\nf => noun.s ! NCase Sg Gen ++ BIND ++ cn.s ! nf ---- AR genitive best?
s = \\nf => noun.s ! NCase Sg Gen ++ BIND ++ cn.s ! nf
} ;
{-
-- : N -> A -> AP ; -- language independent / language-independent
CompoundAP noun adj = {} ;
FrontExtPredVP np vp = {} ;
InvFrontExtPredVP np vp = {} ;
-- : VS -> Utt -> VP ; -- say: "today"
ComplDirectVS vs utt = {} ;
-- : VQ -> Utt -> VP ; -- ask: "when"
ComplDirectVQ vq utt = {} ;
-- : NP -> VS -> Utt -> Cl ; -- "I am here", she said
FrontComplDirectVS np vs utt = {} ;
-- : NP -> VQ -> Utt -> Cl ; -- "where", she asked
FrontComplDirectVQ np vq utt = {} ;
-}
-- : AP -> VP -> Cl ; -- it is good to walk / on hea kõndida
PredAPVP ap vp =
let heaOllaVP : VP = insertObj (\\_,_ => ap.s) vp ; -- puts AP into the s2 field
heaOllaComp : Comp = CompVP ASimul PPos heaOlla ; -- chooses InfDa, fixes word order
heaOlla : VP = UseComp heaOllaComp -- looks silly, but I want to reuse the abstract syntax funs :-P
in existClause noSubj (agrP3 Sg) heaOlla ;
oper
testCl = PredAPVP (PositA good_A) (UseV walk_V) ;
lin
-}
-- : AP -> CN ; -- a green one ; en grön (Swe)
AdjAsCN ap = { s = ap.s ! True } ; -- True = it's a modifier, not a predicate
@@ -224,7 +243,10 @@ lin
lin
ReflRNP vps rnp = insertObjPre (\\a => vps.c2 ++ rnp.s ! a) vps ;
-- : RNP
ReflPron = {s = reflPron} ;
ReflPoss num cn = {s = \\a => possPron ! a ++ num.s ! Nom ++ cn.s ! num.n ! Nom} ;
PredetRNP predet rnp = {s = \\a => predet.s ++ rnp.s ! a} ;

View File

@@ -9,14 +9,16 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
isNeg = False
} ;
GenCN = caseCN Gen ; -- auton merkki
GenCN = caseCN Gen ; -- soome mees
ComitCN = caseCN Comit ; -- puudega mets
ElatCN = caseCN Elat ; -- puust laud
AbessCN = caseCN Abess ; -- autota pere
TerminCN = caseCN Termin ; -- maani kleit
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
GenRP num cn = {
s = \\n,c => let k = npform2case num.n c in relPron ! n ! Gen ++ cn.s ! NCase num.n k ;
s = \\n,c => let k = npform2case num.n c in relPron ! NCase n Gen ++ cn.s ! NCase num.n k ;
a = RNoAg
--- a = RAg (agrP3 num.n)
} ;
@@ -190,8 +192,9 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
a = p.a
} ;
-- : Pron -> Quant ;
ProDropPoss p = {
s = \\_,_ => "oma" ; --???
s = \\_,_ => "oma" ;
sp = \\_,_ => p.s ! NPCase Gen ;
isNum = False ;
isDef = True ;

View File

@@ -7,9 +7,11 @@ abstract ExtraEstAbs = Extra [
flags coding=utf8 ;
fun
GenCN : NP -> CN -> CN ; -- auton merkki
GenCN : NP -> CN -> CN ; -- soome mees
ComitCN : NP -> CN -> CN ; -- põlenud puudega mets
ElatCN : NP -> CN -> CN ; -- puust laud
AbessCN : NP -> CN -> CN ; -- autota pere
TerminCN : NP -> CN -> CN ; -- maani kleit
AdvExistNP : Adv -> NP -> Cl ; -- kuvassa olemme me
AdvPredNP : Adv -> V -> NP -> Cl ; -- kuvassa hymyilee Veikko

View File

@@ -119,7 +119,7 @@ lin
love_N = mkN "armastus" ;
love_V2 = mkV2 (mkV "armastama") partitive ;
man_N = mkN "mees" "mehe" "meest" "mehesse" "meeste" "mehi" ;
married_A2 = mkA2 (mkA "abielus") (casePrep comitative) ;
married_A2 = mkA2 (invA "abielus") (casePrep comitative) ;
meat_N = mkN "liha" ;
milk_N = mkN "piim" "piima" "piima" ;
moon_N = mkN "kuu" ;

View File

@@ -487,10 +487,10 @@ These used to be here:
-- for Structural
-----------------------
caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
caseTable : Number -> Noun -> Case => Str = \n,cn ->
\\c => cn.s ! NCase n c ;
mkDet : Number -> CommonNoun -> {
mkDet : Number -> Noun -> {
s,sp : Case => Str ; -- minun kolme
n : Number ; -- Pl (agreement feature for verb)
isNum : Bool ; -- True (a numeral is present)
@@ -563,24 +563,18 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
x => shortMa.s ! x } } ;
-- The relative pronoun, "joka", is inflected in case and number,
-- like common nouns, but it does not take possessive suffixes.
-- The inflextion shows a surprising similarity with "suo".
oper
relPron : Number => Case => Str =
let mis = nForms2N (nForms6 "mis" "mille" "mida" "millesse" "mille" "mida") in
\\n,c => case <n,c> of {
<Pl,Nom> => "mis" ;
<> => mis.s ! NCase n c } ;
relPron : NForm => Str =
let mis = nForms2N (nForms6 "mis" "mille" "mida" "millesse" "mille" "mida")
in fixPlNom "mis" mis.s ;
kesPron : NForm => Str =
let kes = nForms2N (nForms6 "kes" "kelle" "keda" "kellesse" "kelle" "keda")
in fixPlNom "kes" kes.s ;
kesPron : Number => Case => Str =
let kes = nForms2N (nForms6 "kes" "kelle" "keda" "kellesse" "kelle" "keda") in
\\n,c => case <n,c> of {
<Pl,Nom> => "kes" ;
<> => kes.s ! NCase n c } ;
ProperName = {s : Case => Str} ;
-- TODO: generate using mkPronoun

View File

@@ -41,7 +41,7 @@ concrete RelativeEst of Relative = CatEst ** open Prelude, ResEst, MorphoEst in
} ;
IdRP = {
s = \\n,c => relPron ! n ! npform2case n c ;
s = \\n,c => relPron ! NCase n (npform2case n c) ;
a = RNoAg
} ;

View File

@@ -321,7 +321,7 @@ oper
let
agrfin = case vp.sc of {
NPCase Nom => <agr,True> ;
_ => <agrP3 Sg,False> -- minun täytyy, minulla on
_ => <agrP3 Sg,False> -- minule meeldib, minul on
} ;
verb = vp.s ! VIFin t ! a ! b ! agrfin.p1 ;
in {subj = sub b ;
@@ -566,17 +566,14 @@ oper
vforms2V (regVForms kinkima kinkida kingib kingitakse) ;
noun2adj : CommonNoun -> Adj = noun2adjComp True ;
-- noun2adj : Noun -> Adj = noun2adjComp True ;
noun2adj : Noun -> Adj = noun2adjComp True ;
-- TODO: remove the unused arguments and clean up the code
-- TODO: AAdv is current just Sg Ablat, which seems OK in most cases, although
-- ilus -> ilusti | ilusalt?
-- hea -> hästi
-- parem -> paremini
-- parim -> kõige paremini | parimalt?
noun2adjComp : Bool -> CommonNoun -> Adj = \isPos,tuore ->
-- noun2adjComp : Bool -> Noun -> Adj = \isPos,tuore ->
noun2adjComp : Bool -> Noun -> Adj = \isPos,tuore ->
let
tuoreesti = Predef.tk 1 (tuore.s ! NCase Sg Gen) + "sti" ;
tuoreemmin = Predef.tk 2 (tuore.s ! NCase Sg Gen) + "in"
@@ -587,37 +584,55 @@ oper
} ;
} ;
CommonNoun = {s : NForm => Str} ;
Noun = {s : NForm => Str} ;
-- To form an adjective, it is usually enough to give a noun declension: the
-- adverbial form is regular.
Adj : Type = {s : AForm => Str} ;
-- Helper functions to form Comps.
compAP = icompAP [] ;
icompAP : Str -> {s : Bool => NForm => Str} -> {s : Agr => Str} = \kui,ap ->
{ s = \\agr =>
let n = complNumAgr agr ;
in kui ++ ap.s ! False ! NCase n Nom } ;
compCN : Noun -> {s : Agr => Str} = \cn ->
{ s = \\agr =>
let n = complNumAgr agr ;
in cn.s ! NCase n Nom } ;
-- Reflexive pronoun.
--- Possessive could be shared with the more general $NounFin.DetCN$.
--oper
--Estonian version started
reflPron : Agr -> NP = \agr ->
let
ise = nForms2N (nForms6 "ise" "enda" "ennast" "endasse" "IGNORE" "IGNORE")
in {
ise = nForms2N (nForms6 "ise" "enda" "ennast" "endasse" "endi" "endid") ;
n = case agr of {
AgPol => Sg ;
Ag n _ => n } ;
in {
s = table {
NPAcc => "ennast" ;
NPCase c => ise.s ! NCase Sg c
NPCase c => fixPlNom "endid" ise.s ! NCase n c
} ;
a = agr ;
isPron = False -- no special acc form
} ;
-- Using nForms6 as a shortcut works pretty nicely, but plural nominative is often wrong.
-- This is used at least 3 times :-D
fixPlNom : Str -> (NForm => Str) -> (NForm => Str) = \mis,n ->
table { NCase Pl Nom => mis ;
x => n ! x } ;
NForms : Type = Predef.Ints 5 => Str ;
Noun = CommonNoun ** {lock_N : {}} ;
NForms : Type = Predef.Ints 5 => Str ;
nForms6 : (x1,_,_,_,_,x6 : Str) -> NForms =
nForms6 : (x1,_,_,_,_,x6 : Str) -> NForms =
\jogi,joe,joge,joesse, -- sg nom, gen, part, ill
jogede,jogesid -> table { -- pl gen, part,
0 => jogi ;
@@ -628,7 +643,7 @@ oper
5 => jogesid
} ;
n2nforms : CommonNoun -> NForms = \ukko -> table {
n2nforms : Noun -> NForms = \ukko -> table {
0 => ukko.s ! NCase Sg Nom ;
1 => ukko.s ! NCase Sg Gen ;
2 => ukko.s ! NCase Sg Part ;
@@ -639,7 +654,7 @@ oper
-- Converts 6 given strings (Nom, Gen, Part, Illat, Gen, Part) into Noun
-- http://www.eki.ee/books/ekk09/index.php?p=3&p1=5&id=226
nForms2N : NForms -> CommonNoun = \f ->
nForms2N : NForms -> Noun = \f ->
let
jogi = f ! 0 ;
joe = f ! 1 ;

View File

@@ -97,19 +97,8 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
----b UseVS, UseVQ = \v -> v ** {c2 = {s = [] ; c = NPAcc ; isPre = True}} ;
CompAP ap = {
s = \\agr =>
let
n = complNumAgr agr ;
in ap.s ! False ! (NCase n Nom)
} ;
CompCN cn = {
s = \\agr =>
let
n = complNumAgr agr ;
in cn.s ! (NCase n Nom)
} ;
CompAP = compAP ;
CompCN = compCN ;
CompNP np = {s = \\_ => np.s ! NPCase Nom} ;
CompAdv a = {s = \\_ => a.s} ;

View File

@@ -152,7 +152,7 @@ lin
{s = \\agr => infVPAnt ant.a (NPCase Nom) pol.p agr vp InfDa } ;
-- TODO: revisit pronouns? Looks a bit overly complicated. /IL
who_RP = { s = \\n,c => MorphoEst.kesPron ! n ! npform2case n c ;
who_RP = { s = \\n,c => MorphoEst.kesPron ! NCase n (npform2case n c) ;
a = RNoAg } ;
that_RP = which_RP ;