ETEvoraTools
Text Analysis

Unique Word Counter

Unique Word Counter extracts the same letter/number/apostrophe/hyphen runs as Word Counter, lowercases each with toLowerCase, and counts a Set. It performs no locale-specific case folding, Unicode normalization, stemming, lemmatization, accent folding, punctuation cleanup inside tokens, or singular/plural grouping. Visually equivalent composed/decomposed text can remain distinct.

Runs locally — files stay on your device
Quick answer

Are “run” and “running” considered the same?

No.

Unique surface forms are not unique concepts

Lowercased token equality groups exact strings only; morphology, spelling variants, and normalization require additional rules.

How it works

Regex tokens map through toLowerCase, Set removes exact repeats, and size is returned.

Key concepts

Case differences collapse

Word and word group together.

Morphology remains

cat and cats are distinct.

When to use it

  • Measure distinct surface forms under one rule.
  • Compare vocabulary repetition roughly.
  • Count case-insensitive tokens in simple text.

When not to use it

  • Do not interpret as vocabulary knowledge.
  • Do not expect stemming or accent folding.
  • Do not expect locale-specific case behavior.

Worked examples

Case

Input
Cat cat CAT
Expected output
1

Lowercase groups.

Forms

Input
run runs running
Expected output
3

No stemming.

Accent

Input
cafe café
Expected output
2

No accent folding.

Common mistakes

Calling it lemma count

No morphology. Correction: Use an NLP lemmatizer.

Ignoring Unicode normalization

Equivalent forms can differ. Correction: Normalize intentionally.

Cross-language comparison

Token rules may bias counts. Correction: Use language-specific segmentation.

Best practices

  • Document token/case rules.
  • Normalize if the use case requires it.
  • Avoid equating surface forms with concepts.

Related operations and differences

Remove Duplicate Words

Choose Remove Duplicate Words when you need to keep only the first occurrence of each word.; use Unique Word Counter specifically for count unique words.

Word Frequency Counter

Choose Word Frequency Counter when you need to rank words by how often they appear.; use Unique Word Counter specifically for count unique words.

Add Prefix to Every Line

Choose Add Prefix to Every Line when you need to add the same prefix before every line.; use Unique Word Counter specifically for count unique words.

Add Suffix to Every Line

Choose Add Suffix to Every Line when you need to add the same suffix after every line.; use Unique Word Counter specifically for count unique words.

Capitalize Every Word

Choose Capitalize Every Word when you need to capitalize the first character of every word.; use Unique Word Counter specifically for count unique words.

Character Counter

Choose Character Counter when you need to count Unicode characters in text.; use Unique Word Counter specifically for count unique words.

Limitations and privacy

  • Regex tokens plus basic lowercase Set; no locale folding, normalization, stemming, lemmatization, accent folding, stopwords, language segmentation, or token list output.

The text is analyzed locally in this browser and is not uploaded by the tool.

Frequently asked questions

Is matching case-insensitive?

Through basic lowercasing, yes.

Are plurals merged?

No.

Are accents ignored?

No.

Are tokens shown?

Only the count is returned.

References