The wild page let you recast the names. Here a second model does it. The
French NER model locates every entity of the type you choose; then
CamemBERT
fill-mask β the same base architecture, the same language β masks each name in turn and
predicts a replacement that fits the context. Chain them and a sentence recasts itself, staying
grammatical because each model does one job well. Both run locally.
Regenerate the names
βMarie Curie opened her laboratory in Paris and discovered radium there.β
Step 1 β NER tags the sentence
Step 2 β fill-mask reimagines each chosen name
Result
NER backend βtotal latency βnames reimagined β
How the chain works
NER (French CamemBERT, token-classification) finds every entity span matching your chosen type, with exact character offsets.
For each span we build a copy of the sentence with that name replaced by [MASK].
Fill-mask (CamemBERT-base) predicts the most likely word for the mask in context; we take the top prediction that isn't the original name.
We stitch the predictions back in at the exact spans. Because fill-mask respects grammar and context, the sentence stays coherent β just recast.