Module: Lingua::IT::Paragraph
- Defined in:
- lib/lingua/it/paragraph.rb
Class Method Summary collapse
-
.paragraphs(text) ⇒ Object
Split the sample in paragraph.
Class Method Details
.paragraphs(text) ⇒ Object
Split the sample in paragraph. A paragraph is defined by a sequence of sentences followed by one or more n, rt if in Windows env.
8 9 10 |
# File 'lib/lingua/it/paragraph.rb', line 8 def self.paragraphs(text) text.dup.split(/(?:\n[\r\t ]*)+/).collect { |p| p.strip } end |