Skip to content

A function to interface with the Python flair.splitter module. This function provides access to various sentence splitting strategies implemented in the Flair library:

  • NoSentenceSplitter: Treats the entire text as a single sentence without splitting it.

  • SegtokSentenceSplitter: Uses the segtok library to split text into sentences.

  • SpacySentenceSplitter: Uses the spaCy library for sentence splitting.

  • TagSentenceSplitter: Assumes specific tags in the text to indicate sentence boundaries.

Usage

flair_splitter()

Value

A Python module (flair.splitter).

References

Python reference for SegtokSentenceSplitter:


from flair.splitter import *

Additional references for the other classes can be found within the Flair library documentation. Flair GitHub

Examples

if (FALSE) { # \dontrun{
SegtokSentenceSplitter <- flair_splitter$SegtokSentenceSplitter()
text <- "I am Taiwanese and come from Taiwan"
sentences <- splitter$split(text)
} # }