Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's a Rails plugin, or Ruby gem, to automatically fix English grammar?

Facebook just re-launched Comments, with a automatic grammar fixing feature.

What does the grammar filter do?

  • Adds punctuation (e.g. periods at the end of sentences)
  • Trims extra whitespace Auto cases words (e.g. capitalize the first word of a sentence)
  • Expands slang words (e.g. plz becomes please)
  • Adds a space after punctuation (e.g. Hi,Cat would become Hi, Cat)
  • Fix common grammar mistakes (e.g. convert ‘dont' to ‘don’t’)

What is an equivalent plugin or gem?

like image 840
Colin Plamondon Avatar asked Mar 08 '11 20:03

Colin Plamondon


1 Answers

I don't know of anything with those particular features.

However, you might look at Ruby LinkParser, which is a Ruby wrapper for the Link Grammar parser developed by academics and used by the Abiword project for grammar checking. (Note that "link" in Link Grammer parser doesn't refer to HTML links, but rather to a structure that describes English syntax as a set of links between words).

Here's another interesting checker, written in Ruby, which is designed to check LaTex files for some of the problems you mention (plus others).

like image 67
Jacob Mattison Avatar answered Oct 05 '22 23:10

Jacob Mattison