Word counter working

Added a word counter which I found from this StackOverflow post.

In order to exclude popular words (I, is, of, the, e.t.c) from the word counter we make a list of words we want to ignore, and use the Array.indexOf() function to check if the word we variable is in the array. Found the Array.indexOf() function through this stack overflow post. This github repo has a list of the 100 most common words listed in a javascript type array, so have just copied this array as the list of words to ignore.

The counter is now compiling and working correctly. It is listing the most popular words in the text.

Will now work on highlighting  the most popular words within the text.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s