FunctionsTokenize
Text To Sentences
ai-research-agent / tokenize/text-to-sentences
Topics
splitSentences()
function splitSentences(inputText: string, options?: object): string[];Defined in: src/tokenize/text-to-sentences.js:14
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.