Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Text mining›Text Infilling — Cloze Completion
Process / pipeline

Text Infilling — Cloze Completion

Text Infilling (Cloze Completion) · Also known as: cloze procedure, cloze test, masked language modeling, span infilling, Metin Doldurma (Text Infilling / Cloze)

Text infilling is a natural-language-processing task that completes missing words, phrases, or spans in a document by exploiting the surrounding context. Introduced as the cloze procedure by Wilson L. Taylor in 1953 as a readability measure, it was reformulated for neural models by Zhu et al. (2019) and is now used for data augmentation, writing assistance, and language-model evaluation.

ScholarGate
  1. Process / pipeline
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Text Infilling
BERT EmbeddingsNamed Entity RecognitionSentiment AnalysisText Classification

When to use it

Text infilling is appropriate when you have text data with explicit gaps or when you need to synthesise plausible continuations inside an existing passage. It is well suited to data augmentation (generating varied training examples), automated writing assistance (suggesting missing content), cloze-style readability tests, and diagnosing language model quality. The method requires a pretrained language model; a large model is preferred for span-level tasks. The source text must define mask or blank positions clearly, and at least ten text examples should be available to produce meaningful evaluation results.

Strengths & limitations

Strengths
  • Leverages bidirectional context — unlike left-to-right generation, the model sees both sides of a gap and produces more coherent fills.
  • Flexible task scope: a single masked token up to entire missing paragraphs can be predicted within the same framework.
  • Dual utility as both a downstream application (writing assistance, data augmentation) and a diagnostic probe for evaluating language model quality.
Limitations
  • A large pretrained language model is preferred; without one, prediction quality degrades substantially.
  • Span-level infilling can produce fluent but factually incorrect completions, especially when world knowledge is required.
  • The method requires mask positions to be defined in advance; it cannot discover what is missing from a text autonomously.

Frequently asked

What is the difference between text infilling and text generation?

Text generation predicts what comes after a prefix (left-to-right). Text infilling predicts content that fits inside an existing passage, using both the left and right surrounding context. This bilateral constraint makes infilling harder but produces more coherent results when the surrounding text is fixed.

Can I use BERT for span infilling?

BERT predicts one masked token at a time and is designed for single-token cloze tasks. For filling spans of multiple tokens, use a sequence-to-sequence model such as T5 or BART, which can generate variable-length outputs conditioned on the full passage.

How do I evaluate the quality of infilled text?

For single-token fills, accuracy at rank-1 against a reference token is the standard metric. For spans, BLEU and ROUGE compare the predicted fill to a reference, while perplexity measures fluency under a separate language model. Because multiple valid fills often exist, human fluency and coherence judgments are a valuable complement to automated scores.

Does text infilling require labelled data?

For application to new text, no labelled data is needed — only a pretrained language model and a source text with defined mask positions. Labelled data (texts with known correct fills) is needed only for evaluation or for fine-tuning a model on a specific domain.

Sources

  1. Taylor, W.L. (1953). Cloze Procedure: A New Tool for Measuring Readability. Journalism Quarterly, 30(4), 415-433. link ↗
  2. Zhu, C., Zeng, M., & Huang, X. (2019). Text Infilling. arXiv:1901.00158. link ↗

How to cite this page

ScholarGate. (2026, June 1). Text Infilling (Cloze Completion). ScholarGate. https://scholargate.app/en/text-mining/text-infilling

Related methods

BERT EmbeddingsNamed Entity RecognitionSentiment AnalysisText Classification

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • BERT EmbeddingsText mining↔ compare
  • Named Entity RecognitionText mining↔ compare
  • Sentiment AnalysisText mining↔ compare
  • Text ClassificationText mining↔ compare
Compare side by side →

Similar methods

Lexical SubstitutionQuestion AnsweringNatural Language GenerationFine-Tuned Question AnsweringSlot FillingSelf-supervised Question AnsweringSelf-supervised BERT-based classificationZero-Shot Classification

Related reference concepts

Language ModelingInformation ExtractionNeural Language Models and Word EmbeddingsQuestion Answering and Dialogue SystemsNatural Language ProcessingMachine Translation

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Text Infilling (Text Infilling (Cloze Completion)). Retrieved 2026-07-21 from https://scholargate.app/en/text-mining/text-infilling · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Wilson L. Taylor (cloze procedure, 1953); modern span infilling by Zhu et al. (2019)
Year
1953 (cloze); 2019 (neural span infilling)
Type
NLP conditional text generation task
Input
Text with one or more masked tokens, spans, or blanks
Output
Predicted text filling each masked position
MinSample
10
RequiresNormality
No
Difficulty
2
Related methods
BERT EmbeddingsNamed Entity RecognitionSentiment AnalysisText Classification
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account