Sha256: 55309ec1a01ae511dd9b3b384b4802056bcaa66bbc54f1ca229685f97379e290

Contents?: true

Size: 945 Bytes

Versions: 20

Compression:

Stored size: 945 Bytes

Contents

require 'spec_helper'

RSpec.describe PragmaticSegmenter::Languages::Amharic, '(am)' do

  context "Golden Rules" do
    it "Sentence ending punctuation #001" do
      ps = PragmaticSegmenter::Segmenter.new(text: "እንደምን አለህ፧መልካም ቀን ይሁንልህ።እባክሽ ያልሽዉን ድገሚልኝ።", language: 'am')
      expect(ps.segment).to eq(["እንደምን አለህ፧", "መልካም ቀን ይሁንልህ።", "እባክሽ ያልሽዉን ድገሚልኝ።"])
    end
  end

  describe '#segment' do
    it 'correctly segments text #001' do
      ps = PragmaticSegmenter::Segmenter.new(text: "እንደምን አለህ፧መልካም ቀን ይሁንልህ።እባክሽ ያልሽዉን ድገሚልኝ።", language: 'am')
      expect(ps.segment).to eq(["እንደምን አለህ፧", "መልካም ቀን ይሁንልህ።", "እባክሽ ያልሽዉን ድገሚልኝ።"])
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
pragmatic_segmenter-0.3.24 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.23 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.22 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.21 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.20 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.19 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.18 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.17 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.16 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.15 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.14 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.13 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.12 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.10 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.9 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.8 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.7 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.6 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.5 spec/pragmatic_segmenter/languages/amharic_spec.rb
pragmatic_segmenter-0.3.4 spec/pragmatic_segmenter/languages/amharic_spec.rb