# Custom DistilBERT NER - Entity recognition issues for entities with spaces

**URL:** <https://discuss.huggingface.co/t/custom-distilbert-ner-entity-recognition-issues-for-entities-with-spaces/16270>\
**Category:** Beginners\
**Created:** [March 30, 2022, 5:38pm UTC](https://discuss.huggingface.co/t/custom-distilbert-ner-entity-recognition-issues-for-entities-with-spaces/16270 "2022-03-30T17:38:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharadwajswarna](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@bharadwajswarna](https://discuss.huggingface.co/u/bharadwajswarna)\
**Post date:** [March 30, 2022, 5:38pm UTC](https://discuss.huggingface.co/t/custom-distilbert-ner-entity-recognition-issues-for-entities-with-spaces/16270/1 "2022-03-30T17:38:35Z")

</div>

I have custom trained a distilBERT NER model for skill extraction from Job Descriptions.

The model works decently for a single word entities, but fails when there are two words in an entity.

**For example:**  
testcase\_1 = “The candidate needs to be good at python and machine learning”  
In this, the model extracts two entities → 1. python 2. machine

testcase\_2 = “The candidate needs to be good at python and machinelearning”  
In this case, the model extracts → 1.python 2.machinelearning

How do I deal with this issue ? My train data has examples of “machine learning” i.e., with the space.

Also, I have tried various aggregation strategies(simple/first/average/max) and the results are same.

Thanks !
