# Feature Request: choosing key for spancat labels in data-to-spacy

**URL:** <https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457>\
**Category:** Uncategorized\
**Tags:** enhancement, spancat\
**Created:** [March 28, 2023, 2:48pm UTC](https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457 "2023-03-28T14:48:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![b2m](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/b2m/32/3522_2.png) [@b2m](https://support.prodi.gy/u/b2m)\
**Post date:** [March 28, 2023, 2:48pm UTC](https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457/1 "2023-03-28T14:48:37Z")

</div>

This feature request originated in [Using multiple SpanCat models in one pipeline · explosion/spaCy · Discussion #12462 · GitHub](https://github.com/explosion/spaCy/discussions/12462)

When generating training data for SpanCat models with a custom key using `prodigy data-to-spacy` you have to manually move the data from the default `sc` key to the models custom key.

It would be easier if you could somehow configure the target key in the `data-to-spacy` command.

Okay it would be awesome if the target key could be read from the configuration, but this is a bit far fetched at the moment =)

On the other hand: how could you use such a model in recipes like `span.correct`?

---

<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:** [March 29, 2023, 12:05pm UTC](https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457/3 "2023-03-29T12:05:15Z")

</div>

Hi Benjamin.

Interesting use-case you have there!

I'll need to pick this up as a discussion with other team members and get back to you on this. I want to be careful in introducing new arguments to `data-to-spacy` because it might get unwieldy to support many of these settings. There are many models that we support in that command, and we might need to allow for _many_ extra settings if we go down this route.

That said, I am wondering if there are other things we might be able to do to make this easier, because your use-case certainly seems fair.

Will report back later this week!

---

<div class="post-metadata">

**Author:** ![b2m](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/b2m/32/3522_2.png) [@b2m](https://support.prodi.gy/u/b2m)\
**Post date:** [March 29, 2023, 12:49pm UTC](https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457/4 "2023-03-29T12:49:10Z")

</div>

Hi Vincent,

yes I understand.... another road to take would be to make it configurable whether SpanCat models will overwrite or just extend the spans under `doc.spans["sc"]` (which basically was the original problem).

But this again might introduce other problems.

As my use case might be an edge case, a workaround as discussed in the linked GitHub discussion is okay for me.

Looking forward to your reply.

---

<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:** [March 31, 2023, 2:00pm UTC](https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457/5 "2023-03-31T14:00:38Z")

</div>

We _just_ had a discussion on this topic and the consensus is that it makes sense to keep the current `data-to-spacy` recipe simple and to not add extra arguments. However, this is certainly something we might want to revisit in Prodigy v2. There's certainly a window of opportunity to leverage a config system more for this sort of thing that might allow users like yourself to really customise specific parts of the recipes.

Can't make any promises on what will eventually will get implemented, but I can confirm we're eager to revisit this once it's time for v2!

---

<div class="post-metadata">

**Author:** ![b2m](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/b2m/32/3522_2.png) [@b2m](https://support.prodi.gy/u/b2m)\
**Post date:** [April 3, 2023, 5:50am UTC](https://support.prodi.gy/t/feature-request-choosing-key-for-spancat-labels-in-data-to-spacy/6457/6 "2023-04-03T05:50:24Z")

</div>

Sounds like a promising long-term strategy!

And in the meantime there are the workarounds in the linked GitHub discussion above 👍
