mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
* Fix lemmatizer for Python3
This commit is contained in:
parent
454bec86dc
commit
4e085d5166
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user