SpacePunctuationStrategy#
- class scikitplot.corpus.SpacePunctuationStrategy[source]#
Whitespace-and-punctuation segmentation for space-delimited scripts.
Covers: Latin, Cyrillic, Greek, Armenian, Georgian, Ethiopic, and any other script where words are delimited by Unicode whitespace.
Sentence-boundary splitting is delegated to
SentenceChunker(REGEX backend) whenconfig.unit == "sentence".- Parameters:
- (none)
- segment(span, config)[source]#
Segment span by whitespace (words) or sentence boundary (sentences).
- Parameters:
- spanScriptSpan
Script span to segment.
- configWritingSystemAdapterConfig
Adapter configuration.
- Returns:
- list[Chunk]
Non-empty list of word or sentence chunks.
- Parameters:
span (ScriptSpan)
config (WritingSystemAdapterConfig)
- Return type: