mirror of https://github.com/explosion/spaCy.git
* Merge vocab changes
This commit is contained in:
parent
72abbb43fb
commit
6ed3aedf79
|
@ -135,7 +135,7 @@ cdef class Vocab:
|
||||||
if lex != NULL:
|
if lex != NULL:
|
||||||
if lex.orth != self.strings[string]:
|
if lex.orth != self.strings[string]:
|
||||||
raise LookupError.mismatched_strings(
|
raise LookupError.mismatched_strings(
|
||||||
lex.orth, self.strings[lex.orth], string)
|
lex.orth, self.strings[string], self.strings[lex.orth], string)
|
||||||
return lex
|
return lex
|
||||||
else:
|
else:
|
||||||
return self._new_lexeme(mem, string)
|
return self._new_lexeme(mem, string)
|
||||||
|
@ -443,7 +443,7 @@ class LookupError(Exception):
|
||||||
"Query string: {query}\n"
|
"Query string: {query}\n"
|
||||||
"Orth cached: {orth_str}\n"
|
"Orth cached: {orth_str}\n"
|
||||||
"ID of orth: {orth_id}".format(
|
"ID of orth: {orth_id}".format(
|
||||||
query=original_string, orth_str=id_string, orth_id=id_)
|
query=repr(original_string), orth_str=repr(id_string), orth_id=id_)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue