Sentence Extractor

class etk.extractors.sentence_extractor.SentenceExtractor(name: str = None, custom_nlp: type = None)[source]

Bases: etk.extractor.Extractor

Description
Extract individual sentences using lightweight spaCy module.

Example

sentence_extractor = SentenceExtractor(custom_nlp=nlp)
sentence_extractor.extract(text=text)
extract(text: str) → List[etk.extraction.Extraction][source]

Splits text by sentences.

Parameters:text (str) – Input text to be extracted.
Returns:the list of extraction or the empty list if there are no matches.
Return type:List[Extraction]