Comments:"subosito/gingerice · GitHub"
URL:https://github.com/subosito/gingerice
Gingerice ![]()
![]()
![]()
![]()
![]()
Ruby wrapper of Ginger Proofreader which corrects spelling and grammar mistakes based on the context of complete sentences by comparing each sentence to billions of similar sentences from the web.
Installation
Add this line to your application's Gemfile:
gem 'gingerice'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gingerice
Usage
require 'gingerice'
text = 'The smelt of fliwers bring back memories.'
parser = Gingerice::Parser.new
parser.parse text
# or you can:
#
# require 'gingerice/tool'
#
# Gingerice::Tool.check text
# output:
#
# => {
# "text" => "The smelt of fliwers bring back memories.",
# "result" => "The smell of flowers brings back memories.",
# "corrections" => [
# [0] {
# "text" => "smelt",
# "correct" => "smell",
# "definition" => nil
# },
# [1] {
# "text" => "fliwers",
# "correct" => "flowers",
# "definition" => "a plant cultivated for its blooms or blossoms"
# },
# [2] {
# "text" => "bring",
# "correct" => "brings",
# "definition" => nil
# }
# ]
# }
This gem also provides executable which can be executed:
% gingerice "Edwards will be sck yesterday"
# output :
#
# Edwards was sick yesterday
Contributing
Fork it Create your feature branch (git checkout -b my-new-feature) Commit your changes (git commit -am 'Add some feature') Push to the branch (git push origin my-new-feature) Create new Pull RequestThanks
Thank you for Ginger Proofreader for such awesome service. Hope they will keep it free :)