PreprocessingRules

PreprocessingRules

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

Details

  • 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.

Examples

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:

Introduced in 2017
 (11.2)