text-to-sentences
ai-research-agent / tokenize/text-to-sentences
Topics
splitSentences()
function splitSentences(inputText, options?): string[]
Splits text into sentences, handling 220+ common abbreviations, and infering acronyms, numbers, URLs, times, names, etc.
Parameters
Parameter | Type | Description |
---|---|---|
|
| The text to be split into sentences. |
| { | |
|
| default=600 - Maximum size for a sentence. |
|
| default=20 - Minimum size for a sentence. |
|
| default=true - Split on HTML tags like P, DIV, UL, OL. |
Returns
string
[]
An array of sentences.