Skip to content

brunocruzcoelho/rudge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rudge Gem Version

determines sentences in a text.

Installation

 gem install rudge

Options

passing keep_trailling_whitespace: true to Rudge will allow to keep the whitespaces at the end of each sentence

Example

require 'rudge'

Rudge.sentences("Here's to the crazy ones. The misfits. The rebels. The troublemakers.
                 The round pegs in the square holes. The ones who see things differently.")

# => ["Here's to the crazy ones.", "The misfits.", "The rebels.", "The troublemakers.",
      "The round pegs in the square holes.", "The ones who see things differently."]

Rudge.sentences("First sentence, Mr. Frodo.   Second sentence.", keep_trailling_whitespace: true)

# => ["First sentence, Mr. Frodo.   ", "Second sentence."]

Documentation

based on the work available here: http://www.pressure.to/ruby/

License

Rudge is released under the MIT License.

About

determines sentences in a text.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages