SimpleEnricherSpec#

class scikitplot.corpus.SimpleEnricherSpec(min_token_length=3, max_keywords=8, lowercase=True, token_pattern="[^\\W\\d_]+(?:['’][^\\W\\d_]+)*")[source]#

Declarative configuration for SimpleFrequencyEnricher.

Parameters:
min_token_lengthint, default=3

Minimum token length retained after tokenization.

max_keywordsint, default=8

Maximum number of frequency-ranked keywords stored per document.

lowercasebool, default=True

Lowercase text before tokenization.

token_patternstr, optional

Unicode-aware regular expression used to extract tokens.

Parameters:
  • min_token_length (int)

  • max_keywords (int)

  • lowercase (bool)

  • token_pattern (str)

Notes

The spec has no optional NLP dependencies and performs no resource lookup. It can be passed directly to FluentCorpus.enricher(...); runtime materialization converts it to SimpleFrequencyEnricher.

lowercase: bool = True#
max_keywords: int = 8#
min_token_length: int = 3#
token_pattern: str = "[^\\W\\d_]+(?:['’][^\\W\\d_]+)*"#