# Creating masked sentences

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-masked-sentences%2F15184%3E%5C
**Category:** 🤗Datasets\
**Created:** [February 27, 2022, 10:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-masked-sentences%2F15184 "2022-02-27T22:10:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssam9](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@ssam9](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fssam9)%5C
**Post date:** [February 27, 2022, 10:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-masked-sentences%2F15184%2F1 "2022-02-27T22:10:07Z")

</div>

Hi,

I am retraining Roberta and want to evaluate the MLM accuracy to check the difference before retraining and after retraining. I know that we can use a data collator during retraining for generating masked input.

But for evaulating, if I have a selected set of 100 sentences, how can I generate a masked version of these sentences?

For example, if the sentence was: This movie was very interesting to watch  
I want to have a sentence that looks like this: This movie was very ###### to watch.

How to do this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![lhoestq](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lhoestq/32/64813_2.png) [@lhoestq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flhoestq)%5C
**Post date:** [March 2, 2022, 10:44am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-masked-sentences%2F15184%2F2 "2022-03-02T10:44:12Z")

</div>

Hi ! You can use the data collator for evaluation as well
