Diaoul / babelfish

BabelFish is a Python library to work with countries and languages
BSD 3-Clause "New" or "Revised" License
25 stars 14 forks source link

newbie question #25

Closed jesmitty closed 4 years ago

jesmitty commented 7 years ago

I can't get modules from babelfish to do anything. From python see:

from nltk.misc import babelfish #this part works, did pip install bablefish

print babelfish.translate('cookbook', 'english', 'spanish')

AttributeError Traceback (most recent call last)

in () ----> 1 print babelfish.translate('cookbook', 'english', 'spanish')

AttributeError: 'module' object has no attribute 'translate'

import inspect inspect.getmembers(babelfish, predicate=inspect.ismethod) [] # no modules loaded from babelfish.

labrys commented 5 years ago

@jesmitty This is not the same babelfish as in nltk.