• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Offline Language Translation API?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Is there a Java API which will translate English to Spanish without requiring an internet connection?

(sorta cross-posted on Stack Overflow)

Thanks kindly, Allasso
 
Marshal
Posts: 28263
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you got rather a negative reaction over there on Stack Overflow.

When I searched the web I found a lot of software which claimed to do language translation offline. I didn't see anything which claimed to have a Java API, but then I only spent less than a minute. Why do you need a Java API?
 
Allasso Travesser
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yikes, I guess SO was not the place to ask.

It doesn't have to be Java per se, but it has to be open source, something I can extend to fit to my own implementation. I would be running it on an Ubuntu server. Java or Perl would be good choices for me because I am more familiar with them. But I am open to any other languages also.
 
Paul Clapham
Marshal
Posts: 28263
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I googled "open source spanish translation" I found several reasonable-looking options. Although on closer inspection they seemed to be Spanish-Catalan or Spanish-Portuguese, which are much easier problems than Spanish-English. However you might want to have a look at this page: Free and Open-Source Software and Tools for Translators.
 
Allasso Travesser
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All it takes is the right key words. Thanks, found a lot there. Apertium does just what I want and does it quite painlessly in Unix-like fashion:

$ echo 'Esta es Gloria, mi amiga argentina' | apertium es-en
This is Gloria, my Argentinian friend

Can also provide infile outfile arguments.

http://linuxgazette.net/152/oregan.html
http://wiki.apertium.org/wiki/Main_Page

On Ubuntu, install with:

apt-get install apertium

Only thing which wasn't obvious to me is that you will also need to install the language pairs for the languages you wish to translate.

eg, for English <-> Spanish,

apt-get install apertium-en-es

list of language pairs:

http://wiki.apertium.org/wiki/List_of_language_pairs

I haven't checked if there is an Ubuntu package for every one of the pairs listed, but every one I've tried to install using the above example so far has worked.

If you get this error, it means that you don't have the language pair installed:

$ echo 'Esta es Gloria, mi amiga argentina' | apertium es-en
Error: Mode es-en does not exist. Try one of:
<list of installed language pairs, or "*" if none are installed>

See also man-page.

Thank you very much, Paul.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic