Sentence Splitter

class vnlp.sentence_splitter.sentence_splitter.SentenceSplitter[source]

This is a rule based sentence splitter adapted from Philipp Koehn and Josh Schroeder’s project.

The code is reduced and simplifed for Turkish language.

Abbreviations lexicon is expanded.

split_sentences(text: str) List[str][source]

Given a string of sentences, returns list of strings, where each string in the list is a sentence.

Parameters

text – Input sentences.

Returns

List of splitted sentences.

Example:

from vnlp import SentenceSplitter
sentence_splitter = SentenceSplitter()
sentence_splitter.split_sentences('Av. Meryem Beşer, 3.5 yıldır süren dava ile ilgili dedi ki, "Duruşma bitti, dava lehimize sonuçlandı." Bu harika bir haber.')

['Av. Meryem beşer, 3.5 yıldır süren dava ile ilgili dedi ki, "Duruşma bitti, dava lehimize sonuçlandı."',
'Bu harika bir haber.']