Problems converting Doc object to/from json #13397
-
I'm having problems converting The docstring for Perhaps I'm using the methods wrongly, but I'm not sure how. TIA How to reproduce the behaviourPython 3.11.4 (v3.11.4:d2340ef257, Jun 6 2023, 19:15:51) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Your EnvironmentInfo about spaCy
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So this error message is confusing/misleading, because there's really just one thing you'd need to change in your code for this to work, and that is to call
and then your snippet should work. Or, similarly, look at the example from the docs:
|
Beta Was this translation helpful? Give feedback.
So this error message is confusing/misleading, because there's really just one thing you'd need to change in your code for this to work, and that is to call
from_json
on aDoc
object instead of on the class directly:and then your snippet should work. Or, similarly, look at the example from the docs: