I am using NER from spacy. Its giving incorrect results for few words. Its trained on general dataset. How can I customize on my local data.

For example,

Person -  {'Mike Miller', 'Miller', 'Infantino', 'Gianni Infantino'}
Location -  {'England', 'UK', 'Europe', 'Telegraph'}

Here, "Telegraph" is incorrectly is assigned to location.


2 Answers 2


@Ravikm, excellent question. In Spacy, you can assign a word manually. For example, "Tesla" to ORG. Source: screenshot from Jose Portilla's NLP course on Udemy.

enter image description here


Unless you retrain the model that is used to generate the NER results, you cannot make it better.

However, what you could do is, if spacy provides probabilites for each of the tag, you could do some statistical modeling on top of it, however I would keep this as a secondary option.

  • $\begingroup$ I beg to differ regarding re-training your model. You can manually add / change words in Spacy. See my answer below. $\endgroup$ Jan 9, 2020 at 21:18
  • 1
    $\begingroup$ @FrancoSwiss - Even if you could add this manually, you still have to retrain the model for the next predictions to get better right? If not, then its a cool feature that I was not aware off. $\endgroup$
    – Nischal Hp
    Jan 10, 2020 at 17:08
  • $\begingroup$ indeed it's a cool feature. No, no need to retrain as the model knows that Tesla is an ORG. $\endgroup$ Jan 11, 2020 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.