Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more info in cycle error message E069 #4123

Merged

Conversation

adrianeboyd
Copy link
Contributor

Description

Provide the tokens in the cycle and the first 50 tokens from document in the error message so it's easier to track down the location of the cycle in the data.

Addresses feature request in #3698.

The error message now looks like this:

ValueError: [E069] Invalid gold-standard parse tree. Found cycle between word 
IDs: {0, 1} (tokens: 'In'  'the') in the document starting with tokens: In the 
summer of 2005 , a picture that people have long been looking forward to started 
emerging with frequency in various major Hong Kong media . With their unique charm 
, these well - known cartoon images once again caused Hong Kong to be a focus 
of worldwide attention.

The document ID could be added to GoldParse at some point, but with the current training format you really need a non-existent paragraph ID, so I think this simpler solution should provide enough information for users to track down cycles in typical training data.

Types of change

Enhancement.

Checklist

  • I have submitted the spaCy Contributor Agreement.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

Provide the tokens in the cycle and the first 50 tokens from document in
the error message so it's easier to track down the location of the cycle
in the data.

Addresses feature request in explosion#3698.
@ines ines added enhancement Feature requests and improvements feat / ux Feature: User experience, error messages etc. labels Aug 15, 2019
@honnibal honnibal merged commit 2f9b28c into explosion:master Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and improvements feat / ux Feature: User experience, error messages etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants