Class: PragmaticSegmenter::Languages::Arabic::SentenceBoundaryPunctuation

Inherits:
SentenceBoundaryPunctuation show all
Defined in:
lib/pragmatic_segmenter/languages/arabic.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

#text

Instance Method Summary collapse

Methods inherited from SentenceBoundaryPunctuation

#initialize

Constructor Details

This class inherits a constructor from PragmaticSegmenter::SentenceBoundaryPunctuation

Instance Method Details

#splitObject



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