Class: PragmaticSegmenter::Languages::Kazakh::AbbreviationReplacer

Inherits:
AbbreviationReplacer show all
Defined in:
lib/pragmatic_segmenter/languages/kazakh.rb

Constant Summary collapse

SENTENCE_STARTERS =
[].freeze
SingleUpperCaseCyrillicLetterAtStartOfLineRule =
Rule.new(/(?<=^[А-ЯЁ])\.(?=\s)/, '')
SingleUpperCaseCyrillicLetterRule =
Rule.new(/(?<=\s[А-ЯЁ])\.(?=\s)/, '')

Instance Attribute Summary

Attributes inherited from AbbreviationReplacer

#text

Instance Method Summary collapse

Methods inherited from AbbreviationReplacer

#initialize

Constructor Details

This class inherits a constructor from PragmaticSegmenter::AbbreviationReplacer

Instance Method Details

#replaceObject



36
37
38
39
# File 'lib/pragmatic_segmenter/languages/kazakh.rb', line 36

def replace
  super
  Rule.apply(@text, SingleUpperCaseCyrillicLetterAtStartOfLineRule, SingleUpperCaseCyrillicLetterRule)
end