French to English translation with NLTK 3
I am using NLTK 3 and I have translated English words to French:
>>> from nltk.corpus import wordnet as omw
>>> ss = omw.synsets('dog')[0]
>>> ss.lemmas(lang='fre')
[Lemma('dog.n.01.chien'), Lemma('dog.n.01.canis_familiaris')]
But I couldn't do the opposite, i.e. translate the French word into English. Is it possible?
+3
source to share
1 answer
When I try Babelfish I keep getting this error:
AttributeError: 'module' object has no 'translate' attribute.
As per the issue discussed here
No http://babelfish.yahoo.com/translate_txt - it redirects to http://www.microsofttranslator.com/ which is another translator service with different APIs.
and, if you look in the official documentation here , there is no talk of translation.
+2
source to share