Difference between revisions of "Finnish"
Jump to navigation
Jump to search
TommiPirinen (talk | contribs) |
TommiPirinen (talk | contribs) |
||
Line 5: | Line 5: | ||
== Grammar stuff == |
== Grammar stuff == |
||
Common formulas: |
|||
=== Adposition to case suffix === |
|||
<pre> |
|||
<section-def-macros> |
|||
<def-macro n="adp-mangler" npar="1"> |
|||
<choose> |
|||
<!-- adp to case mappigngs --> |
|||
<!-- based on adp lexeme only --> |
|||
<when> |
|||
<test> |
|||
<equal><clip pos="1" side="sl" part="lem"/><lit v="I"/></equal> |
|||
</test> |
|||
<let> |
|||
<var n="adpcase"/> |
|||
<lit-tag v="ine"/> |
|||
</let> |
|||
<let> |
|||
<var n="maybeadp"/> |
|||
<lit v=""/> |
|||
</let> |
|||
</when> |
|||
<when> |
|||
<test> |
|||
<equal><clip pos="1" side="sl" part="lem"/><lit v="i"/></equal> |
|||
</test> |
|||
<let> |
|||
<var n="adpcase"/> |
|||
<lit-tag v="ine"/> |
|||
</let> |
|||
<let> |
|||
<var n="maybeadp"/> |
|||
<lit v=""/> |
|||
</let> |
|||
</when> |
|||
<when> |
|||
<test> |
|||
<equal><clip pos="1" side="sl" part="lem"/><lit v="fra"/></equal> |
|||
</test> |
|||
<let> |
|||
<var n="adpcase"/> |
|||
<lit-tag v="ela"/> |
|||
</let> |
|||
<let> |
|||
<var n="maybeadp"/> |
|||
<lit v=""/> |
|||
</let> |
|||
</when> |
|||
... |
|||
... |
|||
... |
|||
<rule comment="adp noun"> |
|||
<pattern> |
|||
<pattern-item n="adp"/> |
|||
<pattern-item n="noun"/> |
|||
</pattern> |
|||
<action> |
|||
<call-macro n="adp-mangler"> |
|||
<with-param pos="1"/> |
|||
</call-macro> |
|||
<out> |
|||
<chunk name="adpnoun" case="caseFirstWord"> |
|||
<tags> |
|||
<tag><lit-tag v="NP"/></tag> |
|||
<tag><var n="adpcase"/></tag> |
|||
</tags> |
|||
<lu> |
|||
<clip pos="2" side="tl" part="lem"/> |
|||
<clip pos="2" side="tl" part="a_noun"/> |
|||
<clip pos="2" side="tl" part="a_number"/> |
|||
<var n="adpcase"/> |
|||
</lu> |
|||
<b pos="0"/> |
|||
<lu> |
|||
<var n="maybeadp"/> |
|||
</lu> |
|||
</chunk> |
|||
</out> |
|||
</action> |
|||
</rule> |
|||
</pre> |
|||
Revision as of 12:21, 16 February 2021
- apertium-fin is a conversion from omorfi: omorfi, large coverage, experimental
- giella-fin is in giellatekno repository, more stable
Contents
Grammar stuff
Common formulas:
Adposition to case suffix
<section-def-macros> <def-macro n="adp-mangler" npar="1"> <choose> <!-- adp to case mappigngs --> <!-- based on adp lexeme only --> <when> <test> <equal><clip pos="1" side="sl" part="lem"/><lit v="I"/></equal> </test> <let> <var n="adpcase"/> <lit-tag v="ine"/> </let> <let> <var n="maybeadp"/> <lit v=""/> </let> </when> <when> <test> <equal><clip pos="1" side="sl" part="lem"/><lit v="i"/></equal> </test> <let> <var n="adpcase"/> <lit-tag v="ine"/> </let> <let> <var n="maybeadp"/> <lit v=""/> </let> </when> <when> <test> <equal><clip pos="1" side="sl" part="lem"/><lit v="fra"/></equal> </test> <let> <var n="adpcase"/> <lit-tag v="ela"/> </let> <let> <var n="maybeadp"/> <lit v=""/> </let> </when> ... ... ... <rule comment="adp noun"> <pattern> <pattern-item n="adp"/> <pattern-item n="noun"/> </pattern> <action> <call-macro n="adp-mangler"> <with-param pos="1"/> </call-macro> <out> <chunk name="adpnoun" case="caseFirstWord"> <tags> <tag><lit-tag v="NP"/></tag> <tag><var n="adpcase"/></tag> </tags> <lu> <clip pos="2" side="tl" part="lem"/> <clip pos="2" side="tl" part="a_noun"/> <clip pos="2" side="tl" part="a_number"/> <var n="adpcase"/> </lu> <b pos="0"/> <lu> <var n="maybeadp"/> </lu> </chunk> </out> </action> </rule>