* Fix lemmatizer for Python3

This commit is contained in:
Matthew Honnibal 2015-01-05 05:51:26 +11:00
parent 454bec86dc
commit 4e085d5166

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from os import path
@ -53,7 +54,7 @@ class Lemmatizer(object):
elif pos == self.adj_id:
return self.adj(string)
else:
raise StandardError("Cannot lemmatize with unknown pos: %s" % pos)
raise Exception("Cannot lemmatize with unknown pos: %s" % pos)
def noun(self, string):
return lemmatize(string, self.index['noun'], self.exc['noun'], NOUN_RULES)