Finnish–English dictionary for rule-based machine translation
This is a visualisation of some rules in apertium transfer.
These are the categories Apertium is using in order to chunk, re-order and transfer lexemes.
Category | Items |
---|---|
neg-verb |
|
conneg |
|
cop-conneg |
|
conneg_nottable |
|
adneg |
|
adv |
|
quant |
|
cnjcoo |
|
cnjsub |
|
necessive |
|
gen-subj |
|
adv-misc |
|
pron-misc |
|
pron-pers |
|
habitive |
|
possessional |
|
sint-pers |
|
infma-ade |
|
infma-ine |
|
just-inf |
|
vbneg |
|
post |
|
num |
|
adj |
|
verb-mood |
|
cm |
|
nom-cmp |
|
nom |
|
nominal |
|
sent |
|
clbpunct |
|
verb |
|
verb-pprs |
|
verb-pp |
|
verb-past |
|
verb-pres-impers |
|
verb-pres |
|
vbolla |
|
These are the morphological analysis value (tag) sets that can be processed in the transfer.
Attribute set name | Tags |
---|---|
a_voice |
|
a_verb |
|
a_vb |
|
a_person |
|
moodtense |
|
a_num |
|
a_cnj |
|
a_adv |
|
a_supernominal |
|
a_nom |
|
a_adj |
|
a_prn |
|
a_prnpers |
|
a_nbr |
|
a_pers |
|
a_gen |
|
a_cas |
|
a_poss |
|
a_post |
|
synfunc |
|
Macros are helper functions in apertium transfer files.
-
let tl[1]['synfunc'] ≔
""
-
- if
-
- tl[1]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
let tl[1]['a_voice'] ≔
""
-
let tl[1]['synfunc'] ≔
""
-
- if
-
- sl[1]['moodtense'] ≟ <pri>
- sl[1]['moodtense'] ≟ <cond>
- sl[1]['moodtense'] ≟ <imp>
- sl[1]['moodtense'] ≟ <pot>
then:
-
let
$screeve ≔ <pres>
- elseif
-
- sl[1]['moodtense'] ≟ <past>
then:
-
let
$screeve ≔ <past>
- else:
-
let
$screeve ≔ <inf>
-
let tl[1]['synfunc'] ≔
""
-
- if
-
- tl[1]['a_prn'] ≟ <prn.pers>
- sl[1]['a_cas'] ≟ <ine>
- sl[1]['a_cas'] ≟ <ela>
- sl[1]['a_cas'] ≟ <ill>
- sl[1]['a_cas'] ≟ <par>
- sl[1]['a_cas'] ≟ <ade>
- sl[1]['a_cas'] ≟ <abl>
- sl[1]['a_cas'] ≟ <all>
- sl[1]['a_cas'] ≟ <abe>
- sl[1]['a_cas'] ≟ <ins>
- sl[1]['a_cas'] ≟ <com>
- sl[1]['a_cas'] ≟ <ess>
then:
-
let tl[1]['a_cas'] ≔ <acc>
-
let
$sntype ≔ <SN>
- elseif
-
- sl[1]['a_cas'] ≟ <nom>
- sl[1]['a_cas'] ≟ <ine>
- sl[1]['a_cas'] ≟ <ela>
- sl[1]['a_cas'] ≟ <ill>
- sl[1]['a_cas'] ≟ <par>
- sl[1]['a_cas'] ≟ <ade>
- sl[1]['a_cas'] ≟ <abl>
- sl[1]['a_cas'] ≟ <all>
- sl[1]['a_cas'] ≟ <abe>
- sl[1]['a_cas'] ≟ <ins>
- sl[1]['a_cas'] ≟ <com>
- sl[1]['a_cas'] ≟ <ess>
then:
-
let tl[1]['a_cas'] ≔
""
-
let
$sntype ≔ <SN>
- elseif
-
- tl[1]['a_cas'] ≟ <gen>
- tl[1]['a_prn'] ≟ <prn.pers>
then:
-
let tl[1]['a_cas'] ≔
""
-
let
$sntype ≔ <SN.GEN>
- if
-
- sl[1]['a_cas'] ≟ <nom>
then:
-
let tl[1]['a_prnpers'] ≔ <subj>
else:
-
let tl[1]['a_prnpers'] ≔ <obj>
The actual rules concerning stuff.
- case-handler1(
$1
)
- proc-synlabel1(
$1
)
- case-handler1(
$2
)
- Output:
-
[
-
tl[1]['whole']
- b0
-
"of"
<pr>
- b1
-
tl[2]['whole']
]pron
<SN>
sl[1]['a_cas']
- case-handler1(
$1
)
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_adv']
]adv
<SN>
sl[1]['a_cas']
- case-handler1(
$1
)
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_prn']
tl[1]['a_prnpers']
tl[1]['a_pers']
tl[1]['a_nbr']
]pron
<SN.pers>
sl[1]['a_pers']
sl[1]['a_prnpers']
sl[1]['a_nbr']
sl[1]['a_cas']
- case-handler1(
$1
)
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['whole']
]pron
<SN>
sl[1]['a_cas']
- case-handler1(
$1
)
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lemh']
tl[1]['a_nom']
tl[1]['a_nbr']
tl[1]['a_cas']
tl[1]['lemq']
]n
$sntype
sl[1]['a_cas']
sl[1]['a_poss']
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lemh']
tl[1]['a_adj']
tl[1]['lemq']
]j
<SA>
- case-handler1(
$4
)
- proc-synlabel1(
$4
)
- Output:
-
[
-
tl[1]['lemh']
tl[1]['a_adj']
tl[1]['lemq']
- b1
-
tl[2]['whole']
- b2
-
tl[3]['lemh']
tl[3]['a_adj']
tl[3]['lemq']
- b3
-
tl[4]['lemh']
tl[4]['a_nom']
tl[4]['a_nbr']
tl[4]['a_cas']
tl[4]['lemq']
]j_j_n
$sntype
sl[4]['a_cas']
- case-handler1(
$2
)
- proc-synlabel1(
$2
)
- Output:
-
[
-
tl[1]['lemh']
tl[1]['a_nom']
tl[1]['a_nbr']
tl[1]['lemq']
- b1
-
tl[2]['lemh']
tl[2]['a_nom']
tl[2]['a_nbr']
tl[2]['lemq']
]n_n
$sntype
sl[2]['a_cas']
- case-handler1(
$2
)
- proc-synlabel1(
$2
)
- Output:
-
[
-
tl[1]['lemh']
tl[1]['a_adj']
tl[1]['lemq']
- b1
-
tl[2]['lemh']
tl[2]['a_nom']
tl[2]['a_nbr']
tl[2]['a_cas']
tl[2]['lemq']
]j_n
$sntype
sl[2]['a_cas']
- mood-handler1(
$1
)
- proc-synlabel1(
$2
)
-
- if
-
- tl[2]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
Output:
-
[
-
tl[2]['whole']
- b1
-
tl[3]['lem']
tl[3]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
]notted
<SV>
sl[1]['moodtense']
-
let tl[1]['a_voice'] ≔
""
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
<ger>
]ger
<SN>
-
let tl[1]['a_voice'] ≔
""
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
<pp>
]ger
<SN>
-
let tl[1]['a_voice'] ≔
""
- Output:
-
[
-
"by"
<pr>
- b
-
tl[1]['lem']
tl[1]['a_vb']
<ger>
]ger
<SN>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
<ger>
]ger
<SN>
- Output:
-
[
-
"to"
<pr>
- b
-
tl[1]['lem']
<vblex.inf>
]to-do
<SV>
- proc-synlabel1(
$3
)
- mood-handler1(
$2
)
-
- if
-
- tl[2]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
Output:
-
[
-
tl[2]['lem']
tl[2]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
- b1
-
"not"
<adv>
- b2
-
tl[3]['whole']
]notted
<SV>
sl[2]['moodtense']
- mood-handler1(
$2
)
-
- if
-
- tl[2]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
Output:
-
[
-
tl[2]['lem']
tl[2]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
- b1
-
"not"
<adv>
]neg-cop
<SV.COP>
$moodtense
- mood-handler1(
$3
)
-
- if
-
- tl[2]['a_verb'] ≟ <vaux.actv>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
Output:
-
[
-
tl[3]['lem']
tl[3]['a_vb']
$screeve
tl[3]['a_person']
tl[1]['a_nbr']
- b1
-
"not"
<adv>
]notted
<SV>
$screeve
- mood-handler1(
$2
)
-
- if
-
- tl[2]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
Output:
-
[
-
tl[2]['lem']
tl[2]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
- b1
-
"not"
<adv>
]notted
<SV>
$screeve
- Output:
-
[
-
"do"
<vblex.pres>
tl[1]['a_pers']
tl[1]['a_nbr']
- b1
-
"not"
<adv>
- b1
-
tl[2]['lem']
tl[2]['a_verb']
<inf>
]negation
<SN>
- Output:
-
[
-
"not"
<adv>
]neg
<SV.NEG>
sl[1]['moodtense']
- mood-handler1(
$1
)
-
- if
-
- sl[1]['moodtense'] ≟ <pres>
- sl[1]['a_nbr'] ≟ <pl>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
- elseif
-
- sl[1]['moodtense'] ≟ <past>
- sl[1]['a_nbr'] ≟ <sg>
then:
-
let tl[1]['a_nbr'] ≔
"sg"
-
let tl[1]['a_person'] ≔
"p3"
Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
]cop
<SV.COP>
$screeve
- mood-handler1(
$1
)
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
$screeve
]v
<SV>
sl[1]['a_person']
sl[1]['a_nbr']
$screeve
- mood-handler1(
$1
)
-
- if
-
- tl[1]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p1>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
let tl[1]['a_voice'] ≔
""
Output:
-
[
-
"be"
<vbser>
$screeve
<p3.sg>
- b
-
tl[1]['lem']
tl[1]['a_vb']
<pp>
]v
<SV>
sl[1]['a_person']
sl[1]['a_nbr']
- mood-handler1(
$1
)
-
- if
-
- tl[1]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_verb'] ≟ <vbmod.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
let tl[1]['a_voice'] ≔
""
Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
]v
<SV>
sl[1]['a_person']
sl[1]['a_nbr']
- mood-handler1(
$1
)
-
- if
-
- tl[1]['a_verb'] ≟ <vaux.actv>
- tl[1]['a_nbr'] ≟ <sg>
- tl[1]['a_person'] ≟ <p3>
then:
-
let tl[1]['a_nbr'] ≔
""
-
let tl[1]['a_person'] ≔
""
Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
$screeve
tl[1]['a_person']
tl[1]['a_nbr']
]v
<SV>
sl[1]['a_person']
sl[1]['a_nbr']
$screeve
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_num']
]num
<NUM>
- case-handler1(
$2
)
-
- if
-
- tl[1]['lem'] ≟
"one"
then:
-
let tl[2]['a_nbr'] ≔ <pl>
-
let tl[1]['a_nbr'] ≔ <pl>
Output:
-
[
-
tl[1]['lem']
tl[1]['a_num']
tl[1]['a_nbr']
- b0
- b1
-
tl[2]['lem']
tl[2]['a_nom']
tl[2]['a_nbr']
tl[2]['a_cas']
]num
<NUM>
- proc-synlabel1(
$2
)
-
- if
-
- tl[1]['a_nom'] ≟ <n>
then:
-
let tl[1]['tags'] ≔ <n>
tl[1]['a_nbr']<gen>
- elseif
-
- tl[1]['a_verb'] ≟ <vblex>
then:
-
let tl[1]['tags'] ≔ <vblex.subs>
Output:
-
[
-
tl[1]['lemh']
tl[1]['tags']
tl[1]['lemq']
- b1
-
tl[2]['whole']
]verb phrase
<SV>
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_post']
]post
<POST>
tl[1]['a_post']
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['whole']
]adv
<ADV>
- case-handler1(
$1
)
- Output:
-
[
-
tl[1]['whole']
- b1
-
"must"
<vbmod.pres>
]NECESSIVE
<NP-NEC>
- case-handler1(
$2
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_supernominal']
tl[1]['a_nbr']
"+"
"'s"
<gen>
- b1
-
tl[2]['whole']
]REALGEN
<NP-GEN>
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_cnj']
]cc
<CC>
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_cnj']
]cs
<CS>
- Output:
-
[
-
"no"
<adv>
]v
<SV.NEG>
- mood-handler1(
$1
)
- person-handler1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_vb']
$screeve
$person
]v
<SV>
$person
$screeve
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['whole']
]sent
<SENT>
- proc-synlabel1(
$1
)
- Output:
-
[
-
tl[1]['whole']
]sent
<SENT>