normalize_text#
- scikitplot.corpus.normalize_text(text, *, config=None)[source]#
Normalise text according to config.
- Parameters:
- textstr
Raw text to normalise.
- configNormalizerConfig or None, optional
Configuration.
Noneuses defaults.
- Returns:
- str or None
Normalised text, or
Noneif the result is shorter thanconfig.min_length.
- Parameters:
text (str)
config (NormalizerConfig | None)
- Return type:
str | None
Examples
>>> normalize_text("The first compu-\\nter was huge.") 'The first computer was huge.'