From 09e78b52cfb8f3b8b3216a2c2b8d98e429b5512f Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sat, 1 Jun 2019 14:37:27 +0200 Subject: [PATCH] Improve E024 text for incorrect GoldParse (closes #3558) --- spacy/errors.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spacy/errors.py b/spacy/errors.py index f1d42adae..3a1e05e05 100644 --- a/spacy/errors.py +++ b/spacy/errors.py @@ -141,8 +141,14 @@ class Errors(object): E023 = ("Error cleaning up beam: The same state occurred twice at " "memory address {addr} and position {i}.") E024 = ("Could not find an optimal move to supervise the parser. Usually, " - "this means the GoldParse was not correct. For example, are all " - "labels added to the model?") + "this means that the model can't be updated in a way that's valid " + "and satisfies the correct annotations specified in the GoldParse. " + "For example, are all labels added to the model? If you're " + "training a named entity recognizer, also make sure that none of " + "your annotated entity spans have leading or trailing whitespace. " + "You can also use the experimental `debug-data` command to " + "validate your JSON-formatted training data. For details, run:\n" + "python -m spacy debug-data --help") E025 = ("String is too long: {length} characters. Max is 2**30.") E026 = ("Error accessing token at position {i}: out of bounds in Doc of " "length {length}.")