NaturalNode/natural — pull request #181 by nategood (2014-08-19 12:20:12+00:00)
Title: Tfidf.addFileSync Encoding Fixes and Enhancements

_The meat of this pull request is in https://github.com/nategood/natural/commit/ab24769cdbb651751455d391f99dc8b7ec5632a1._

- Fixes a bug where encoding was being ignored (always set to UTF-8)
- Uses the more common "utf8" when referring to the encoding in node
- Adds a check that the encoding specified is actually a valid one
- Adds tests for the aforementioned
- Fixes bug in the tfidf unit test where "if" was used instead of jasmine "it"
- Cleaned up some syntax: trailing whitespace, missing semicolons, a few stray tabs.