Skip to content

Sentence Splitter

Split text into sentences with an abbreviation list you can see and extend, and length statistics for the chunks it produces.

Sentences
7

59 words · mean 8.4, median 4 words per sentence.

Words
59
Mean words per sentence
8.4
Median words per sentence
4
Longest sentence
25 words
Sentences over 40 words
0
Estimated tokens in the whole text
≈ 111
One sentence per line
What this assumes: this is a rule-based splitter, not a model. A boundary is a terminator (. ! ? … 。 ! ? ؟ ।) plus any closing quotes or brackets, followed by whitespace, where the preceding word is not in the abbreviation list and is not a lone capital letter. The built-in list holds 82 entries; yours are added to it. It gets these wrong: an abbreviation you did not list, an abbreviation that genuinely ends a sentence (“…at the U.K. Sentences after it…”), languages that do not capitalise sentence openings, decimal commas, and any text with no space after the full stop. Token counts are estimates. Estimated, not tokenized. A real count needs the model's vocabulary; the authoritative number is usage.prompt_tokens on the response.

Why sentence boundaries decide what your retrieval returns

A splitter is invisible infrastructure until it is wrong, and then it is wrong everywhere downstream at once. Chunking a corpus on sentence boundaries means every bad boundary becomes a chunk that starts mid-thought, and a chunk that starts mid-thought embeds badly, retrieves for the wrong queries and reads badly when it lands in a prompt. The usual failure is not exotic: it is “Dr.”, “e.g.” and “No.” in a corpus full of medical or legal text, splitting a thousand sentences in half.

The abbreviation list is on the page rather than buried in a library because that list is domain-specific and yours is not ours. Legal text wants art., exh., para., v.; scientific text wants et al., approx., ca., Fig.; a support corpus wants your product names. Add them, watch the sentence count drop, and keep the list with the corpus.

The length flag exists because over-long sentences are the other end of the same problem. A 90-word sentence usually means the splitter missed a boundary — or that the source has no punctuation at all, which is common in transcripts and chat logs. In that case no rule-based splitter will help and the line-break toggle is the honest fallback. The mean and median together tell you which case you are in: close together means a clean split, a mean far above the median means a handful of runaway sentences dragging it up.

Sentence Splitter · Multigrid