-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Doc.to_json() method fails when called on doc generated via Span.as_doc()
#3962
Comments
Yep, I can replicate this bug with |
@JohnStuartRutledge : I think we can fix this, cf. #3969. Basically what happens in your example, is that the second word |
* failing unit test for issue 3962 * attempt to fix Issue #3962 * create artificial unit test example * using length instead of self.length * sp * reformat with black * find better ancestor within span and use generic 'dep' * attach to span.root if there is no appropriate ancestor * comment span text * clean up ancestor code * reconstruct dep tree to keep same number of sentences
* failing unit test for issue 3962 * attempt to fix Issue explosion#3962 * create artificial unit test example * using length instead of self.length * sp * reformat with black * find better ancestor within span and use generic 'dep' * attach to span.root if there is no appropriate ancestor * comment span text * clean up ancestor code * reconstruct dep tree to keep same number of sentences
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
How to reproduce the behaviour
It would appear that calling
to_json()
on a Doc that was created via theas_doc()
method is prone to failure. This may very well be connected to other issues with withas_doc
like the that mentioned in issue #3669The above error seems to trigger when second token of the span (
jests
), calls spacy.tokens.Token.head.__get__() and hits theself.c.head
Environment
The text was updated successfully, but these errors were encountered: