Skip to content

Commit 09e78b5

Browse files
committed
Improve E024 text for incorrect GoldParse (closes explosion#3558)
1 parent 0c74506 commit 09e78b5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

spacy/errors.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,14 @@ class Errors(object):
141141
E023 = ("Error cleaning up beam: The same state occurred twice at "
142142
"memory address {addr} and position {i}.")
143143
E024 = ("Could not find an optimal move to supervise the parser. Usually, "
144-
"this means the GoldParse was not correct. For example, are all "
145-
"labels added to the model?")
144+
"this means that the model can't be updated in a way that's valid "
145+
"and satisfies the correct annotations specified in the GoldParse. "
146+
"For example, are all labels added to the model? If you're "
147+
"training a named entity recognizer, also make sure that none of "
148+
"your annotated entity spans have leading or trailing whitespace. "
149+
"You can also use the experimental `debug-data` command to "
150+
"validate your JSON-formatted training data. For details, run:\n"
151+
"python -m spacy debug-data --help")
146152
E025 = ("String is too long: {length} characters. Max is 2**30.")
147153
E026 = ("Error accessing token at position {i}: out of bounds in Doc of "
148154
"length {length}.")

0 commit comments

Comments
 (0)