Project

rginger

0.01
No commit activity in last 3 years
No release in over 3 years
RGinger takes an English sentence and gives correction and rephrasing suggestions for it using Ginger proofreading API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

RGinger

RGinger takes an English sentence and gives correction and rephrasing suggestions for it using Ginger proofreading API. It can be used both as a Ruby library and a command line application.

IMPORTANT
Version 0.1.5 dropped rephrase command-line option and Rginger#rephrase function because the API endpoint for these is no longer functioning. The relevant documentation in this readme will be kept as it was for the time being though.

Installation

$ gem install rginger

Command Line Usage

Usage

$ rginger [options] "input text"

Options

     --coloring, --no-coloring, -c:   Get colorful output (default: true)
 --correction, --no-correction, -o:   Get suggestions for correcting the original
                                      sentence (default: true)
     --rephrase, --no-rephrase, -r:   Get suggestions for rephrasing the original
                                      sentence (default: true)
                     --version, -v:   Print version and exit
                        --help, -h:   Show this message

Output Sample

rginger

Library Usage

require 'rginger'

text = "I looking forward meet you"
ginger = RGinger::Parser.new
result = ginger.correct text

# {"original"=>"I looking forward meet you",
# "data"=>
#  [{"old"=>"looking",
#    "from"=>2,
#    "to"=>8,
#    "reverse_from"=>-24,
#    "reverse_to"=>-18,
#    "new"=>"am looking"},
#   {"old"=>"meet",
#    "from"=>18,
#    "to"=>21,
#    "reverse_from"=>-8,
#    "reverse_to"=>-5,
#    "new"=>"to meet"}],
# "corrected"=>"I am looking forward to meet you"}

result = ginger.rephrase text

# {"original"=>"I looking forward meet you", 
# "alternatives"=>
#  ["I was looking forward to meet you", 
#   "I look forward to meeting you", 
#   "I'm looking forward to meeting you", 
#   "I'm looking forward to meet you", 
#   "I look forwarding to meeting you", 
#   "I'm looking forwarding to meeting you", 
#   "I look forward to meeting you all"]} 

References

Alif Rachmawadi's Gingerice may be a better solution than RGinger for those who do not need colored command line output and "rephrase" functionality.

Thanks

Ginger Software for the great software and services that support learners aspiring for skills of writing good English.