Sentence splitting
Sentence Boundary Detection
Finding sentence boundaries in a text from punctuation marks, with rules that prevent wrong splits at abbreviations and decimal numbers.
How it works
The marks . ! ? ؟ ؛ … are candidate sentence ends, then the cases that do not end a sentence are excluded: a period after a known abbreviation (د., Dr.), between two digits (3.14), or after a single Latin letter (J.). Statistical methods such as Punkt learn abbreviations from the text without supervision.
Steps
- Find the candidate end marks
- Exclude abbreviations and decimal numbers
- Attach following quotation marks and brackets to the sentence
- Split at a blank line
Example
«قال د. علي إن النسبة 3.5%. ما رأيك؟» → two sentences, with no split after «د.» or inside 3.5
Strengths
- Simple and fast
- Good enough for well-edited text
Cons
- Fails on unpunctuated text (social media)
- Unknown abbreviations cause wrong splits
Uses
- Extractive summarization
- Sentiment analysis per sentence
- Machine translation
Libraries that implement it
See Libraries guide For licenses and runtime requirements.
References
- Kiss, T. & Strunk, J. (2006). Unsupervised Multilingual Sentence Boundary Detection. Computational Linguistics, 32(4), 485–525.
