Module: PragmaticSegmenter::Languages::Common::EllipsisRules

Defined in:
lib/pragmatic_segmenter/languages/common/ellipsis.rb

Overview

Constant Summary collapse

ThreeConsecutiveRule =
Rule.new(/\.\.\.(?=\s+[A-Z])/, '☏.')
FourConsecutiveRule =
Rule.new(/(?<=\S)\.{3}(?=\.\s[A-Z])/, 'ƪ')
ThreeSpaceRule =
Rule.new(/(\s\.){3}\s/, '')
FourSpaceRule =
Rule.new(/(?<=[a-z])(\.\s){3}\.(\z|$|\n)/, '')
OtherThreePeriodRule =
Rule.new(/\.\.\./, 'ƪ')
All =
[
  ThreeSpaceRule,
  FourSpaceRule,
  FourConsecutiveRule,
  ThreeConsecutiveRule,
  OtherThreePeriodRule
]