This page contains a Javascript routine that finds all the unique words within the given text and provides a count for each word. The tricks used, including regular expressions and the reduce function, can be viewed by examining the page source.
The apostrophe is not considered to be a word separator, so the contraction "can't" is one word, not two, and the possessive form "father's" is not counted as an occurrence of "father."
Jeffrey Clymer -- January 29, 2017 -- Email -- Homepage
Visitors: