Francis Tyers <[email protected]> writes:

> A 2015-02-18 09:42, Per Tunedal escrigué:
>> Hi,
>> I would like to explore the pipeline Apertium uses for translation. I
>> can see the steps in the modes.xml file, but I cannot figure out how to
>> write the commands to run them manually. How do I get the output of
>> lt-proc as it looks when it is forwarded to the tagger?
>> 
>>   <mode name="swe-dan-bytecode" install="yes">
>>     <pipeline>
>>       <program name="lt-proc">
>>         <file name="swe-dan.automorf.bin"/>
>>       </program>
>>       <program name="apertium-tagger -g $2">
>>         <file name="swe-dan.prob"/>
>>       </program>
>> 
>> The following doesn't work:
>> 
>> echo "Vi behöver en annan boll" | lt-proc swe-dan.automorf.bin | less
>> 
>> What should I enter instead?
>
> $ echo "Vi behöver en annan boll" | lt-proc -e swe-dan.automorf.bin
> ^Vi/Vi<prn><pers><p1><un><pl><nom>$ ^behöver/behöva<vblex><pres><actv>$ 
> ^en/en<num><ut><sg>/en<det><ind><ut><sg>$ 
> ^annan/annan<prn><ind><ut><sg><nom>/annan<prn><ind><ut><sg><nom>$ 
> ^boll/boll<n><ut><sg><ind><nom>/boll<n><ut><sg><ind><nom>$
>
> Works for me. Are you executing the command in the right directory ? If 
> not, what kind of error do you get ?

Also, that pair has some debug modes installed already, so you can do
the individual steps with:

$ echo Vi behöver|apertium -d . swe-dan-morph
^Vi/Vi<prn><pers><p1><un><pl><nom>$ 
^behöver/behöva<vblex><pres><actv>$^./.<sent>$

$ echo Vi behöver|apertium -d . swe-dan-tagger 
^Vi<prn><pers><p1><un><pl><nom>$ ^behöva<vblex><pres><actv>$^.<sent>$

$ echo Vi behöver|apertium -d . swe-dan-biltrans 
^Vi<prn><pers><p1><un><pl><nom>/Vi<prn><pers><p1><un><pl><nom>$ 
^behöva<vblex><pres><actv>/behøve<vblex><pres><actv>/trænge<vblex><pres><actv>$^.<sent>/.<sent>$

$ echo Vi behöver|apertium -d . swe-dan-transfer 
^Vi<prn><pers><p1><un><pl><nom>$ ^behøve<vblex><pres><actv>$^.<sent>$


-- 
Kevin Brubeck Unhammer

GPG: 0x766AC60C

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to