Sha256: 46f49d2083f031afdaabcdca49b8cce3b7199147af4b559ce3ae3815d1bab905

Contents?: true

Size: 862 Bytes

Versions: 18

Compression:

Stored size: 862 Bytes

Contents

module PragmaticSegmenter
  module Languages
    class Armenian
      class Process < PragmaticSegmenter::Process
        private

        def sentence_boundary_punctuation(txt)
          PragmaticSegmenter::Languages::Armenian::SentenceBoundaryPunctuation.new(text: txt).split
        end

        def punctuation_array
          PragmaticSegmenter::Languages::Armenian::Punctuation.new.punct
        end
      end

      class Cleaner < PragmaticSegmenter::Cleaner
      end

      class SentenceBoundaryPunctuation < PragmaticSegmenter::SentenceBoundaryPunctuation
        SENTENCE_BOUNDARY = /.*?[։՜:]|.*?$/

        def split
          text.scan(SENTENCE_BOUNDARY)
        end
      end

      class Punctuation < PragmaticSegmenter::Punctuation
        PUNCT = ['։', '՜', ':']

        def punct
          PUNCT
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pragmatic_segmenter-0.3.1 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.3.0 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.2.0 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.8 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.7 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.6 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.5 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.4 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.3 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.2 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.1 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.1.0 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.0.9 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.0.8 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.0.7 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.0.6 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.0.5 lib/pragmatic_segmenter/languages/armenian.rb
pragmatic_segmenter-0.0.4 lib/pragmatic_segmenter/languages/armenian.rb