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 |
---|---|
AP |
|
NP |
|
PREP |
|
SENT |
|
These are the morphological analysis value (tag) sets that can be processed in the transfer.
Attribute set name | Tags |
---|---|
a_adp |
|
a_nbr |
|
a_cas |
|
Macros are helper functions in apertium transfer files.
-
let
$prepcase ≔ <nom>
-
let
$POST ≔
""
-
- if
-
- [1]['lem'] ≟
"in"
then:
-
let
$prepcase ≔ <ine>
- elseif
-
- [1]['lem'] ≟
"of"
then:
-
let
$prepcase ≔ <ela>
- elseif
-
- [1]['lem'] ≟
"into"
then:
-
let
$prepcase ≔ <ill>
- elseif
-
- [1]['lem'] ≟
"as a"
then:
-
let
$prepcase ≔ <ess>
- elseif
-
- [1]['lem'] ≟
"as"
then:
-
let
$prepcase ≔ <tra>
- elseif
-
- [1]['lem'] ≟
"for"
then:
-
let
$prepcase ≔ <all>
- elseif
-
- [1]['lem'] ≟
"to"
then:
-
let
$prepcase ≔ <all>
- elseif
-
- [1]['lem'] ≟
"at"
then:
-
let
$prepcase ≔ <ine>
- elseif
-
- [1]['lem'] ≟
"on"
then:
-
let
$prepcase ≔ <ade>
- elseif
-
- [1]['lem'] ≟
"from"
then:
-
let
$prepcase ≔ <abl>
- elseif
-
- [1]['lem'] ≟
"without"
then:
-
let
$prepcase ≔ <abe>
- elseif
-
- [1]['lem'] ≟
"with"
then:
-
let
$prepcase ≔ <gen>
-
let
$POST ≔
" ^post"
<POST>
"{^kanssa"
<post>
"$}$"
- else:
-
let
$prepcase ≔ <gen>
-
let
$POST ≔
- b1
" "
-
[
- b1
]
The actual rules concerning stuff.
- prep1(
$1
)
-
let [2]['a_cas'] ≔
$prepcase
-
let [3]['a_cas'] ≔
$prepcase
- Output:
-
[
]
- b2
-
[
]
$POST
- prep1(
$1
)
-
let [2]['a_cas'] ≔
$prepcase
- Output:
-
[
]
$POST
-
let [1]['a_cas'] ≔ <nom>
- Output:
-
[
]