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:

Wolfram Research (2017), PreprocessingRules, Wolfram Language function, https://reference.wolfram.com/language/ref/PreprocessingRules.html.

Text

Wolfram Research (2017), PreprocessingRules, Wolfram Language function, https://reference.wolfram.com/language/ref/PreprocessingRules.html.

CMS

Wolfram Language. 2017. "PreprocessingRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PreprocessingRules.html.

APA

Wolfram Language. (2017). PreprocessingRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PreprocessingRules.html

BibTeX

@misc{reference.wolfram_2023_preprocessingrules, author="Wolfram Research", title="{PreprocessingRules}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/PreprocessingRules.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_preprocessingrules, organization={Wolfram Research}, title={PreprocessingRules}, year={2017}, url={https://reference.wolfram.com/language/ref/PreprocessingRules.html}, note=[Accessed: 19-April-2024 ]}