wc

wc gem is a very simple word counter. It takes a file in input and prints the words occurences.

Usage

$ bin/wc filename 

This is the very basic wc usage. It reads filename and it prints out a sorted
array for the word occurrences they have been found.

$ bin/wc --json filename
The same as the example above, except for the results that are printed in json notation.

$bin/wc -w x filename
It prints out only the first x words that appear with highest rate in filename

$bin/wc --cloud filename
It prints out the result using definition list HTML tag. This can be used to generate tag clouds

$bin/wc -H filename
It prints out the result excluding some very common English idioms such as ('and', 'of', 'the', ...)

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Paolo Perego. See LICENSE for details.