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:
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 toSimpleFrequencyEnricher.
Gallery examples#
Build and Search a Real Hamlet Corpus with FluentCorpus
Build and Search a Real Hamlet Corpus with FluentCorpus