apertium-fin-eng

Finnish–English dictionary for rule-based machine translation


Project maintained by apertium Hosted on GitHub Pages – Theme by mattgraham

Apertium-fin-eng: Finnish–English machine translation rules

This is a visualisation of some rules in apertium transfer.

Categories (parts of chunks)

These are the categories Apertium is using in order to chunk, re-order and transfer lexemes.

Category Items
nominal
  • <n.*>
  • <np.*>
  • <prn.*>
nom
  • <n.*>
  • <np.*>
poss
  • <det.pos.*>
prn
  • <prn.*>
num
  • <num.*>
  • <num>
will
  • will<vblex.*>
  • will<vbmod.*>
be
  • be<vbser.*>
have
  • <vbhaver.*>
fverb
  • <vaux.past>
  • <vaux.past.*>
  • <vaux.pres>
  • <vaux.pres.*>
  • <vbdo.past>
  • <vbdo.past.*>
  • <vbdo.pres>
  • <vbdo.pres.*>
  • <vbhaver.past>
  • <vbhaver.past.*>
  • <vbhaver.pres>
  • <vbhaver.pres.*>
  • <vblex.imp>
  • <vblex.past>
  • <vblex.past.*>
  • <vblex.pres>
  • <vblex.pres.*>
  • <vbmod.past>
  • <vbmod.past.*>
  • <vbmod.pres>
  • <vbmod.pres.*>
  • <vbser.past>
  • <vbser.past.*>
  • <vbser.pres.*>
  • <vbser.pres>
modverb
  • <vbmod.*>
notverb
  • <vaux.*>
  • <vbmod.*>
  • <vbser.*>
isverb
  • <vbser.*>
  • be<vaux.*>
doverb
  • <vbdo.*>
  • do<vaux.*>
sg3stuff
  • <np.sg>
  • <np.*.sg>
  • <n.sg>
  • <np.sg.*>
  • <np.*.sg.*>
  • <n.sg.*>
pcp
  • <vblex.pprs>
  • <vbser.pprs>
  • <vaux.pprs>
  • <vbmod.pprs>
  • <vbhaver.pprs>
  • <vbdo.pprs>
  • <vblex.pp>
  • <vbser.pp>
  • <vaux.pp>
  • <vbmod.pp>
  • <vbhaver.pp>
  • <vbdo.pp>
subsverb
  • <vblex.subs>
  • <vbser.subs>
  • <vaux.subs>
  • <vbmod.subs>
  • <vbhaver.subs>
  • <vbdo.subs>
infverb
  • <vblex.inf>
  • <vbser.inf>
  • <vaux.inf>
  • <vbmod.inf>
  • <vbhaver.inf>
  • <vbdo.inf>
noun
  • <n.*>
  • <np.*>
adj
  • <adj>
  • <adj.*>
det
  • <det>
  • <det.*>
prnprs
  • prpers<prn.*>
prnprs-3
  • prpers<prn.subj.p3.*>
prnprs-non3
  • prpers<prn.subj.p1.*>
  • prpers<prn.subj.p2.*>
sent
  • <sent>
to
  • to<pr>
inf
  • <vblex.inf>
ger
  • <vblex.ger>
pr
  • <pr>
  • <post>
notadv
  • not<adv>
  • n't<adv>
  • not<adv.*>
  • n't<adv.*>
gen
  • 's<gen>
  • '<gen>
on
  • on<pr>
  • on<adv>
day
  • <num.*>
  • <num>
month
  • <num.*>
  • <num>
  • January<n.*>
  • February<n.*>
  • february<n.*>
  • March<n.*>
  • April<n.*>
  • May<n.*>
  • June<n.*>
  • July<n.*>
  • August<n.*>
  • October<n.*>
  • November<n.*>
  • October<n.*>
  • November<n.*>
  • December<n.*>
year
  • <num.*>
  • <num>

Attributes

These are the morphological analysis value (tag) sets that can be processed in the transfer.

Attribute set name Tags
nominaltype
  • <prn>
  • <n>
  • <n.abbr>
  • <np.ant.m>
  • <np.ant.f>
  • <np.cog>
  • <np.al>
  • <np.al.acr>
  • <np.top>
  • <np.geo>
  • <np>
a_numtype
  • <num.card>
  • <num.ord>
  • <num>
a_det
  • <det>
  • <prn>
  • <prn.dem>
a_adj
  • <adj>
a_comp
  • <pos>
  • <com>
  • <sup>
a_num
  • <sg>
  • <pl>
a_cas
  • <nom>
  • <acc>
  • <dat>
  • <gen>
  • <loc>
  • <ins>
  • <abl>
a_verb
  • <vaux>
  • <vaux.actv>
  • <vaux.pass>
  • <vblex>
  • <vblex.actv>
  • <vblex.pass>
  • <vbhaver>
  • <vbhaver.actv>
  • <vbhaver.pass>
a_tens
  • <cni>
  • <pri>
  • <pres>
  • <past>
a_pers
  • <p1>
  • <p2>
  • <p3>

Macros

Macros are helper functions in apertium transfer files.

compare

Parametres: 1
  1. let $comparison ≔ <pos>
    1. if
      1. sl[1]['a_comp'] ≟ <comp>
    2. then:
      1. let tl[1]['a_comp'] ≔ <comp>
      2. let $comparison ≔ <com>
    3. elseif
      1. sl[1]['a_comp'] ≟ <sup>
    4. then:
      1. let tl[1]['a_comp'] ≔ <sup>
      2. let $comparison ≔ <sup>
    5. else:
      1. let $comparison ≔ <pos>

possmangler1

Parametres: 1
  1. let $possession ≔ <pxsp3>
    1. if
      1. sl[1]['a_num'] ≟ <sg>
      2. sl[1]['a_pers'] ≟ <p1>
    2. then:
      1. let $possession ≔ <pxsg1>
    3. elseif
      1. sl[1]['a_num'] ≟ <sg>
      2. sl[1]['a_pers'] ≟ <p2>
    4. then:
      1. let $possession ≔ <pxsg2>
    5. elseif
      1. sl[1]['a_pers'] ≟ <p3>
    6. then:
      1. let $possession ≔ <pxsp3>
    7. elseif
      1. sl[1]['a_num'] ≟ <pl>
      2. sl[1]['a_pers'] ≟ <p2>
    8. then:
      1. let $possession ≔ <pxpl2>
    9. elseif
      1. sl[1]['a_num'] ≟ <pl>
      2. sl[1]['a_pers'] ≟ <p1>
    10. then:
      1. let $possession ≔ <pxpl1>
    11. elseif
      1. sl[1]['lem'] ≟ "my"
    12. then:
      1. let $possession ≔ <pxsg1>
    13. elseif
      1. sl[1]['lem'] ≟ "your"
    14. then:
      1. let $possession ≔ <pxsg2>
    15. elseif
      1. sl[1]['lem'] ≟ "his"
    16. then:
      1. let $possession ≔ <pxsp3>
    17. elseif
      1. sl[1]['lem'] ≟ "her"
    18. then:
      1. let $possession ≔ <pxsp3>
    19. elseif
      1. sl[1]['lem'] ≟ "our"
    20. then:
      1. let $possession ≔ <pxpl1>
    21. elseif
      1. sl[1]['lem'] ≟ "their"
    22. then:
      1. let $possession ≔ <pxsp3>
    23. else:
      1. let $possession ≔ <pxsp3>

test

Parametres: 1
  1. let $number ≔ ""

tensemangle1

Parametres: 1
  1. let $conneg ≔ <conneg>
    1. if
      1. sl[1]['a_tens'] ≟ <pres>
    2. then:
      1. let $tense ≔ <pri>
    3. elseif
      1. sl[1]['a_tens'] ≟ <cni>
    4. then:
      1. let $tense ≔ <pri>
    5. elseif
      1. sl[1]['a_tens'] ≟ <past>
    6. then:
      1. let $tense ≔ <past>
      2. let $conneg ≔ <sg.conneg>
    7. else:
      1. let $tense ≔ <pri>

personmangle1

Parametres: 1
    1. if
      1. sl[1]['a_pers'] ≟ ""
    2. then:
      1. let $perssl[1]['a_pers']
    3. else:
      1. let $pers ≔ <p3>
    1. if
      1. sl[1]['a_num'] ≟ ""
    2. then:
      1. let $persnumsl[1]['a_num']
    3. else:
      1. let $persnum ≔ <sg>

artmangle1

Parametres: 1
    1. if
      1. sl[1]['lem'] ≟ "the"
      2. sl[1]['lem'] ≟ "a"
      3. sl[1]['lem'] ≟ "The"
      4. sl[1]['lem'] ≟ "A"
    2. then:
      1. let $determiner ≔ ""
    3. else:
      1. let $determinertl[1]['whole'] <2>

numbermangle1

Parametres: 1
    1. if
      1. sl[1]['a_num'] ≟ ""
    2. then:
      1. let $numbersl[1]['a_num']
    3. else:
      1. let $number ≔ <sg>

Rules

The actual rules concerning stuff.

on day month year -> day+ess month+par year

Matching pattern:

  1. on
  2. day
  3. month
  4. year

Action:

  1. Output:
    1. [
      1. tl[2]['lem'] tl[2]['a_numtype'] <sg.ess>
      2. b
      3. tl[3]['lem'] tl[3]['nominaltype'] <sg.par>
      4. b
      5. tl[4]['lem'] tl[4]['a_numtype'] <sg.nom>
      ]date <AdvP>

will be pcp ->

Matching pattern:

  1. will
  2. be
  3. fverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $2 )
  3. Output:
    1. [
      1. tl[3]['lem'] tl[3]['a_verb'] <pasv.pot.impers>
      ]futverb <VP>

PRN-PRS-3 MOD NOT V -> prnpres negv mod infa

Matching pattern:

  1. prnprs-3
  2. modverb
  3. notadv
  4. infverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. tl[1]['whole']
      2. b1
      3. "ei" <vblex.neg.actv> $pers $persnum
      4. b2
      5. tl[2]['lem'] tl[2]['a_verb'] <actv> $tense $conneg
      6. b3
      7. tl[4]['lem'] tl[4]['a_verb'] <actv.infa.sg.lat>
      ]subjverb <VP.NEG> $pers $persnum

PRN-PRS-12 MOD NOT V -> negv mod infa

Matching pattern:

  1. prnprs-non3
  2. modverb
  3. notadv
  4. infverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. "ei" <vblex.neg.actv> $pers $persnum
      2. b2
      3. tl[2]['lem'] tl[2]['a_verb'] <actv> $tense $conneg
      4. b3
      5. tl[4]['lem'] tl[4]['a_verb'] <actv.infa.sg.lat>
      ]subjverb <VP.NEG> $pers $persnum

3SG-stuff VAUX NOT V -> stuff ei voi

Matching pattern:

  1. sg3stuff
  2. notverb
  3. notadv
  4. infverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $2 )
  3. Output:
    1. [
      1. tl[1]['lem'] tl[1]['nominaltype'] tl[1]['a_num'] <nom>
      2. b1
      3. "ei" <vblex.neg.actv> $pers $persnum
      4. b2
      5. tl[2]['lem'] tl[2]['a_verb'] <actv> $tense $conneg
      6. b3
      7. tl[4]['lem'] tl[4]['a_verb'] <actv.infa.sg.lat>
      ]subjverb <VP.NEG>

is not -> ei ole

Matching pattern:

  1. isverb
  2. notadv

Action:

  1. tensemangle1( $1 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. "ei" <vblex.neg.actv> $pers $persnum
      2. b1
      3. tl[1]['lem'] tl[1]['a_verb'] <actv> $tense $conneg
      ]subjverb <VP.NEG> $pers $persnum

PRNPRS-3 DO NOT V -> EI V

Matching pattern:

  1. prnprs-3
  2. doverb
  3. notadv
  4. infverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. tl[1]['whole']
      2. b1
      3. "ei" <vblex.neg.actv> $pers $persnum
      4. b2
      5. tl[4]['lem'] tl[4]['a_verb'] <actv> $tense $conneg
      ]subjverb <VP.NEG> $pers $persnum

PRNPRS-3 DO NOT V -> EI V

Matching pattern:

  1. prnprs-non3
  2. doverb
  3. notadv
  4. infverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. "ei" <vblex.neg.actv> $pers $persnum
      2. b2
      3. tl[4]['lem'] tl[4]['a_verb'] <actv> $tense $conneg
      ]subjverb <VP.NEG>

DO NOT V -> EI V

Matching pattern:

  1. doverb
  2. notadv
  3. infverb

Action:

  1. tensemangle1( $1 )
  2. personmangle1( $2 )
  3. Output:
    1. [
      1. "ei" <vblex.neg.actv> $pers $persnum
      2. b2
      3. tl[3]['lem'] tl[3]['a_verb'] <actv> $tense $conneg
      ]subjverb <VP> $pers $persnum

prnprs have not pcp -> ei+prs ole pcp

Matching pattern:

  1. prnprs
  2. have
  3. notadv
  4. pcp

Action:

  1. personmangle1( $1 )
  2. tensemangle1( $2 )
  3. Output:
    1. [
      1. "ei" <vblex.neg.actv> $pers $persnum
      2. b1
      3. "olla" <vaux.actv.pri.conneg>
      4. b2
      5. tl[4]['lem'] tl[4]['a_verb'] <actv.pp.pos> tl[1]['a_num'] <nom>
      ]pcp <V.NEG.PTCP>

have not pcp -> ei ole pcp

Matching pattern:

  1. have
  2. notadv
  3. pcp

Action:

  1. personmangle1( $1 )
  2. tensemangle1( $1 )
  3. Output:
    1. [
      1. "ei" <vblex.neg.actv> $pers $persnum
      2. b1
      3. "olla" <vaux.actv.pri.conneg>
      4. b2
      5. tl[3]['lem'] tl[3]['a_verb'] <actv.pp.pos.sg.nom>
      ]pcp <V.NEG.PTCP>

have pcp -> on pcp

Matching pattern:

  1. have
  2. pcp

Action:

  1. personmangle1( $1 )
  2. tensemangle1( $1 )
  3. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <actv> $tense $pers $persnum
      2. b1
      3. tl[2]['lem'] tl[2]['a_verb'] <actv.pp.pos.sg.nom>
      ]pcp <V.PTCP>

nominal have → adessive copula

Matching pattern:

  1. nominal
  2. have

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. tl[1]['lem'] tl[1]['nominaltype'] tl[1]['a_num'] <ade>
      2. b1
      3. "olla" <vaux.actv> $tense <p3.sg>
      ]subjverb <VP.HAVE>

personal pronoun verb: pro-drop non-3sg, use personal form

Matching pattern:

  1. prnprs-non3
  2. fverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. tl[2]['lem'] tl[2]['a_verb'] <actv> $tense $pers $persnum
      ]subjverb <VP>

personal pronoun verb p3: no droppings, use personal form

Matching pattern:

  1. prnprs-3
  2. fverb

Action:

  1. tensemangle1( $2 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. tl[1]['whole']
      2. b1
      3. tl[2]['lem'] tl[2]['a_verb'] <actv> $tense $pers $persnum
      ]subjverb <VP>

SäÄntö: to V-inf

Matching pattern:

  1. to
  2. infverb

Action:

  1. Output:
    1. [
      1. tl[2]['lem'] tl[2]['a_verb'] <actv> <infa> <sg> <lat>
      ]subjverb <V-INF>

num a n -> spread par

Matching pattern:

  1. num
  2. adj
  3. noun

Action:

  1. comparison( $2 )
  2. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_numtype'] <sg.nom>
      2. b1
      3. tl[2]['lem'] tl[2]['a_adj'] $comparison tl[3]['a_num'] <par>
      4. b2
      5. tl[3]['lem'] tl[3]['nominaltype'] tl[3]['a_num'] <par>
      ]np <NP> <CD>

det a n -> spread number

Matching pattern:

  1. det
  2. adj
  3. noun

Action:

  1. comparison( $2 )
  2. Output:
    1. [
      1. tl[2]['lem'] tl[2]['a_adj'] $comparison tl[3]['a_num'] <2>
      2. b2
      3. tl[3]['lem'] tl[3]['nominaltype'] tl[3]['a_num'] <2>
      ]np <NP> <CD>

a n -> spread number

Matching pattern:

  1. adj
  2. noun

Action:

  1. comparison( $2 )
  2. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_adj'] $comparison tl[2]['a_num'] <2>
      2. b1
      3. tl[2]['lem'] tl[2]['nominaltype'] tl[2]['a_num'] <2>
      ]np <NP> <CD>

num: add sg par

Matching pattern:

  1. num
  2. noun

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_numtype'] <sg.nom>
      2. b1
      3. tl[2]['lem'] tl[2]['nominaltype'] tl[2]['a_num'] <par>
      ]NP <NP> <CD>

SäÄntö: poss n

Matching pattern:

  1. poss
  2. noun

Action:

  1. possmangler1( $1 )
  2. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_det'] tl[1]['a_num'] <gen>
      2. b1
      3. tl[2]['lem'] tl[2]['nominaltype'] tl[2]['a_num'] <2> $possession
      ]np <NP> <CD>

SäÄntö: det n

Matching pattern:

  1. det
  2. noun

Action:

  1. artmangle1( $1 )
  2. Output:
    1. [
      1. $determiner
      2. b1
      3. tl[2]['lem'] tl[2]['nominaltype'] tl[2]['a_num'] <2>
      ]np <NP> <CD>

stray have: add spaces just in case because 've is analysed as have

Matching pattern:

  1. have

Action:

  1. tensemangle1( $1 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. b0
      2. tl[1]['lem'] tl[1]['a_verb'] <actv> $tense $pers $persnum
      ]have <V.HAVE>

SäÄntö: V

Matching pattern:

  1. fverb

Action:

  1. tensemangle1( $1 )
  2. personmangle1( $1 )
  3. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <actv> $tense $pers $persnum
      ]unkv <V>

SäÄntö: V-inf

Matching pattern:

  1. inf

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <actv.infa.sg.lat>
      ]inf <V-INF>

pcp

Matching pattern:

  1. pcp

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <pasv.pp.pos.sg.nom>
      ]pcp <V>

vbsubs -> infminen

Matching pattern:

  1. subsverb

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <infminen>
      ]vbsubs <V-SUBS>

gerund -> infma ssa

Matching pattern:

  1. ger

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <actv.infma.sg.ine>
      ]ger <V-INF>

num: add sg noms

Matching pattern:

  1. num

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_numtype'] <sg.nom>
      ]num <NumP> <CD>

det n's -> n+gen

Matching pattern:

  1. det
  2. noun
  3. gen

Action:

  1. artmangle1( $1 )
  2. Output:
    1. [
      1. $determiner
      2. b1
      3. tl[2]['lem'] tl[2]['nominaltype'] tl[2]['a_num'] <gen>
      ]np <NP.GEN>

n's -> n+gen

Matching pattern:

  1. noun
  2. gen

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['nominaltype'] tl[1]['a_num'] <gen>
      ]np <NP.GEN>

SäÄntö: n

Matching pattern:

  1. noun

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['nominaltype'] tl[1]['a_num'] <2>
      ]np <NP> <CD>

SäÄntö: a is so lonely

Matching pattern:

  1. adj

Action:

  1. comparison( $1 )
  2. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_adj'] $comparison <sg.nom>
      ]ap <AP> <CD>

Säätö: prn

Matching pattern:

  1. prn

Action:

  1. numbermangle1( $1 )
  2. Output:
    1. [
      1. tl[1]['lem'] tl[1]['nominaltype'] $number <2>
      ]np <NP> <CD>

Säätö: pr

Matching pattern:

  1. pr

Action:

  1. let $prep-lemasl[1]['lem']
  2. Output:
    1. [
      1. tl[1]['whole']
      ] <PR>

lone det removals

Matching pattern:

  1. det

Action:

  1. artmangle1( $1 )
  2. Output:
    1. [
      1. $determiner
      ]unkdet <DET>

stray inf to infa, what cna you do

Matching pattern:

  1. infverb

Action:

  1. Output:
    1. [
      1. tl[1]['lem'] tl[1]['a_verb'] <actv> <infa> <sg> <lat>
      ]verb <V-INF>

Säätö: stray negation

Matching pattern:

  1. notadv

Action:

  1. Output:
    1. [
      1. "ei" <vaux.neg.actv.p3.sg>
      ]unkneg <NEG>

REGLA: SENT

Matching pattern:

  1. sent

Action:

  1. Output:
    1. [
      1. tl[1]['whole']
      ]sent <SENT>