Class: PragmaticSegmenter::Languages::Persian::SentenceBoundaryPunctuation
- Inherits:
-
SentenceBoundaryPunctuation
- Object
- SentenceBoundaryPunctuation
- PragmaticSegmenter::Languages::Persian::SentenceBoundaryPunctuation
- Defined in:
- lib/pragmatic_segmenter/languages/persian.rb
Constant Summary collapse
- SENTENCE_BOUNDARY =
/.*?[:\.!\?؟]|.*?\z|.*?$/- ReplaceColonBetweenNumbersRule =
Rule.new(/(?<=\d):(?=\d)/, '♭')
- ReplaceNonSentenceBoundaryCommaRule =
Rule.new(/،(?=\s\S+،)/, '♬')
Constants inherited from SentenceBoundaryPunctuation
SentenceBoundaryPunctuation::SENTENCE_BOUNDARY_REGEX
Instance Attribute Summary
Attributes inherited from SentenceBoundaryPunctuation
Instance Method Summary collapse
Methods inherited from SentenceBoundaryPunctuation
Constructor Details
This class inherits a constructor from PragmaticSegmenter::SentenceBoundaryPunctuation
Instance Method Details
#split ⇒ Object
25 26 27 28 |
# File 'lib/pragmatic_segmenter/languages/persian.rb', line 25 def split txt = replace_non_sentence_boundary_punctuation(text) txt.scan(SENTENCE_BOUNDARY) end |