Module: Lingua::EN::Paragraph

Defined in:
lib/lingua/en/paragraph.rb

Class Method Summary collapse

Class Method Details

.paragraphs(text) ⇒ Object

Splits text into an array of paragraphs.



5
6
7
# File 'lib/lingua/en/paragraph.rb', line 5

def self.paragraphs(text)
  text.strip.split(/(?:\n[\r\t ]*)+/).collect { |p| p.strip }
end