Sentence boundary disambiguation
Sentence boundary disambiguation (SBD), also known as sentence breaking, is the problem in natural language processing of deciding where sentences begin and end. Often natural language processing tools require their input to be divided into sentences for a number of reasons. However sentence boundary identification is challenging because punctuation marks are often ambiguous. For example, a period may denote an abbreviation, decimal point, an ellipsis, or an email address - not the end of a sentence. About 47% of the periods in the Wall Street Journal corpus denote abbreviations. As well, question marks and exclamation marks may appear in embedded quotations, emoticons, computer code, and slang.
Languages like Japanese and Chinese have unambiguous sentence-ending markers.
The standard 'vanilla' approach to locate the end of a sentence:
- (a) If it's a period, it ends a sentence.
- (b) If the preceding token is on my hand-compiled list of abbreviations, then it doesn't end a sentence.
- (c) If the next token is capitalized, then it ends a sentence.
This strategy gets about 95% of sentences correct.
Another approach is to automatically learn a set of rules from a set of documents where the sentence breaks are pre-marked. Solutions have been based on a maximum entropy model. The SATZ architecture uses a neural network to disambiguate sentence boundaries and achieves 98.5% accuracy.
Perl compatible regular expression ("pcre")
$sentences=preg_split("/(?<!\..)([\?\!\.]+)\s(?!.\.)/",$text,-1, PREG_SPLIT_DELIM_CAPTURE); //(for php)
Online use, libraries, and api
- sent_detector - Java
- answerbus.com/sentence/ - cgi
- Lingua-EN-Sentence - perl
- Sentence.pm -perl
- SATZ - An Adaptive Sentence Segmentation System -by David D. Palmer - C
Toolkits that include sentence detection
- Apache OpenNLP - 
- Freeling (software) - 
- Natural Language Toolkit - 
- Stanford NLP - 
- GExp - 
- E. STAMATATOS, N. FAKOTAKIS, AND G. KOKKINAKIS. "1 AUTOMATIC EXTRACTION OF RULES FOR SENTENCE BOUNDARY DISAMBIGUATION". University of Patras. Retrieved 2009-01-03.
- "Doing Things with Words, Part Two: Sentence Boundary Detection". Retrieved 2009-01-03.
- "A Maximum Entropy Approach to Identifying Sentence Boundaries". Retrieved 2009-01-03.