When I run this code it throws an error which I believe is due to the batch_classify method not being present in NLTK 3.0. I curious how to resolve this type of issue where some
The method was renamed to classify_many()
(I couldn't find documentation of NLTK 2.0 to check it, but I'm pretty sure that's what happened).
You have to replace all occurrences of batch_classify(...)
with classify_many(...)
in your code.
When moving from one major version of a library to another, you have to expect this kind of backwards-incompatible changes; they should ideally be documented in the changelog. However, I have to admit that in the past NLTK introduced backwards-incompatible changes even between minor versions, which I think is bad practice.