Module: PragmaticSegmenter::Languages::Common::SingleLetterAbbreviationRules

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

Overview

This class searches for periods within an abbreviation and replaces the periods.

Constant Summary collapse

SingleUpperCaseLetterAtStartOfLineRule =
Rule.new(/(?<=^[A-Z])\.(?=,?\s)/, '')
SingleUpperCaseLetterRule =
Rule.new(/(?<=\s[A-Z])\.(?=,?\s)/, '')
All =
[
  SingleUpperCaseLetterAtStartOfLineRule,
  SingleUpperCaseLetterRule
]