Open Editor
Utility
6 min read

How Sentences Are Counted, and Why Word Counters Disagree

Counting words is easy. Counting sentences means deciding which full stops end one. We tested 26 short texts and show where counters agree, where they split, and why no rule gets every case right.

Short answer: Two tools can give different sentence counts for the same text because a full stop is not always the end of a sentence. It also marks abbreviations (Mr., etc.), initials (J. K.), decimals (3.50) and web addresses (example.com). Every counter has to guess, so it uses rules, and different rules give different totals. We tested 26 short texts to show where.

Why a Full Stop Is Not Enough

The simplest counter treats every run of ., ! and ? as the end of a sentence. That is what the old Clear Count did until this month. It is fast and easy to write, and it breaks on ordinary text. “Mr. Smith paid $3.50. He left.” contains two sentences, and the simple rule found four.

This is a well-known problem in text processing. A period “may end a sentence OR be part of an abbreviation or decimal number,” according to a glossary entry on sentence boundaries, and the same entry notes that no algorithm is 100% accurate. Tools trained on real text, such as NLTK’s Punkt or spaCy, often do better with abbreviations than rule-based ones, but they are not what a word counter in a web page uses.

What We Tested

We ran 26 short texts through three counters in a headless Chrome browser:

  • The old Clear Count counter, which counted every run of ., ! and ?.
  • The current counter used by both ClearText Editor and Clear Count. It ignores dots inside numbers and addresses, never ends a sentence after a known abbreviation such as Mr., Dr. or fig., and treats words like etc. and Inc. as the end of a sentence only when a capital letter follows.
  • Intl.Segmenter, the sentence splitter built into the browser. We used Chrome 155 on Windows with the English setting. Other browsers, other versions and other devices may give different results, because the rules ship with the browser.

The earlier ClearText Editor counter was also tested. It gave different numbers from Clear Count on several inputs, which is a good reason in itself to be careful when comparing tools.

Where the Counters Disagreed

TextOld Clear CountCurrent counterIntl.Segmenter
Mr. Smith paid $3.50. He left.423
Version 2.0 is out.211
Visit example.com. Then leave.322
Dr. Jones met Prof. Lee at 5 p.m. on Friday. They talked.624
J. K. Rowling wrote it. Many read it.424
U.S. officials spoke. Others did not.422
Acme Inc. makes parts. Acme Inc. sells them.422
Buy milk, eggs, etc. and bread.211
I paid 5 dollars. Mr. Lee paid 6.—23
Hi. there121
Wait... what?! Really?332
你好。再见。 (two Chinese sentences)—12

In the English rows, the middle column is the answer we consider correct, with two exceptions that depend on how you read the text: “Hi. there” is arguably one sentence with a typo, and “Wait... what?! Really?” is two sentences if you read the ellipsis as a pause rather than an ending. The Chinese row is a known miss of our counter, covered below. A dash means we did not run that text on the old counter.

Across all 26 texts, Intl.Segmenter agreed with the current counter on 18 and differed on 8.

What the Browser Splitter Gets Right and Wrong

  • It handles decimals, web addresses, brackets and quotes the same way our counter does.
  • It does not know abbreviations. In our Chrome build, “Mr.”, “Dr.”, “Prof.” and initials before a capital letter always started a new sentence. “Dr. Jones met Prof. Lee…” came out as four pieces, with “Dr.” alone as the first.
  • It treats a lowercase word after a full stop as a continuation. That is why it gets “Buy milk, eggs, etc. and bread.” right and reads “Wait... what?!” as one sentence.
  • It understands the Chinese full stop (。). Our counter does not, so a text in Chinese or Japanese will be undercounted in ClearText Editor and Clear Count.

The English and German settings gave the same segments on the five texts we ran in both.

The Limits of Our Own Counter

We changed the counter to give the answers above, and these are the cases where it still fails:

  • Quotes. “Really?” he asked. ‘Yes.’ counts as 3, although most readers would say 2, because a question mark followed by a closing quote and a space ends a sentence in our rules.
  • Several dots or marks after an abbreviation. “etc…” and “Mr!” always end a sentence.
  • Ambiguous abbreviations. After “etc.” followed by a capital, we count a new sentence, so “Buy milk, eggs, etc. Then go home.” gives 2, which is the usual reading but not the only one.
  • Chinese, Japanese and other scripts that use their own full stop are not supported.
  • Missing capital letters. A sentence that starts in lowercase after a full stop still counts as a new sentence in our tool. “Hi. there” gives 2.

The counter reads text in a single pass and is quick: about 55 to 95 milliseconds for a megabyte of text on our test machine.

What About Word and Other Tools?

Microsoft Word shows sentence counts in its readability statistics. One third-party reference says the Word Count dialog lists pages, words, characters, paragraphs and lines, but not sentences. Microsoft’s support page on readability statistics says the average sentence length is the number of words divided by the number of sentences, but it does not describe how Word decides where a sentence ends. We did not test Word, so we cannot say how it handles the texts above. Our post on word count in Microsoft Word covers what the Word Count dialog does show.

That matters if you compare scores. A readability score depends on the sentence count, so a counter that finds more sentences makes the same text look easier to read. Our guide to readability scores explains the formulas.

Paragraphs Are Simpler

Both ClearText Editor and Clear Count treat a blank line as the break between paragraphs and ignore extra blank lines. In our tests, “Hello.”, “World.” and “End.” counted as 3 paragraphs, even though one gap was a single blank line and the other was three. A text typed on separate lines with no blank line between them (“A”, “B”, “C”) counted as 1 paragraph, and empty or space-only text counted as 0.

That is a choice, not a law. Other tools may count every line break as a new paragraph, which gives a different total for the same text. If a count looks off, check how your text separates its lines before you suspect the tool. For the same reason word counts also differ, as we show in why word count never matches between tools.

How to Get a Count You Can Trust

  1. Paste your text into Clear Count or the ClearText Editor and read the sentence figure.
  2. Scan the text for abbreviations, initials, decimals and quoted speech. These are the places a count can drift by one or two.
  3. If the number matters, such as for a limit or a readability score, count a short sample by hand and compare.
  4. Use the same tool every time when you compare two drafts. A different counter is a different rule.

No sentence counter is exactly right, because the full stop does too many jobs. Pick one that handles the cases in your text, know which ones it misses, and treat the figure as an estimate within a sentence or two on ordinary prose.

Related posts

For questions or inquiries contact us at info@cleartexteditor.com