Is there a Python module for the translation of texts from one human language to another? I'm planning to work with texts that are to be pre and post processed with Python scripts. What other Python-integrated approaches can be used?
A:
The Python Natural Language Toolkit will almost certainly be useful to you:
"Open source Python modules, linguistic data and documentation for research and development in natural language processing"
I don't believe it will do translation directly, but it's great for machine understanding of natural language text.
RichieHindle
2009-08-22 16:40:22
+4
A:
If you're looking to actually translate a string of text between two languages, say from English "Hello" to Spanish "Hola", you might want to look into the Google Language API.
jgeewax
2009-08-22 16:45:02
A:
What to use depends on what you want to translate.
- Texts that are a part of your application, like UI etc. Then use gettext directly, or zope.i18n, which wraps gettext so it's easier to use.
- Arbitrary texts: The Google Translation API is the thing for you.
- "Content", ie things that the user of the application will modify and translate: Well... nothing, really. You have to implement that yourself.
On your description, it sounds like you are after #2.
Lennart Regebro
2009-08-22 19:25:02