Difference between revisions of "Kazakh and Sakha"

From Apertium
Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
* [[apertium-kaz-sah]]
* [[apertium-kaz-sah]]


Install [[apertium-kaz]]
Installing [[apertium-kaz]]
<pre>git clone https://github.com/apertium/apertium-kaz.git</pre>
<pre>$ git clone https://github.com/apertium/apertium-kaz.git
<pre>cd apertium-kaz</pre>
$ cd apertium-kaz
<pre>./autogen.sh</pre>
$ ./autogen.sh
<pre>make</pre>
$ make</pre>


Install [[apertium-sah]]
Installing [[apertium-sah]]
<pre>git clone https://github.com/apertium/apertium-sah.git</pre>
<pre>$ git clone https://github.com/apertium/apertium-sah.git
<pre>cd apertium-sah</pre>
$ cd apertium-sah
<pre>./autogen.sh</pre>
$ ./autogen.sh
<pre>make</pre>
$ make</pre>


Install [[apertium-kaz-sah]]
Installing [[apertium-kaz-sah]]
<pre>git clone https://github.com/apertium/apertium-kaz-sah.git</pre>
<pre>$ git clone https://github.com/apertium/apertium-kaz-sah.git
<pre>cd apertium-kaz-sah</pre>
$ cd apertium-kaz-sah
<pre>./autogen.sh --with-lang1=../apertium-kaz --with-lang2=../apertium-sah # paths to apertium-kaz and apertium-sah source folders</pre>
$ ./autogen.sh --with-lang1=../apertium-kaz --with-lang2=../apertium-sah # paths to apertium-kaz and apertium-sah source folders
<pre>make</pre>
$ make</pre>


==Development workflow==

===Transfer rules===

Example of adding <loc> -> <dat> rule

In apertium-kaz-sah.kaz-sah.t1x file

Adding to section <section-def-cats>
<pre><def-cat n="nom">
<cat-item tags="n.*"/>
</def-cat></pre>

Adding to section <section-def-attrs>
<pre><def-attr n="a_cas">
<attr-item tags="nom"/>
<attr-item tags="dat"/>
<attr-item tags="loc"/>
</def-attr></pre>

Adding to section <section-def-macros>
<pre><def-macro n="f_default_nom1" npar="1">
<choose><when><test><equal><clip pos="1" side="tl" part="a_cas"/><lit-tag v="loc"/></equal></test>
<let><clip pos="1" side="tl" part="a_cas"/><lit-tag v="dat"/></let></when></choose>
</def-macro></pre>

Adding to section <section-rules>
<pre><rule comment="REGLA: NOUN">
<pattern>
<pattern-item n="nom"/>
</pattern>
<action>
<call-macro n="f_default_nom1">
<with-param pos="1"/>
</call-macro>
<out>
<chunk name="n" case="caseFirstWord">
<tags>
<tag><lit-tag v="SN"/></tag>
</tags>
<lu>
<clip pos="1" side="tl" part="whole"/>
</lu>
</chunk>
</out>
</action>
</rule></pre>
[[Category:Kazakh and Sakha|*]]
[[Category:Kazakh and Sakha|*]]
[[Category:Kazakh]]
[[Category:Kazakh]]

Latest revision as of 09:55, 24 April 2018

This is Apertium translation pair for Kazakh and Sakha. The pair is currently located in incubator.

Installation[edit]

You will need:

Installing apertium-kaz

$ git clone https://github.com/apertium/apertium-kaz.git
$ cd apertium-kaz
$ ./autogen.sh
$ make

Installing apertium-sah

$ git clone https://github.com/apertium/apertium-sah.git
$ cd apertium-sah
$ ./autogen.sh
$ make

Installing apertium-kaz-sah

$ git clone https://github.com/apertium/apertium-kaz-sah.git
$ cd apertium-kaz-sah
$ ./autogen.sh --with-lang1=../apertium-kaz --with-lang2=../apertium-sah    # paths to apertium-kaz and apertium-sah source folders
$ make

Development workflow[edit]

Transfer rules[edit]

Example of adding <loc> -> <dat> rule

In apertium-kaz-sah.kaz-sah.t1x file

Adding to section <section-def-cats>

<def-cat n="nom">
  <cat-item tags="n.*"/>
</def-cat>

Adding to section <section-def-attrs>

<def-attr n="a_cas">
  <attr-item tags="nom"/>
  <attr-item tags="dat"/>
  <attr-item tags="loc"/>
</def-attr>

Adding to section <section-def-macros>

<def-macro n="f_default_nom1" npar="1">
  <choose><when><test><equal><clip pos="1" side="tl" part="a_cas"/><lit-tag v="loc"/></equal></test>
  <let><clip pos="1" side="tl" part="a_cas"/><lit-tag v="dat"/></let></when></choose>
</def-macro>

Adding to section <section-rules>

<rule comment="REGLA: NOUN">
  <pattern>
    <pattern-item n="nom"/>
  </pattern>
  <action>
    <call-macro n="f_default_nom1">
      <with-param pos="1"/>
    </call-macro>
    <out>
      <chunk name="n" case="caseFirstWord">
        <tags>
          <tag><lit-tag v="SN"/></tag>
        </tags>
        <lu>
           <clip pos="1" side="tl" part="whole"/>
        </lu>
      </chunk>
    </out>
  </action>
</rule>