Sha256: 718b74d40d50e2705bb24aede49ae9fe8cb639eb33b955991fd5fa07bd3b5b57

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

module PragmaticSegmenter
  module Languages
    module Bulgarian
      include Languages::Common

      module Abbreviation
        ABBREVIATIONS = Set.new(["p.s", "акад", "ал", "б.р", "б.ред", "бел.а", "бел.пр", "бр", "бул", "в", "вж", "вкл", "вм", "вр", "г", "ген", "гр", "дж", "дм", "доц", "др", "ем", "заб", "зам", "инж", "к.с", "кв", "кв.м", "кг", "км", "кор", "куб", "куб.м", "л", "лв", "м", "м.г", "мин", "млн", "млрд", "мм", "н.с", "напр", "пл", "полк", "проф", "р", "рис", "с", "св", "сек", "см", "сп", "срв", "ст", "стр", "т", "т.г", "т.е", "т.н", "т.нар", "табл", "тел", "у", "ул", "фиг", "ха", "хил", "ч", "чл", "щ.д"]).freeze
        NUMBER_ABBREVIATIONS = [].freeze
        PREPOSITIVE_ABBREVIATIONS = [].freeze
      end

      class AbbreviationReplacer < AbbreviationReplacer
        SENTENCE_STARTERS = [].freeze

        private
        def replace_period_of_abbr(txt, abbr)
          txt.gsub!(/(?<=\s#{abbr.strip})\.|(?<=^#{abbr.strip})\./, '∯')
          txt
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pragmatic_segmenter-0.3.24 lib/pragmatic_segmenter/languages/bulgarian.rb
pragmatic_segmenter-0.3.23 lib/pragmatic_segmenter/languages/bulgarian.rb
pragmatic_segmenter-0.3.22 lib/pragmatic_segmenter/languages/bulgarian.rb
pragmatic_segmenter-0.3.21 lib/pragmatic_segmenter/languages/bulgarian.rb
pragmatic_segmenter-0.3.20 lib/pragmatic_segmenter/languages/bulgarian.rb
pragmatic_segmenter-0.3.19 lib/pragmatic_segmenter/languages/bulgarian.rb
pragmatic_segmenter-0.3.18 lib/pragmatic_segmenter/languages/bulgarian.rb