Class: PragmaticSegmenter::Languages::Arabic::SentenceBoundaryPunctuation
- Inherits:
-
SentenceBoundaryPunctuation
- Object
- SentenceBoundaryPunctuation
- PragmaticSegmenter::Languages::Arabic::SentenceBoundaryPunctuation
- Defined in:
- lib/pragmatic_segmenter/languages/arabic.rb
Constant Summary collapse
- SENTENCE_BOUNDARY =
/.*?[:\.!\?؟،]|.*?\z|.*?$/- ReplaceColonBetweenNumbersRule =
Rubular: rubular.com/r/RX5HpdDIyv
Rule.new(/(?<=\d):(?=\d)/, '♭')
- ReplaceNonSentenceBoundaryCommaRule =
Rubular: rubular.com/r/kPRgApNHUg
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
32 33 34 35 |
# File 'lib/pragmatic_segmenter/languages/arabic.rb', line 32 def split txt = replace_non_sentence_boundary_punctuation(text) txt.scan(SENTENCE_BOUNDARY) end |