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 |
---|---|
nominal |
|
nom |
|
poss |
|
prn |
|
num |
|
will |
|
be |
|
have |
|
fverb |
|
modverb |
|
notverb |
|
isverb |
|
doverb |
|
sg3stuff |
|
pcp |
|
subsverb |
|
infverb |
|
noun |
|
adj |
|
det |
|
prnprs |
|
prnprs-3 |
|
prnprs-non3 |
|
sent |
|
to |
|
inf |
|
ger |
|
pr |
|
notadv |
|
gen |
|
on |
|
day |
|
month |
|
year |
|
These are the morphological analysis value (tag) sets that can be processed in the transfer.
Attribute set name | Tags |
---|---|
nominaltype |
|
a_numtype |
|
a_det |
|
a_adj |
|
a_comp |
|
a_num |
|
a_cas |
|
a_verb |
|
a_tens |
|
a_pers |
|
Macros are helper functions in apertium transfer files.
-
let
$comparison ≔ <pos>
-
- if
-
- sl[1]['a_comp'] ≟ <comp>
then:
-
let tl[1]['a_comp'] ≔ <comp>
-
let
$comparison ≔ <com>
- elseif
-
- sl[1]['a_comp'] ≟ <sup>
then:
-
let tl[1]['a_comp'] ≔ <sup>
-
let
$comparison ≔ <sup>
- else:
-
let
$comparison ≔ <pos>
-
let
$possession ≔ <pxsp3>
-
- if
-
- sl[1]['a_num'] ≟ <sg>
- sl[1]['a_pers'] ≟ <p1>
then:
-
let
$possession ≔ <pxsg1>
- elseif
-
- sl[1]['a_num'] ≟ <sg>
- sl[1]['a_pers'] ≟ <p2>
then:
-
let
$possession ≔ <pxsg2>
- elseif
-
- sl[1]['a_pers'] ≟ <p3>
then:
-
let
$possession ≔ <pxsp3>
- elseif
-
- sl[1]['a_num'] ≟ <pl>
- sl[1]['a_pers'] ≟ <p2>
then:
-
let
$possession ≔ <pxpl2>
- elseif
-
- sl[1]['a_num'] ≟ <pl>
- sl[1]['a_pers'] ≟ <p1>
then:
-
let
$possession ≔ <pxpl1>
- elseif
-
- sl[1]['lem'] ≟
"my"
then:
-
let
$possession ≔ <pxsg1>
- elseif
-
- sl[1]['lem'] ≟
"your"
then:
-
let
$possession ≔ <pxsg2>
- elseif
-
- sl[1]['lem'] ≟
"his"
then:
-
let
$possession ≔ <pxsp3>
- elseif
-
- sl[1]['lem'] ≟
"her"
then:
-
let
$possession ≔ <pxsp3>
- elseif
-
- sl[1]['lem'] ≟
"our"
then:
-
let
$possession ≔ <pxpl1>
- elseif
-
- sl[1]['lem'] ≟
"their"
then:
-
let
$possession ≔ <pxsp3>
- else:
-
let
$possession ≔ <pxsp3>
-
let
$number ≔
""
-
let
$conneg ≔ <conneg>
-
- if
-
- sl[1]['a_tens'] ≟ <pres>
then:
-
let
$tense ≔ <pri>
- elseif
-
- sl[1]['a_tens'] ≟ <cni>
then:
-
let
$tense ≔ <pri>
- elseif
-
- sl[1]['a_tens'] ≟ <past>
then:
-
let
$tense ≔ <past>
-
let
$conneg ≔
<sg.conneg>
- else:
-
let
$tense ≔ <pri>
-
- if
-
- sl[1]['a_pers'] ≟
""
then:
-
let
$pers ≔ sl[1]['a_pers']
- else:
-
let
$pers ≔ <p3>
- if
-
- sl[1]['a_num'] ≟
""
then:
-
let
$persnum ≔ sl[1]['a_num']
else:
-
let
$persnum ≔ <sg>
-
- if
-
- sl[1]['lem'] ≟
"the"
- sl[1]['lem'] ≟
"a"
- sl[1]['lem'] ≟
"The"
- sl[1]['lem'] ≟
"A"
then:
-
let
$determiner ≔
""
- else:
-
let
$determiner ≔ tl[1]['whole']
<2>
-
- if
-
- sl[1]['a_num'] ≟
""
then:
-
let
$number ≔ sl[1]['a_num']
- else:
-
let
$number ≔ <sg>
The actual rules concerning stuff.
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_numtype']
<sg.ess>
- b
-
tl[3]['lem']
tl[3]['nominaltype']
<sg.par>
- b
-
tl[4]['lem']
tl[4]['a_numtype']
<sg.nom>
]date
<AdvP>
- tensemangle1(
$2
)
- personmangle1(
$2
)
- Output:
-
[
-
tl[3]['lem']
tl[3]['a_verb']
<pasv.pot.impers>
]futverb
<VP>
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
tl[1]['whole']
- b1
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b2
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
$tense
$conneg
- b3
-
tl[4]['lem']
tl[4]['a_verb']
<actv.infa.sg.lat>
]subjverb
<VP.NEG>
$pers
$persnum
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b2
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
$tense
$conneg
- b3
-
tl[4]['lem']
tl[4]['a_verb']
<actv.infa.sg.lat>
]subjverb
<VP.NEG>
$pers
$persnum
- tensemangle1(
$2
)
- personmangle1(
$2
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['nominaltype']
tl[1]['a_num']
<nom>
- b1
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b2
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
$tense
$conneg
- b3
-
tl[4]['lem']
tl[4]['a_verb']
<actv.infa.sg.lat>
]subjverb
<VP.NEG>
- tensemangle1(
$1
)
- personmangle1(
$1
)
- Output:
-
[
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b1
-
tl[1]['lem']
tl[1]['a_verb']
<actv>
$tense
$conneg
]subjverb
<VP.NEG>
$pers
$persnum
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
tl[1]['whole']
- b1
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b2
-
tl[4]['lem']
tl[4]['a_verb']
<actv>
$tense
$conneg
]subjverb
<VP.NEG>
$pers
$persnum
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b2
-
tl[4]['lem']
tl[4]['a_verb']
<actv>
$tense
$conneg
]subjverb
<VP.NEG>
- tensemangle1(
$1
)
- personmangle1(
$2
)
- Output:
-
[
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b2
-
tl[3]['lem']
tl[3]['a_verb']
<actv>
$tense
$conneg
]subjverb
<VP>
$pers
$persnum
- personmangle1(
$1
)
- tensemangle1(
$2
)
- Output:
-
[
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b1
-
"olla"
<vaux.actv.pri.conneg>
- b2
-
tl[4]['lem']
tl[4]['a_verb']
<actv.pp.pos>
tl[1]['a_num']
<nom>
]pcp
<V.NEG.PTCP>
- personmangle1(
$1
)
- tensemangle1(
$1
)
- Output:
-
[
-
"ei"
<vblex.neg.actv>
$pers
$persnum
- b1
-
"olla"
<vaux.actv.pri.conneg>
- b2
-
tl[3]['lem']
tl[3]['a_verb']
<actv.pp.pos.sg.nom>
]pcp
<V.NEG.PTCP>
- personmangle1(
$1
)
- tensemangle1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv>
$tense
$pers
$persnum
- b1
-
tl[2]['lem']
tl[2]['a_verb']
<actv.pp.pos.sg.nom>
]pcp
<V.PTCP>
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['nominaltype']
tl[1]['a_num']
<ade>
- b1
-
"olla"
<vaux.actv>
$tense
<p3.sg>
]subjverb
<VP.HAVE>
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
$tense
$pers
$persnum
]subjverb
<VP>
- tensemangle1(
$2
)
- personmangle1(
$1
)
- Output:
-
[
-
tl[1]['whole']
- b1
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
$tense
$pers
$persnum
]subjverb
<VP>
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
<infa>
<sg>
<lat>
]subjverb
<V-INF>
- comparison(
$2
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_numtype']
<sg.nom>
- b1
-
tl[2]['lem']
tl[2]['a_adj']
$comparison
tl[3]['a_num']
<par>
- b2
-
tl[3]['lem']
tl[3]['nominaltype']
tl[3]['a_num']
<par>
]np
<NP>
<CD>
- comparison(
$2
)
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_adj']
$comparison
tl[3]['a_num']
<2>
- b2
-
tl[3]['lem']
tl[3]['nominaltype']
tl[3]['a_num']
<2>
]np
<NP>
<CD>
- comparison(
$2
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_adj']
$comparison
tl[2]['a_num']
<2>
- b1
-
tl[2]['lem']
tl[2]['nominaltype']
tl[2]['a_num']
<2>
]np
<NP>
<CD>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_numtype']
<sg.nom>
- b1
-
tl[2]['lem']
tl[2]['nominaltype']
tl[2]['a_num']
<par>
]NP
<NP>
<CD>
- possmangler1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_det']
tl[1]['a_num']
<gen>
- b1
-
tl[2]['lem']
tl[2]['nominaltype']
tl[2]['a_num']
<2>
$possession
]np
<NP>
<CD>
- artmangle1(
$1
)
- Output:
-
[
-
$determiner
- b1
-
tl[2]['lem']
tl[2]['nominaltype']
tl[2]['a_num']
<2>
]np
<NP>
<CD>
- tensemangle1(
$1
)
- personmangle1(
$1
)
- Output:
-
[
- b0
-
tl[1]['lem']
tl[1]['a_verb']
<actv>
$tense
$pers
$persnum
]have
<V.HAVE>
- tensemangle1(
$1
)
- personmangle1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv>
$tense
$pers
$persnum
]unkv
<V>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv.infa.sg.lat>
]inf
<V-INF>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<pasv.pp.pos.sg.nom>
]pcp
<V>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<infminen>
]vbsubs
<V-SUBS>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv.infma.sg.ine>
]ger
<V-INF>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_numtype']
<sg.nom>
]num
<NumP>
<CD>
- artmangle1(
$1
)
- Output:
-
[
-
$determiner
- b1
-
tl[2]['lem']
tl[2]['nominaltype']
tl[2]['a_num']
<gen>
]np
<NP.GEN>
- Output:
-
[
-
tl[1]['lem']
tl[1]['nominaltype']
tl[1]['a_num']
<gen>
]np
<NP.GEN>
- Output:
-
[
-
tl[1]['lem']
tl[1]['nominaltype']
tl[1]['a_num']
<2>
]np
<NP>
<CD>
- comparison(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_adj']
$comparison
<sg.nom>
]ap
<AP>
<CD>
- numbermangle1(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['nominaltype']
$number
<2>
]np
<NP>
<CD>
-
let
$prep-lema ≔ sl[1]['lem']
- Output:
-
[
-
tl[1]['whole']
]
<PR>
- artmangle1(
$1
)
- Output:
-
[
-
$determiner
]unkdet
<DET>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv>
<infa>
<sg>
<lat>
]verb
<V-INF>
- Output:
-
[
-
"ei"
<vaux.neg.actv.p3.sg>
]unkneg
<NEG>
- Output:
-
[
-
tl[1]['whole']
]sent
<SENT>