is an option that specifies how the input should be preprocessed.


  • The rules given by PreprocessingRules are applied to each expression.
  • Typical settings are:
  • Automatican automatic choice of preprocessing
    Noneno preprocessing
    rulesexplicit set of preprocessing rules
  • Rules for PreprocessingRules can involve patterns.


open allclose all

Basic Examples  (2)

Preprocess a specific word:

Use a pattern to select and process input words:

Scope  (2)

Specify a default processing rule:

Without a default rule, automatic styling is used:

Compare with all default styles:

Applications  (3)

Spellcheck strings before displaying them:

Round real numbers to their closest integers:

Create a function that takes the first match in the dictionary given a word stem:

Use it to regularize the input of WordCloud:

Modify the function to only return verbs:

Properties & Relations  (2)

When the preprocessing splits the word into multiple words, weights are propagated to new words:

If a word matches more than one pattern, the first match is used:

Wolfram Research (2017), PreprocessingRules, Wolfram Language function,


Wolfram Research (2017), PreprocessingRules, Wolfram Language function,


Wolfram Language. 2017. "PreprocessingRules." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2017). PreprocessingRules. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_preprocessingrules, author="Wolfram Research", title="{PreprocessingRules}", year="2017", howpublished="\url{}", note=[Accessed: 18-May-2024 ]}


@online{reference.wolfram_2024_preprocessingrules, organization={Wolfram Research}, title={PreprocessingRules}, year={2017}, url={}, note=[Accessed: 18-May-2024 ]}