# Masked language modelling with specific entities or POS

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmasked-language-modelling-with-specific-entities-or-pos%2F8553%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 21, 2021, 2:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmasked-language-modelling-with-specific-entities-or-pos%2F8553 "2021-07-21T14:46:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benj](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@benj](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbenj)%5C
**Post date:** [July 21, 2021, 2:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmasked-language-modelling-with-specific-entities-or-pos%2F8553%2F1 "2021-07-21T14:46:17Z")

</div>

For a MLM task say with this input _“There are 42 `[MASK]` in `[MASK]`?”_. Is it possible to constrain the predicted `[MASK]` token to be a specific entity or POS? For example the second `[MASK]` token i would like the prediction to be a company name only so it may output something like:

1. “There are **42** employees in **Microsoft**?”
2. “There are **42** developers in **Microsoft**?”
3. “There are **42** employees in **Apple**?”  
… etc
