Sklearn error when trying to call a new classifier - Python 3.4
<p>Whenever I try to call a new classifier I get the same error...</p>

<p>Here's my code:</p>

<pre><code>from nltk.classify.scikitlearn import SklearnClassifier
from sklearn.naive_bayes import BernoulliNB

BernoulliNB_classifier = SklearnClassifier(BernoulliNB())
</code></pre>

<p>Here's the error:</p>

<pre><code>Traceback (most recent call last):
File "&lt;input&gt;", line 1, in &lt;module&gt;
File "C:\Python34\lib\site-packages\nltk\classify\scikitlearn.py", line 69, in __init__
self._encoder = LabelEncoder()
NameError: name 'LabelEncoder' is not defined
</code></pre>

<p>When I look at the documentation that's exactly how it should be called (see <a href="http://www.nltk.org/api/nltk.classify.html" rel="noreferrer">http://www.nltk.org/api/nltk.classify.html</a>)</p>

<p>Plus, it works on Python 2.7.</p>

<p>NB: I tried with the multinomial naive bayes, the support vector machines and many other algos, it returns the same error.</p>