mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-12 17:22:25 +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
|
from os import path
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ class Lemmatizer(object):
|
||||||
elif pos == self.adj_id:
|
elif pos == self.adj_id:
|
||||||
return self.adj(string)
|
return self.adj(string)
|
||||||
else:
|
else:
|
||||||
raise StandardError("Cannot lemmatize with unknown pos: %s" % pos)
|
raise Exception("Cannot lemmatize with unknown pos: %s" % pos)
|
||||||
|
|
||||||
def noun(self, string):
|
def noun(self, string):
|
||||||
return lemmatize(string, self.index['noun'], self.exc['noun'], NOUN_RULES)
|
return lemmatize(string, self.index['noun'], self.exc['noun'], NOUN_RULES)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user