Sha256: f69d63110aec6850c9acaaacb87613950ee35b691d4d22862e6970adb072b5fd

Contents?: true

Size: 575 Bytes

Versions: 2

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

require 'minitest/autorun'
require 'cppjieba_rb'

class JiebaTest < Minitest::Test
  def test_keywords
    results = CppjiebaRb.extract_keyword '我是拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上CEO,走上人生巅峰。', 5

    assert_equal [['CEO',
                   11.739204307083542],
                  ['升职', 10.8561552143],
                  ['加薪', 10.642581114],
                  ['手扶拖拉机', 10.0088573539],
                  ['巅峰', 9.49395840471]], results
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cppjieba_rb-0.4.4 test/test_keyword.rb
cppjieba_rb-0.4.3 test/test_keyword.rb