# Conversion of Dependency ner rel.manual jsonl data to spacy

**URL:** <https://support.prodi.gy/t/conversion-of-dependency-ner-rel-manual-jsonl-data-to-spacy/5557>\
**Category:** Uncategorized\
**Tags:** ner, relations\
**Created:** [April 21, 2022, 11:36am UTC](https://support.prodi.gy/t/conversion-of-dependency-ner-rel-manual-jsonl-data-to-spacy/5557 "2022-04-21T11:36:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfyasim](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/cfyasim/32/2922_2.png) [@cfyasim](https://support.prodi.gy/u/cfyasim)\
**Post date:** [April 21, 2022, 11:36am UTC](https://support.prodi.gy/t/conversion-of-dependency-ner-rel-manual-jsonl-data-to-spacy/5557/1 "2022-04-21T11:36:22Z")

</div>

i want to convert ner.manual data which i have exported in .jsonl to spacy.

---

<div class="post-metadata">

**Author:** ![koaning](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/koaning/32/230_2.png) [@koaning](https://support.prodi.gy/u/koaning)\
**Post date:** [April 21, 2022, 11:43am UTC](https://support.prodi.gy/t/conversion-of-dependency-ner-rel-manual-jsonl-data-to-spacy/5557/2 "2022-04-21T11:43:37Z")

</div>

Have you seen the [data-to-spacy](https://prodi.gy/docs/recipes#data-to-spacy) command?

Alternatively, you can also write your own script for this if you prefer to have manual control. Examples of those can be found in our [projects repository](https://github.com/explosion/projects/blob/v3/pipelines/ner_demo/scripts/convert.py).

For these custom scripts it helps to understand that under the hood, the binary `.spacy` file is a serialized `DocBin` , which you can always load back as spaCy `Doc` objects: [https://spacy.io/api/docbin](https://spacy.io/api/docbin). This gives you access to the annotations, like `doc.ents`.

---

<div class="post-metadata">

**Author:** ![cfyasim](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/cfyasim/32/2922_2.png) [@cfyasim](https://support.prodi.gy/u/cfyasim)\
**Post date:** [April 22, 2022, 4:26am UTC](https://support.prodi.gy/t/conversion-of-dependency-ner-rel-manual-jsonl-data-to-spacy/5557/3 "2022-04-22T04:26:15Z")

</div>

Hi @koaning Thanks for the reply but still i am getting to many value to unpack.,  
sorry i created this data using rel.manual.Here is my jsonl sample data`{"text":"atlas life sciences: Asahi Songwon Acquires Atlas Life Sciences","_input_hash":-1763413830,"_task_hash":1815288719,"_is_binary":false,"tokens":[{"text":"atlas","start":0,"end":5,"id":0,"ws":true,"disabled":false},{"text":"life","start":6,"end":10,"id":1,"ws":true,"disabled":false},{"text":"sciences","start":11,"end":19,"id":2,"ws":false,"disabled":false},{"text":":","start":19,"end":20,"id":3,"ws":true,"disabled":false},{"text":"Asahi","start":21,"end":26,"id":4,"ws":true,"disabled":false},{"text":"Songwon","start":27,"end":34,"id":5,"ws":true,"disabled":false},{"text":"Acquires","start":35,"end":43,"id":6,"ws":true,"disabled":false},{"text":"Atlas","start":44,"end":49,"id":7,"ws":true,"disabled":false},{"text":"Life","start":50,"end":54,"id":8,"ws":true,"disabled":false},{"text":"Sciences","start":55,"end":63,"id":9,"ws":false,"disabled":false}],"_view_id":"relations","spans":[{"text":"Asahi Songwon","start":21,"token_start":4,"token_end":5,"end":34,"type":"span","label":"ORG"},{"text":"Atlas Life Sciences","start":44,"token_start":7,"token_end":9,"end":63,"type":"span","label":"ORG"}],"answer":"accept","_timestamp":1650352513,"relations":[{"head":5,"child":9,"head_span":{"start":21,"end":34,"token_start":4,"token_end":5,"label":"ORG"},"child_span":{"start":44,"end":63,"token_start":7,"token_end":9,"label":"ORG"},"color":"#c5bdf4","label":"Aquisition"}]}`

Please help me in converting this data to spacy format.

---

<div class="post-metadata">

**Author:** ![koaning](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/koaning/32/230_2.png) [@koaning](https://support.prodi.gy/u/koaning)\
**Post date:** [April 22, 2022, 7:24am UTC](https://support.prodi.gy/t/conversion-of-dependency-ner-rel-manual-jsonl-data-to-spacy/5557/4 "2022-04-22T07:24:45Z")

</div>

Just to clarify, are you interested in doing named entity recognition or another task?

Also, could you describe the steps that you have taken, what you expected, and what happened instead? It'll be easier for me to understand what's going wrong with that information.
