https://wiki.apertium.org/w/index.php?title=Translate_without_disambiguation&feed=atom&action=history
Translate without disambiguation - Revision history
2024-03-29T14:56:10Z
Revision history for this page on the wiki
MediaWiki 1.34.1
https://wiki.apertium.org/w/index.php?title=Translate_without_disambiguation&diff=73270&oldid=prev
Tino Didriksen: wget -> curl
2021-04-02T21:05:42Z
<p>wget -> curl</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 21:05, 2 April 2021</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 2:</td>
<td colspan="2" class="diff-lineno">Line 2:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">wget</del> https://apertium.projectjj.com/apt/install-nightly.sh<del class="diffchange diffchange-inline"> -O -</del> | sudo bash</div></td>
<td class="diff-marker">+</td>
<td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">curl -sS</ins> https://apertium.projectjj.com/apt/install-nightly.sh | sudo bash</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>sudo apt install python3-streamparser apertium-eng-ita</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>sudo apt install python3-streamparser apertium-eng-ita</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td>
</tr>
</table>
Tino Didriksen
https://wiki.apertium.org/w/index.php?title=Translate_without_disambiguation&diff=71979&oldid=prev
Unhammer: Created page with "Prerequisites: <pre> wget https://apertium.projectjj.com/apt/install-nightly.sh -O - | sudo bash sudo apt install python3-streamparser apertium-eng-ita </pre> <pre> $ echo "..."
2020-04-01T12:13:08Z
<p>Created page with "Prerequisites: <pre> wget https://apertium.projectjj.com/apt/install-nightly.sh -O - | sudo bash sudo apt install python3-streamparser apertium-eng-ita </pre> <pre> $ echo "..."</p>
<p><b>New page</b></p><div>Prerequisites:<br />
<br />
<pre><br />
wget https://apertium.projectjj.com/apt/install-nightly.sh -O - | sudo bash<br />
sudo apt install python3-streamparser apertium-eng-ita<br />
</pre><br />
<br />
<pre><br />
$ echo "fruit flies like a banana" | lt-proc -w '/usr/share/apertium/apertium-eng-ita/eng-ita.automorf.bin' | python3 -c $'import streamparser,sys\nfor (b, lu) in streamparser.parse_file(sys.stdin,with_text=True):\n print(b+"[/]".join(["^"+streamparser.reading_to_string(r)+"$" for r in lu.readings]),end="")' | apertium-pretransfer| lt-proc -b '/usr/share/apertium/apertium-eng-ita/eng-ita.autobil.bin' | python3 -c $'import streamparser,sys\nfor (b, lu) in streamparser.parse_file(sys.stdin, with_text=True):\n print(b + "[/]".join(["^"+lu.wordform+"/"+streamparser.reading_to_string(r)+"$" for r in lu.readings]), end="")' | apertium-transfer -b '/usr/share/apertium/apertium-eng-ita/apertium-eng-ita.eng-ita.t1x' '/usr/share/apertium/apertium-eng-ita/eng-ita.t1x.bin' | apertium-interchunk '/usr/share/apertium/apertium-eng-ita/apertium-eng-ita.eng-ita.t2x' '/usr/share/apertium/apertium-eng-ita/eng-ita.t2x.bin' | apertium-postchunk '/usr/share/apertium/apertium-eng-ita/apertium-eng-ita.eng-ita.t3x' '/usr/share/apertium/apertium-eng-ita/eng-ita.t3x.bin' | lt-proc -g '/usr/share/apertium/apertium-eng-ita/eng-ita.autogen.bin' | lt-proc -p '/usr/share/apertium/apertium-eng-ita/eng-ita.autopgen.bin'<br />
<br />
</pre><br />
gives<br />
<pre><br />
Mosche di frutta[/]#volare come piacere[/][/]piace[/]#piacere una banana[/]di banano <br />
</pre><br />
<br />
That was one long pipeline. Put this bit in a file:<br />
<pre><br />
lt-proc -w '/usr/share/apertium/apertium-eng-ita/eng-ita.automorf.bin' | python3 -c $'import streamparser,sys\nfor (b, lu) in streamparser.parse_file(sys.stdin,with_text=True):\n print(b+"[/]".join(["^"+streamparser.reading_to_string(r)+"$" for r in lu.readings]),end="")' | apertium-pretransfer| lt-proc -b '/usr/share/apertium/apertium-eng-ita/eng-ita.autobil.bin' | python3 -c $'import streamparser,sys\nfor (b, lu) in streamparser.parse_file(sys.stdin, with_text=True):\n print(b + "[/]".join(["^"+lu.wordform+"/"+streamparser.reading_to_string(r)+"$" for r in lu.readings]), end="")' | apertium-transfer -b '/usr/share/apertium/apertium-eng-ita/apertium-eng-ita.eng-ita.t1x' '/usr/share/apertium/apertium-eng-ita/eng-ita.t1x.bin' | apertium-interchunk '/usr/share/apertium/apertium-eng-ita/apertium-eng-ita.eng-ita.t2x' '/usr/share/apertium/apertium-eng-ita/eng-ita.t2x.bin' | apertium-postchunk '/usr/share/apertium/apertium-eng-ita/apertium-eng-ita.eng-ita.t3x' '/usr/share/apertium/apertium-eng-ita/eng-ita.t3x.bin' | lt-proc -g '/usr/share/apertium/apertium-eng-ita/eng-ita.autogen.bin' | lt-proc -p '/usr/share/apertium/apertium-eng-ita/eng-ita.autopgen.bin'<br />
</pre><br />
<br />
call it "eng-ita_ambig.mode" and chmod +x it. Now you can <br />
<pre><br />
$ echo "fruit flies like a banana" | ./eng-ita_ambig.mode<br />
</pre></div>
Unhammer