Hi,
You may be interested in trying
curl
'http://localhost:2737/perWord?lang=en-es&modes=biltrans&q=let+there+be+light'
[{"input": "let", "biltrans": ["dejar<vblex><inf>",
"dejar<vblex><pres>", "dejar<vblex><past>", "dejar<vblex><pp>"]},
{"input": "there", "biltrans": ["all\u00ed<adv>"]}, {"input": "be",
"biltrans": ["ser<vbser><inf>"]}, {"input": "light", "biltrans":
["luz<n><f><sg>", "ligero<adj>", "encender<vblex><inf>",
"encender<vblex><pres>"]}]
It will output all the versions and you could pick one. However, /perWord
isn't enabled with the APY on www.apertium.org so you would have to run
your own instance.
What you want is possible through the CLI however I'll leave it to someone
more familiar with the usage to explain it (should be soon)...
--
Sushain K. Cherivirala
www.skc.name
On Tue, Sep 8, 2015 at 7:55 PM, Joel Wenzel <[email protected]> wrote:
> Hi,
>
> I would like to be able to pass a word and part of speech to Apertium and
> get a translation back. The APY <http://wiki.apertium.org/wiki/Apy> indicates
> I can pass text using translate, but it is a phrase, not a word, and I'm
> guessing the part of speech gets determined by the phrase.
>
> For example - these two requests may return different results in a
> different language but if I only am passing in the word, how can I specify
> to apertium which translation I want back.
> * buffalo, verb
> * buffalo, noun
>
> Also, if there is a command line version, it would be much easier for me.
> I can find things on the wiki that imply that there is a command line but
> I'm having trouble finding solid docs for it?
>
> Thanks for the help.
>
> Joel
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Apertium-stuff mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>
>
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff