Maxent module broken #349

Closed
gawron opened this Issue Jan 24, 2013 · 1 comment

Projects

None yet

2 participants

gawron commented Jan 24, 2013

If you do

from nltk.classify import maxent
maxent.demo()

You get an import error from scipy if you have scipy 0.12 installed . scipy.maxentropy was deprecated in 0.11 and is gone in 0.12. So maxent.py should no longer use 'cg' as the
default maxent learner algorithm if scipy is installed, as is done in THIS piece of code:

if algorithm is None:
try:
import scipy
algorithm = 'cg'
except ImportError:
algorithm = 'iis'

Member
kmike commented Jan 24, 2013

This issue is already fixed in master: see #321, #307 and https://github.com/nltk/nltk/blob/master/nltk/classify/maxent.py#L278. Thanks for the report!

@kmike kmike closed this Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment