All Projects → subosito → Gingerice

subosito / Gingerice

Ruby wrapper for correcting spelling and grammar mistakes based on the context of complete sentences.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Gingerice

benchmark-malloc
Trace memory allocations and collect stats
Stars: ✭ 18 (-96.23%)
Mutual labels:  rubygem
Docx
a ruby library/gem for interacting with .docx files
Stars: ✭ 288 (-39.75%)
Mutual labels:  rubygem
Gemoji
Emoji images and names.
Stars: ✭ 3,890 (+713.81%)
Mutual labels:  rubygem
shortuuid.rb
Convert UUIDs & numbers into space efficient and URL-safe Base62 strings, or any other alphabet.
Stars: ✭ 38 (-92.05%)
Mutual labels:  rubygem
Dry Configurable
A simple mixin to make Ruby classes configurable
Stars: ✭ 280 (-41.42%)
Mutual labels:  rubygem
Tapping device
TappingDevice makes objects tell you what they do, so you don't need to track them yourself.
Stars: ✭ 296 (-38.08%)
Mutual labels:  rubygem
gettext i18n rails js
Extends gettext_i18n_rails making your .PO files available to client side javascript as JSON
Stars: ✭ 28 (-94.14%)
Mutual labels:  rubygem
Dry Monads
Useful, common monads in idiomatic Ruby
Stars: ✭ 453 (-5.23%)
Mutual labels:  rubygem
Webinspector
Ruby gem to inspect completely a web page. It scrapes a given URL, and returns you its meta, links, images more.
Stars: ✭ 288 (-39.75%)
Mutual labels:  rubygem
Tty Progressbar
Display a single or multiple progress bars in the terminal.
Stars: ✭ 377 (-21.13%)
Mutual labels:  rubygem
espressione
Espressione is a Ruby community-driven common regular expression patterns gem
Stars: ✭ 13 (-97.28%)
Mutual labels:  rubygem
Tty Logger
A readable, structured and beautiful logging for the terminal
Stars: ✭ 280 (-41.42%)
Mutual labels:  rubygem
Clearance
Rails authentication with email & password.
Stars: ✭ 3,467 (+625.31%)
Mutual labels:  rubygem
nlp-pure
Natural language processing algorithms implemented in pure Ruby with minimal dependencies
Stars: ✭ 19 (-96.03%)
Mutual labels:  rubygem
Ruby Push Notifications
iOS, Android and Windows Phone Push Notifications made easy!!
Stars: ✭ 385 (-19.46%)
Mutual labels:  rubygem
workbook
simple framework for containing spreadsheet like data
Stars: ✭ 13 (-97.28%)
Mutual labels:  rubygem
Ruby Oembed
oEmbed for Ruby
Stars: ✭ 290 (-39.33%)
Mutual labels:  rubygem
Matestack Ui Core
Matestack enables you to create sophisticated, reactive UIs in pure Ruby, without touching JavaScript and HTML. You end up writing 50% less code while increasing productivity, maintainability and developer happiness.
Stars: ✭ 469 (-1.88%)
Mutual labels:  rubygem
Strip attributes
🔪 An ActiveModel extension that automatically strips all attributes of leading and trailing whitespace before validation. If the attribute is blank, it strips the value to nil.
Stars: ✭ 441 (-7.74%)
Mutual labels:  rubygem
Asciidoctor
💎 A fast, open source text processor and publishing toolchain, written in Ruby, for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.
Stars: ✭ 3,905 (+716.95%)
Mutual labels:  rubygem

Gingerice

Gem Version Build Status Coverage Status Maintainability

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
# 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,
                 "start" => 4,
                "length" => 5
        },
        [1] {
                  "text" => "fliwers",
               "correct" => "flowers",
            "definition" => "a plant cultivated for its blooms or blossoms",
                 "start" => 13,
                "length" => 7
        },
        [2] {
                  "text" => "bring",
               "correct" => "brings",
            "definition" => nil,
                 "start" => 21,
                "length" => 5
        }
    ]
}

This gem also provides executable which can be executed:

$ gingerice "Edwards will be sck yesterday"
# output:

Edwards was sick yesterday

Or if you want verbose output you can add --verbose or -v argument:

$ gingerice --verbose "Edwards will be sck yesterday"
# output:

{
           "text" => "Edwards will be sck yesterday",
         "result" => "Edwards was sick yesterday",
    "corrections" => [
        [0] {
                  "text" => "will be",
               "correct" => "was",
            "definition" => nil,
                 "start" => 8,
                "length" => 7
        },
        [1] {
                  "text" => "sck",
               "correct" => "sick",
            "definition" => "affected by an impairment of normal physical or mental function",
                 "start" => 16,
                "length" => 3
        }
    ]
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Ports

Thanks

Thank you for Ginger Proofreader for such awesome service. Hope they will keep it free :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].