mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
* Fix error msg
This commit is contained in:
parent
7f87716cf7
commit
d4a493855e
|
@ -102,7 +102,7 @@ cdef class Vocab:
|
||||||
slice_unicode(&c_str, id_or_string, 0, len(id_or_string))
|
slice_unicode(&c_str, id_or_string, 0, len(id_or_string))
|
||||||
lexeme = self.get(self.mem, &c_str)
|
lexeme = self.get(self.mem, &c_str)
|
||||||
else:
|
else:
|
||||||
raise ValueError("Vocab unable to map type: %s. Maps unicode --> int or int --> unicode" % str(type(id_or_string)))
|
raise ValueError("Vocab unable to map type: %s. Maps unicode --> Lexeme or int --> Lexeme" % str(type(id_or_string)))
|
||||||
return Lexeme.from_ptr(lexeme, self.strings)
|
return Lexeme.from_ptr(lexeme, self.strings)
|
||||||
|
|
||||||
def __setitem__(self, unicode py_str, dict props):
|
def __setitem__(self, unicode py_str, dict props):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user