flair.splitter.TagSentenceSplitter#
- class flair.splitter.TagSentenceSplitter(tag, tokenizer=<flair.tokenization.SegtokTokenizer object>)View on GitHub#
Bases:
SentenceSplitter
SentenceSplitter which assumes that there is a tag within the text that is used to mark sentence boundaries.
Implementation of
SentenceSplitter
which assumes that there is a special tag within the text that is used to mark sentence boundaries.- __init__(tag, tokenizer=<flair.tokenization.SegtokTokenizer object>)View on GitHub#
Methods
__init__
(tag[, tokenizer])split
(text[, link_sentences])Takes as input a text as a plain string and outputs a list of
flair.data.Sentence
objects.Attributes
A string identifier of the sentence splitter.
The
flair.tokenization.Tokenizer
class used to tokenize sentences after they are split.- property tokenizer: Tokenizer#
The
flair.tokenization.Tokenizer
class used to tokenize sentences after they are split.
- property name: str#
A string identifier of the sentence splitter.