mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 21:24:11 +03:00
Fix error on ParserStateError
This commit is contained in:
parent
ba5e048502
commit
6bf505e865
|
@ -304,14 +304,13 @@ cdef class StepwiseState:
|
||||||
|
|
||||||
|
|
||||||
class ParserStateError(ValueError):
|
class ParserStateError(ValueError):
|
||||||
def __repr__(self):
|
def __init__(self, doc):
|
||||||
raise ValueError(
|
self.message = ("Error analysing doc -- no valid actions available. This should "
|
||||||
"Error analysing doc -- no valid actions available. This should "
|
"never happen, so please report the error on the issue tracker. "
|
||||||
"never happen, so please report the error on the issue tracker. "
|
"Here's the thread to do so --- reopen it if it's closed:\n"
|
||||||
"Here's the thread to do so --- reopen it if it's closed:\n"
|
"https://github.com/spacy-io/spaCy/issues/429\n"
|
||||||
"https://github.com/spacy-io/spaCy/issues/429\n"
|
"Please include the text that the parser failed on, which is:\n"
|
||||||
"Please include the text that the parser failed on, which is:\n"
|
"%s" % repr(doc.text))
|
||||||
"%s" % repr(self.args[0].text))
|
|
||||||
|
|
||||||
|
|
||||||
cdef int _arg_max_clas(const weight_t* scores, int move, const Transition* actions,
|
cdef int _arg_max_clas(const weight_t* scores, int move, const Transition* actions,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user