completed Documentation modules for English, Swedish, Bulgarian, German, Finnish, French. The examples for Finnish, German and French could still be improved. The old parsing grammars are now restored. The new Translation grammar still don't have statistical model.

This commit is contained in:
kr.angelov
2014-02-21 16:31:50 +00:00
parent 014f4e1e11
commit dc19edc05d
15 changed files with 1037 additions and 477 deletions

View File

@@ -14,165 +14,280 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {t : Str; s1,s2 : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
oper
tdf : Str -> Str = \s -> td (intag "i" s) ;
tdf2 : Str -> Str = \s -> intagAttr "td" "rowspan=2" (intag "i" s) ;
heading : N -> Str = \n -> (nounHeading n).s ;
inflectionN : (NForm -> Str) -> Str = \nouns ->
frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
tr (th (heading nominative_Parameter) ++ tdf (nouns (NCase Sg Nom)) ++ tdf (nouns (NCase Pl Nom))) ++
tr (th (heading genitive_Parameter) ++ tdf (nouns (NCase Sg Gen)) ++ tdf (nouns (NCase Pl Gen))) ++
tr (th (heading partitive_Parameter) ++ tdf (nouns (NCase Sg Part)) ++ tdf (nouns (NCase Pl Part))) ++
tr (th (heading translative_Parameter) ++ tdf (nouns (NCase Sg Transl)) ++ tdf (nouns (NCase Pl Transl))) ++
tr (th (heading essive_Parameter) ++ tdf (nouns (NCase Sg Ess)) ++ tdf (nouns (NCase Pl Ess))) ++
tr (th (heading inessive_Parameter) ++ tdf (nouns (NCase Sg Iness)) ++ tdf (nouns (NCase Pl Iness))) ++
tr (th (heading elative_Parameter) ++ tdf (nouns (NCase Sg Elat)) ++ tdf (nouns (NCase Pl Elat))) ++
tr (th (heading illative_Parameter) ++ tdf (nouns (NCase Sg Illat)) ++ tdf (nouns (NCase Pl Illat))) ++
tr (th (heading adessive_Parameter) ++ tdf (nouns (NCase Sg Adess)) ++ tdf (nouns (NCase Pl Adess))) ++
tr (th (heading ablative_Parameter) ++ tdf (nouns (NCase Sg Ablat)) ++ tdf (nouns (NCase Pl Ablat))) ++
tr (th (heading allative_Parameter) ++ tdf (nouns (NCase Sg Allat)) ++ tdf (nouns (NCase Pl Allat))) ++
tr (th (heading abessive_Parameter) ++ tdf (nouns (NCase Sg Abess)) ++ tdf (nouns (NCase Pl Abess))) ++
tr (th (heading comitative_Parameter) ++ tdf "" ++ tdf (nouns (NComit))) ++
tr (th (heading instructive_Parameter) ++ tdf "" ++ tdf (nouns (NInstruct)))
) ;
lin
InflectionN noun = {
s = heading1 (heading noun_Category) ++
inflectionN (\nf -> (snoun2nounSep noun).s ! nf)
InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "s" ;
s1 = heading1 (heading noun_Category) ;
s2 = inflNoun (\nf -> (snoun2nounSep noun).s ! nf)
} ;
InflectionA adj = {
s = heading1 (heading adjective_Category) ++
inflectionN (\nf -> (snoun2nounSep {s = \\f => adj.s ! Posit ! sAN f ; h = adj.h}).s ! nf) ++
heading2 (heading comparative_Parameter) ++
inflectionN (\nf -> (snoun2nounSep {s = \\f => adj.s ! Compar ! sAN f ; h = adj.h}).s ! nf) ++
heading2 (heading superlative_Parameter) ++
inflectionN (\nf -> (snoun2nounSep {s = \\f => adj.s ! Superl ! sAN f ; h = adj.h}).s ! nf)
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 (heading adjective_Category) ;
s2 = inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Posit ! sAN f ; h = adj.h}).s ! nf) ++
heading2 (heading comparative_Parameter) ++
inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Compar ! sAN f ; h = adj.h}).s ! nf) ++
heading2 (heading superlative_Parameter) ++
inflNoun (\nf -> (snoun2nounSep {s = \\f => adj.s ! Superl ! sAN f ; h = adj.h}).s ! nf)
} ;
InflectionAdv adv = {
t = "adv" ;
s1 = heading1 (heading adverb_Category) ;
s2 = paragraph adv.s
} ;
InflectionV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V v))) v ;
InflectionV2 v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP)) (lin V v) ;
InflectionVV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
InflectionV2V v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
InflectionPrep p = {
t = "prep" ;
s1 = heading1 (heading preposition_Category) ;
s2 = paragraph ((S.mkAdv (lin Prep p) S.it_NP).s ++ ";" ++ (S.mkAdv (lin Prep p) S.we_NP).s)
} ;
MkDocument b i e = ss (paragraph b.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
InflectionV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v)) ;
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin S (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin QS (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP L.beautiful_A)) ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (lin S (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (lin QS (ss "...")))) ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v L.beautiful_A)) ;
s2 = inflVerb v
} ;
oper
verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ;
inflectionVerb : Str -> CatFin.V -> {s : Str} = \ex,verb0 ->
inflVerb : CatFin.V -> Str = \verb0 ->
let
verb = sverb2verbSep verb0 ;
vfin : ResFin.VForm -> Str = \f ->
verb.s ! f ;
gforms : Number -> Person -> Str = \n,p ->
tdf (vfin (Presn n p))
++ tdf (vfin (Impf n p)) --# notpresent
++ tdf (vfin (Condit n p)) --# notpresent
++ tdf (vfin (Potent n p)) --# notpresent
;
in {
s =
heading1 (heading verb_Category) ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" ex) ++
heading2 (nounPluralHeading finite_form_ParameterType).s ++
verb.s ! f ;
nounNounHeading : Parameter -> Parameter -> Str = \n1,n2 ->
(S.mkUtt (G.PossNP (S.mkCN n1) (S.mkNP (snoun2nounSep n2)))).s ;
in
heading3 (nounNounHeading present_Parameter indicative_Parameter) ++
frameTable (
tr (intagAttr "th" "rowspan=2 colspan=2" "" ++
intagAttr "th" "colspan=2" (heading indicative_Parameter) ++
th (heading conditional_Parameter) ++ th (heading potential_Parameter) ++
th (heading imperative_Parameter)) ++
tr ( th (heading present_Parameter) ++ th (heading past_Parameter) ++
th (heading present_Parameter) ++ th (heading present_Parameter) ++
th (heading present_Parameter)) ++
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++
th "1.p" ++ gforms Sg P1 ++ tdf "") ++
tr (th "2.p" ++ gforms Sg P2 ++ tdf (vfin (Imper Sg))) ++
tr (th "3.p" ++ gforms Sg P3 ++ tdf (vfin (ImperP3 Sg))) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++
th "1.p" ++ gforms Pl P1 ++ tdf (vfin (ImperP1Pl))) ++
tr (th "2.p" ++ gforms Pl P2 ++ tdf (vfin (Imper Pl))) ++
tr (th "3.p" ++ gforms Pl P3 ++ tdf (vfin (ImperP3 Pl))) ++
tr (intagAttr "th" "colspan=2" (heading passive_Parameter)
++ tdf (vfin (PassPresn True)) ++ tdf (vfin (PassImpf True)) ++ --# notpresent
tdf (vfin (PassCondit True)) ++ tdf (vfin (PassPotent True)) ++ tdf (vfin (PassImper True)) --# notpresent
) ++
tr (intagAttr "th" "rowspan=3" (heading negative_Parameter) ++
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td (vfin (Presn Sg P1)) ++ td (vfin (Presn Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassPresn True)) --# notpresent
) ++
tr (th "2.p" ++ td (vfin (Presn Sg P2)) ++ td (vfin (Presn Pl P2))) ++
tr (th "3.p" ++ td (vfin (Presn Sg P3)) ++ td (vfin (Presn Pl P3))) ++
tr (th (heading negative_Parameter) ++
intagAttr "td" "colspan=2 align=center" (vfin (Imper Sg)) ++ td (vfin (PassPresn False)))
) ++
heading3 (nounNounHeading past_Parameter indicative_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td (vfin (Impf Sg P1)) ++ td (vfin (Impf Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassImpf True))) ++
tr (th "2.p" ++ td (vfin (Impf Sg P2)) ++ td (vfin (Impf Pl P2))) ++
tr (th "3.p" ++ td (vfin (Impf Sg P3)) ++ td (vfin (Impf Pl P3))) ++
tr (th (heading negative_Parameter) ++
td (vfin (PastPartAct (AN (NCase Sg Nom)))) ++
td (vfin (PastPartAct (AN (NCase Pl Nom)))) ++
td (vfin (PassImpf False)))
) ++
heading3 (nounNounHeading present_Parameter conditional_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td (vfin (Condit Sg P1)) ++ td (vfin (Condit Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassCondit True)) --# notpresent
) ++
tr (th "2.p" ++ td (vfin (Condit Sg P2)) ++ td (vfin (Condit Pl P2))) ++
tr (th "3.p" ++ td (vfin (Condit Sg P3)) ++ td (vfin (Condit Pl P3))) ++
tr (th (heading negative_Parameter) ++
intagAttr "td" "colspan=2 align=center" (vfin (Condit Sg P3)) ++ td (vfin (PassCondit False)))
) ++
heading3 (nounNounHeading present_Parameter potential_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td (vfin (Potent Sg P1)) ++ td (vfin (Potent Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassPotent True)) --# notpresent
) ++
tr (th "2.p" ++ td (vfin (Potent Sg P2)) ++ td (vfin (Potent Pl P2))) ++
tr (th "3.p" ++ td (vfin (Potent Sg P3)) ++ td (vfin (Potent Pl P3))) ++
tr (th (heading negative_Parameter) ++
intagAttr "td" "colspan=2 align=center" (vfin PotentNeg) ++ td (vfin (PassPotent False)))
) ++
heading3 (nounNounHeading present_Parameter imperative_Parameter) ++
frameTable (
tr (th "" ++
th (heading singular_Parameter) ++
th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent
) ++
tr (th "1.p" ++ td "" ++ td (vfin ImperP1Pl)
++ intagAttr "td" "rowspan=3" (vfin (PassImper True))) ++
tr (th "2.p" ++ td (vfin (Imper Sg)) ++ td (vfin (Imper Pl))) ++
tr (th "3.p" ++ td (vfin (ImperP3 Sg)) ++ td (vfin (ImperP3 Pl))) ++
tr (th (heading negative_Parameter) ++
td (vfin (Imper Sg)) ++
td (vfin ImpNegPl) ++
td (vfin (PassImper False)))
) ++
heading2 (nounPluralHeading nominal_form_ParameterType).s ++
heading3 (heading infinitive_Parameter) ++
frameTable (
tr (intagAttr "th" "rowspan=2" "1" ++
th (heading short_Parameter) ++ ---
td (vfin (Inf Inf1))) ++
tr (th (heading long_Parameter) ++ ---
td (vfin (Inf Inf1Long) ++ BIND ++ "(ni)")) ++
tr (intagAttr "th" "rowspan=2" ("2." ++ heading active_Parameter) ++
th (heading inessive_Parameter) ++
td (vfin (Inf Inf2Iness))) ++
tr (th (heading instructive_Parameter) ++
td (vfin (Inf Inf2Instr))) ++
tr (th ("2." ++ heading passive_Parameter) ++
th (heading inessive_Parameter) ++
td (vfin (Inf Inf2InessPass))) ++
th (heading singular_Parameter)
++ tdf2 (vfin (Imper Sg)) ++ tdf (vfin (PastPartAct (AN (NCase Sg Nom))))
++ tdf2 (vfin (Condit Sg P3)) ++ tdf2 (vfin (PotentNeg)) ++ tdf (vfin (Imper Sg)) --# notpresent
) ++
tr ( th (heading plural_Parameter) ++ tdf (vfin (PastPartAct (AN (NCase Pl Nom)))) ++
tdf (vfin (ImpNegPl))) ++
tr ( th (heading passive_Parameter) ++ tdf (vfin (PassPresn False))
++ tdf (vfin (PassImpf False)) ++ tdf (vfin (PassCondit False)) ++ tdf (vfin (PassPotent False))--# notpresent
++ tdf (vfin (PassImper False)))
)
++
heading2 (nounPluralHeading nominal_form_ParameterType).s ++ ---
frameTable (
tr (intagAttr "th" "rowspan=15" (heading infinitive_Parameter) ++
intagAttr "th" "rowspan=2" "1" ++
th (heading short_Parameter) ++ ---
tdf (vfin (Inf Inf1))) ++
tr (th (heading long_Parameter) ++ ---
tdf (vfin (Inf Inf1Long) ++ BIND ++ "(ni)")) ++
tr (intagAttr "th" "rowspan=2" ("2." ++ heading active_Parameter) ++
th (heading inessive_Parameter) ++
tdf (vfin (Inf Inf2Iness))) ++
tr (th (heading instructive_Parameter) ++
tdf (vfin (Inf Inf2Instr))) ++
tr (th ("2." ++ heading passive_Parameter) ++
th (heading inessive_Parameter) ++
tdf (vfin (Inf Inf2InessPass))) ++
tr (intagAttr "th" "rowspan=7" "3." ++
th (heading inessive_Parameter) ++ td (vfin (Inf Inf3Iness))) ++
tr (th (heading elative_Parameter) ++ td (vfin (Inf Inf3Elat))) ++
tr (th (heading illative_Parameter) ++ td (vfin (Inf Inf3Illat))) ++
tr (th (heading adessive_Parameter) ++ td (vfin (Inf Inf3Adess))) ++
tr (th (heading abessive_Parameter) ++ td (vfin (Inf Inf3Abess))) ++
tr (th (heading instructive_Parameter) ++ td (vfin (Inf Inf3Instr))) ++
tr (th (heading instructive_Parameter ++ "pass.") ++ td (vfin (Inf Inf3InstrPass))) ++
tr (intagAttr "th" "rowspan=7" "3." ++
th (heading inessive_Parameter) ++ tdf (vfin (Inf Inf3Iness))) ++
tr (th (heading elative_Parameter) ++ tdf (vfin (Inf Inf3Elat))) ++
tr (th (heading illative_Parameter) ++ tdf (vfin (Inf Inf3Illat))) ++
tr (th (heading adessive_Parameter) ++ tdf (vfin (Inf Inf3Adess))) ++
tr (th (heading abessive_Parameter) ++ tdf (vfin (Inf Inf3Abess))) ++
tr (th (heading instructive_Parameter) ++ tdf (vfin (Inf Inf3Instr))) ++
tr (th (heading instructive_Parameter ++ "pass.") ++ tdf (vfin (Inf Inf3InstrPass))) ++
tr (intagAttr "th" "rowspan=2" "4." ++
th (heading nominative_Parameter) ++ td (vfin (Inf Inf4Nom))) ++
tr (th (heading partitive_Parameter) ++ td (vfin (Inf Inf4Part))) ++
tr (intagAttr "th" "rowspan=2" "4." ++
th (heading nominative_Parameter) ++ tdf (vfin (Inf Inf4Nom))) ++
tr (th (heading partitive_Parameter) ++ tdf (vfin (Inf Inf4Part))) ++
tr (intagAttr "th" "colspan=2" "5." ++ td (vfin (Inf Inf5) ++ BIND ++ "(ni)"))
) ++
heading3 (heading participle_Parameter) ++
frameTable (
tr (intagAttr "th" "rowspan=2" (heading present_Parameter) ++
th (heading active_Parameter) ++
td (vfin (PresPartAct (AN (NCase Sg Nom))))) ++
tr (th (heading passive_Parameter) ++
td (vfin (PresPartPass (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "colspan=2" "5." ++ tdf (vfin (Inf Inf5) ++ BIND ++ "(ni)")) ++
tr (intagAttr "th" "rowspan=2" (heading perfect_Parameter) ++
th (heading active_Parameter) ++
td (vfin (PastPartAct (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "rowspan=5" (heading participle_Parameter) ++
intagAttr "th" "rowspan=2" (heading present_Parameter) ++
th (heading active_Parameter) ++
tdf (vfin (PresPartAct (AN (NCase Sg Nom))))) ++
tr (th (heading passive_Parameter) ++
tdf (vfin (PresPartPass (AN (NCase Sg Nom))))) ++
tr (th (heading passive_Parameter) ++
td (vfin (PastPartPass (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "rowspan=2" (heading perfect_Parameter) ++
th (heading active_Parameter) ++
tdf (vfin (PastPartAct (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "colspan=2" (heading agent_Parameter) ++
td (vfin (AgentPart (AN (NCase Sg Nom)))))
) ;
tr (th (heading passive_Parameter) ++
tdf (vfin (PastPartPass (AN (NCase Sg Nom))))) ++
tr (intagAttr "th" "colspan=2" (heading agent_Parameter) ++
tdf (vfin (AgentPart (AN (NCase Sg Nom)))))
)
} ;
inflNoun : (NForm -> Str) -> Str = \nouns ->
frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
tr (th (heading nominative_Parameter) ++ td (nouns (NCase Sg Nom)) ++ td (nouns (NCase Pl Nom))) ++
tr (th (heading genitive_Parameter) ++ td (nouns (NCase Sg Gen)) ++ td (nouns (NCase Pl Gen))) ++
tr (th (heading partitive_Parameter) ++ td (nouns (NCase Sg Part)) ++ td (nouns (NCase Pl Part))) ++
tr (th (heading translative_Parameter) ++ td (nouns (NCase Sg Transl)) ++ td (nouns (NCase Pl Transl))) ++
tr (th (heading essive_Parameter) ++ td (nouns (NCase Sg Ess)) ++ td (nouns (NCase Pl Ess))) ++
tr (th (heading inessive_Parameter) ++ td (nouns (NCase Sg Iness)) ++ td (nouns (NCase Pl Iness))) ++
tr (th (heading elative_Parameter) ++ td (nouns (NCase Sg Elat)) ++ td (nouns (NCase Pl Elat))) ++
tr (th (heading illative_Parameter) ++ td (nouns (NCase Sg Illat)) ++ td (nouns (NCase Pl Illat))) ++
tr (th (heading adessive_Parameter) ++ td (nouns (NCase Sg Adess)) ++ td (nouns (NCase Pl Adess))) ++
tr (th (heading ablative_Parameter) ++ td (nouns (NCase Sg Ablat)) ++ td (nouns (NCase Pl Ablat))) ++
tr (th (heading allative_Parameter) ++ td (nouns (NCase Sg Allat)) ++ td (nouns (NCase Pl Allat))) ++
tr (th (heading abessive_Parameter) ++ td (nouns (NCase Sg Abess)) ++ td (nouns (NCase Pl Abess))) ++
tr (th (heading comitative_Parameter) ++ td "" ++ td (nouns (NComit))) ++
tr (th (heading instructive_Parameter) ++ td "" ++ td (nouns (NInstruct)))
) ;
lin
InflectionPrep p = {
s = heading1 (heading preposition_Category) ++
paragraph (intag "b" (heading exampleGr_N ++ ":") ++
intag "i" ((S.mkAdv (lin Prep p) S.it_NP).s ++ ";" ++ (S.mkAdv (lin Prep p) S.we_NP).s))
} ;
MkDocument b i e = ss (i.s1 ++ paragraph b.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss (i.t) ;
}

View File

@@ -93,4 +93,4 @@ lin
formGF_N = mkN "muoto" ;
exampleGr_N = mkN "esimerkki" ;
}
}

View File

@@ -1,4 +1,4 @@
--# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus
--# -path=.:..:../../abstract:../../common:../../api:../../english:../kotus:../../translator
concrete ParseFin of ParseEngAbs =
TenseX, ---- TODO add potential forms
@@ -23,7 +23,7 @@ concrete ParseFin of ParseEngAbs =
ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash,
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
, DictEngFin
, DictionaryFin
**
open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, StemFin, (E = ExtraFin), (G = GrammarFin), Prelude in {
@@ -38,7 +38,7 @@ lin
----------------------
lin
ComplVV v ant pol vp =
{- ComplVV v ant pol vp =
insertObj
(\\_,b,a => infVPGen pol.p v.sc b a vp v.vi)
(predSV {s = v.s ;
@@ -49,7 +49,7 @@ lin
h = v.h ; p = v.p
}
) ;
-}
---- what is this...
myself_NP = mkPronounGen False "itse" "itsen" "itseä" "itsenä" "itseen" Sg P1 ** {isPron = True ; isNeg = False} ;
@@ -104,10 +104,10 @@ lin
isNeg = quant.isNeg
} ;
SlashV2V v ant p vp =
{- SlashV2V v ant p vp =
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
@@ -134,32 +134,14 @@ lin
SlashVPIV2V v pol vpi = -- : V2V -> Pol -> VPI -> VPSlash ;
insertObj (\\_,b,a => vpi.s ! v.vi) (predSV v) ** {c2 = v.c2} ;
VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ?
{- VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ?
insertObj (\\_,b,a => infVP v.sc b a vp InfPresPart) (predSV v) **
{c2 = {c = NPCase Gen ; s = \\_ => [] ; h = Back ; isPre = True}} ;
-}
-- SlashSlashV2V v ant pol vps = -- : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; --- not implemented in Eng so far
-- insertObj (\\_,b,a => infVPGen pol.p v.sc b a vps v.vi) (predSV v) ** {c2 = v.c2} ; --- or vps.c2 ??
--in Verb, SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash
---- these will be obsolete
lincat
NDisplay = {s : NForm => Str} ;
ADisplay = {s : Degree => NForm => Str} ;
VDisplay = {s : VForm => Str} ;
lin
DisplayN n = snoun2nounSep n ;
DisplayA a = {
s = table {
Posit => (snoun2nounSep {s = \\f => a.s ! Posit ! sAN f ; h = a.h}).s ;
Compar => (snoun2nounSep {s = \\f => a.s ! Compar ! sAN f ; h = a.h}).s ;
Superl => (snoun2nounSep {s = \\f => a.s ! Superl ! sAN f ; h = a.h}).s
}
} ;
DisplayV v = sverb2verbSep v ;
}