class PragmaticSegmenter::Languages::Russian::AbbreviationReplacer

Constants

SENTENCE_STARTERS

Private Instance Methods

replace_period_of_abbr(txt, abbr) click to toggle source
# File lib/pragmatic_segmenter/languages/russian.rb, line 19
def replace_period_of_abbr(txt, abbr)
  txt.gsub!(/(?<=\s#{abbr.strip})\./, '∯')
  txt.gsub!(/(?<=\A#{abbr.strip})\./, '∯')
  txt.gsub!(/(?<=^#{abbr.strip})\./, '∯')
  txt
end