# Adding Custom Features to Train a NER spaCy Model

**URL:** <https://support.prodi.gy/t/adding-custom-features-to-train-a-ner-spacy-model/3891>\
**Category:** Uncategorized\
**Tags:** ner, spacy\
**Created:** [February 15, 2021, 5:22am UTC](https://support.prodi.gy/t/adding-custom-features-to-train-a-ner-spacy-model/3891 "2021-02-15T05:22:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TanjirouNezuko](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/tanjirounezuko/32/1937_2.png) [@TanjirouNezuko](https://support.prodi.gy/u/TanjirouNezuko)\
**Post date:** [February 15, 2021, 5:22am UTC](https://support.prodi.gy/t/adding-custom-features-to-train-a-ner-spacy-model/3891/1 "2021-02-15T05:22:08Z")

</div>

Hi!

I have been training a NER model with the spaCy and the results are pretty good 😄 So I really enjoy doing NLP with spaCy.

While I was thinking how to further improve the NER model's accuracy, I wanted to ask if I can add some custom features in the training data.

For instance, I am working on a Merchant Name Recognition task. Currently, by following the documentation, the input data looks like:

[('Amazon co ca', {'entities': [(0, 6, 'BRD')]}),  
...  
('AMZNMKTPLACE AMAZON CO', {'entities': [(13, 19, 'BRD')]})]

However, it would also be very helpful if the model can take more informative features such as country, transaction amount for the merchant recognition. So far, I didn't see any articles that add any custom features in the training data. Therefore, I wanted to submit this post and see if it's feasible to do so?

Thanks  
Cheng

---

<div class="post-metadata">

**Author:** ![honnibal](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/honnibal/32/35_2.png) [@honnibal](https://support.prodi.gy/u/honnibal)\
**Post date:** [February 16, 2021, 6:28am UTC](https://support.prodi.gy/t/adding-custom-features-to-train-a-ner-spacy-model/3891/2 "2021-02-16T06:28:12Z")

</div>

Hi @TanjirouNezuko ,

This is a very reasonable request, but unfortunately there's no good solution for spaCy v2, which is used by the current version of Prodigy. spaCy v3 does open up possibilities for this, but we haven't done experiments for it or done a guide yet. It's definitely on our list though!
