Finnish–Norwegian 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 |
---|---|
noun |
|
propn |
|
adp |
|
cnjcoo |
|
card |
|
for |
|
i |
|
å |
|
ord |
|
adj |
|
har |
|
participle |
|
passive |
|
verb |
|
finverb |
|
infverb |
|
personal |
|
art |
|
pron |
|
punct |
|
These are the morphological analysis value (tag) sets that can be processed in the transfer.
Attribute set name | Tags |
---|---|
a_case |
|
a_noun |
|
a_verb |
|
a_pron |
|
a_tense |
|
a_ord |
|
a_adj |
|
a_number |
|
a_person |
|
a_comp |
|
a_punct |
|
a_cnjcoo |
|
Macros are helper functions in apertium transfer files.
-
- if
-
- sl[1]['lem'] ≟
"I"
then:
-
let
$adpcase ≔ <ine>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"i"
then:
-
let
$adpcase ≔ <ine>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"fra"
then:
-
let
$adpcase ≔ <ela>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"om"
then:
-
let
$adpcase ≔ <ela>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"frå"
then:
-
let
$adpcase ≔ <ela>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"til"
then:
-
let
$adpcase ≔ <ill>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"på"
then:
-
let
$adpcase ≔ <ade>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"ved"
then:
-
let
$adpcase ≔ <ade>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"av"
then:
-
let
$adpcase ≔ <abl>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"for"
then:
-
let
$adpcase ≔ <all>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"uten"
then:
-
let
$adpcase ≔ <abe>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"som"
then:
-
let
$adpcase ≔ <ess>
-
let
$maybeadp ≔
""
- elseif
-
- sl[1]['lem'] ≟
"På"
then:
-
let
$adpcase ≔ <tra>
-
let
$maybeadp ≔
""
- else:
-
let
$adpcase ≔ <gen>
-
let
$maybeadp ≔ tl[1]['whole']
-
- if
-
- sl[1]['a_number'] ≟ <sg>
- sl[1]['a_person'] ≟ <p1>
then:
-
let
$person ≔ <p1.sg>
-
let
$prodrop ≔
""
- elseif
-
- sl[1]['a_number'] ≟ <sg>
- sl[1]['a_person'] ≟ <p2>
then:
-
let
$person ≔ <p2.sg>
-
let
$prodrop ≔
""
- elseif
-
- sl[1]['a_number'] ≟ <sg>
- sl[1]['a_person'] ≟ <p3>
then:
-
let
$person ≔ <p3.sg>
-
let
$prodrop ≔ tl[1]['whole']
- elseif
-
- sl[1]['a_number'] ≟ <pl>
- sl[1]['a_person'] ≟ <p1>
then:
-
let
$person ≔ <p1.pl>
-
let
$prodrop ≔
""
- elseif
-
- sl[1]['a_number'] ≟ <pl>
- sl[1]['a_person'] ≟ <p2>
then:
-
let
$person ≔ <p2.pl>
-
let
$prodrop ≔
""
- elseif
-
- sl[1]['a_number'] ≟ <pl>
- sl[1]['a_person'] ≟ <p3>
then:
-
let
$person ≔ <p3.pl>
-
let
$prodrop ≔ tl[1]['whole']
- else:
-
let
$person ≔ <p3.sg>
-
let
$prodrop ≔ tl[1]['whole']
-
- if
-
- sl[1]['a_tense'] ≟ <imp>
then:
-
let
$person ≔ <p2.sg>
- elseif
-
- sl[1]['a_tense'] ≟ <pres>
then:
-
let
$person ≔ <p3.sg>
- elseif
-
- sl[1]['a_tense'] ≟ <pret>
then:
-
let
$person ≔ <p3.sg>
- else:
-
let
$person ≔ <p3.sg>
-
- if
-
- sl[1]['a_comp'] ≟ <comp>
then:
-
let
$comparison ≔ <comp>
- else:
-
let tl[1]['a_comp'] ≔ <pst>
-
let
$comparison ≔ <pst>
-
- if
-
- sl[1]['a_tense'] ≟ <pret>
then:
-
let
$tense ≔ <past>
- else:
-
let tl[1]['a_tense'] ≔ <pri>
-
let
$tense ≔ <pri>
-
- if
-
- sl[1]['a_number'] ≟ <sg>
then:
-
let
$number ≔ <sg>
- elseif
-
- sl[1]['a_number'] ≟ <pl>
then:
-
let
$number ≔ <pl>
- elseif
-
- sl[1]['a_number'] ≟ <sp>
then:
-
let
$number ≔ <sg>
- else:
-
let tl[1]['a_number'] ≔ <sg>
-
let
$number ≔ <sg>
-
- if
-
- sl[1]['a_case'] ≟ <acc>
then:
-
let
$case ≔ <gen>
- else:
-
let tl[1]['a_case'] ≔ <nom>
-
let
$case ≔ <nom>
The actual rules concerning stuff.
- adp-mangler(
$1
)
- comp-mangler(
$3
)
- number-mangler(
$4
)
- Output:
-
[
-
tl[3]['lem']
tl[3]['a_adj']
$comparison
$number
$adpcase
- b2
-
tl[4]['lem']
tl[4]['a_noun']
$number
$adpcase
- b1
-
$maybeadp
]adpnoun
<NP>
$adpcase
- adp-mangler(
$1
)
- number-mangler(
$3
)
- Output:
-
[
-
tl[3]['lem']
tl[3]['a_noun']
$number
$adpcase
- b1
-
$maybeadp
]adpnoun
<NP>
$adpcase
- number-mangler(
$3
)
- case-mangler(
$3
)
- comp-mangler(
$2
)
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_adj']
$comparison
$number
$case
- b2
-
tl[3]['lem']
tl[3]['a_noun']
$number
$case
]noun
<NP>
- personal-mangler(
$1
)
- tense-mangler(
$1
)
- Output:
-
[
-
"olla"
<vaux.actv>
$tense
$person
- b0
-
tl[2]['lem']
tl[2]['a_verb']
<actv.pp.pst.sg.nom>
]verb
<VP.PERF>
- personal-mangler(
$1
)
- tense-mangler(
$2
)
- Output:
-
[
-
$prodrop
- b0
-
tl[2]['lem']
tl[2]['a_verb']
<actv>
$tense
$person
]verb
<VP>
$tense
$person
- adp-mangler(
$1
)
- number-mangler(
$3
)
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_noun']
$number
<nom>
- b0
-
tl[3]['lem']
tl[3]['a_noun']
$number
$adpcase
- b1
-
$maybeadp
]adpnoun
<NP>
$adpcase
- adp-mangler(
$1
)
- number-mangler(
$2
)
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_noun']
$number
$adpcase
- b0
-
$maybeadp
]adpnoun
<NP>
$adpcase
- case-mangler(
$2
)
- comp-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
<num>
<card>
<sg>
<nom>
- b0
-
tl[2]['lem']
tl[2]['a_noun']
<sg>
<par>
]count
<NUMP>
- person-mangler(
$1
)
- tense-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv>
$tense
$person
]verb
<V>
- tense-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<pasv>
$tense
<impers>
]pasv
<V.PASV>
- number-mangler(
$2
)
- case-mangler(
$2
)
- comp-mangler(
$2
)
- Output:
-
[
-
"vuonna"
<adv>
- b0
-
tl[2]['lem']
<num>
<card>
<sg>
<nom>
]year
<NUMP>
- number-mangler(
$1
)
- case-mangler(
$1
)
- comp-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
<num>
<card>
<sg>
$case
]card
<NUM>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<pasv.pp.pst.sg.nom>
]pcp
<ADJ>
- Output:
-
[
-
tl[3]['lem']
tl[3]['a_verb']
<actv.infa.tra.px3sp>
]inf
<V.INF.TRA>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_verb']
<actv.infa.sg.lat>
]inf
<V.INF>
- case-mangler(
$1
)
- number-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_pron']
$number
$case
]pron
<PRN>
- number-mangler(
$2
)
- case-mangler(
$2
)
- Output:
-
[
-
tl[2]['lem']
tl[2]['a_noun']
$number
$case
]noun
<NP>
- case-mangler(
$1
)
- number-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_noun']
$number
$case
]noun
<N>
- number-mangler(
$1
)
- case-mangler(
$1
)
- comp-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_ord']
$number
$case
]ord
<ADJ>
- number-mangler(
$1
)
- case-mangler(
$1
)
- comp-mangler(
$1
)
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_adj']
$comparison
$number
$case
]adj
<ADJ>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_cnjcoo']
]cnjcoo
<CC>
- Output:
-
[
-
tl[1]['lem']
tl[1]['a_punct']
]sent
<SENT>