Import data from Doccano json for custom Relation Extraction problem #12936
-
Hi I want to import the Entities and Relations data from doccano which is of the following format: { Please guide on how to convert it to spacy format and use it for custom ner and relation extraction. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, In spaCy terminology, you want to store these annotations on a
You can add these With respect to relation extraction - there is currently no builtin functionality in spaCy for this, but you can look at the example project we have compiled, that uses a custom data format. There is also a generic script for converting Prodigy annotations to the spaCy format, that you can use as inspiration. The video explains it in more detail. |
Beta Was this translation helpful? Give feedback.
Hi,
In spaCy terminology, you want to store these annotations on a
Doc
object. You can create aDoc
by specifying thewords
andspaces
in your text, ensuring your tokenization will correspond to the gold annotations you've created. In the constructor, you can also setents
, which would look something like this, using the IOB scheme: