LowercaseNormalizer#

class scikitplot.corpus.LowercaseNormalizer(locale_aware=False)[source]#

Convert the document text to lowercase.

Parameters:
locale_awarebool, optional

When True, use Python’s str.casefold() (more aggressive, handles German ß → ss etc.) instead of str.lower(). Default: False.

Parameters:

locale_aware (bool)

Examples

>>> norm = LowercaseNormalizer()
>>> doc = CorpusDocument.create("f.txt", 0, "Hello World.")
>>> norm.normalize_doc(doc).normalized_text
'hello world.'
normalize_doc(doc)[source]#

Lowercase the document text.

Parameters:
docCorpusDocument
Returns:
CorpusDocument
Parameters:

doc (CorpusDocument)

Return type:

CorpusDocument