flair.splitter.SpacySentenceSplitter#
- class flair.splitter.SpacySentenceSplitter(model, tokenizer=None)View on GitHub#
Bases:
SentenceSplitterSentence Splitter using Spacy.
Implementation of
SentenceSplitter, using models from Spacy.- Parameters:
model (
Union[Any,str]) – Spacy V2 model or the name of the model to load.tokenizer (
Optional[Tokenizer]) – Custom tokenizer to use (defaultSpacyTokenizer)
- __init__(model, tokenizer=None)View on GitHub#
Methods
__init__(model[, tokenizer])split(text[, link_sentences])Takes as input a text as a plain string and outputs a list of
flair.data.Sentenceobjects.Attributes
A string identifier of the sentence splitter.
The
flair.tokenization.Tokenizerclass used to tokenize sentences after they are split.- property tokenizer: Tokenizer#
The
flair.tokenization.Tokenizerclass used to tokenize sentences after they are split.
- property name: str#
A string identifier of the sentence splitter.