Sha256: be355d86b9b8e96921085f64d29521b9e1706be52d41ca2e28527e7bbbb779a9

Contents?: true

Size: 561 Bytes

Versions: 9

Compression:

Stored size: 561 Bytes

Contents

# coding: utf-8
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

9 entries across 9 versions & 1 rubygems

Version Path
cppjieba_rb-0.4.2 test/test_keyword.rb
cppjieba_rb-0.4.1 test/test_keyword.rb
cppjieba_rb-0.4.0 test/test_keyword.rb
cppjieba_rb-0.3.3 test/test_keyword.rb
cppjieba_rb-0.3.1 test/test_keyword.rb
cppjieba_rb-0.3.0 test/test_keyword.rb
cppjieba_rb-0.2.3 test/test_keyword.rb
cppjieba_rb-0.2.2 test/test_keyword.rb
cppjieba_rb-0.2.1 test/test_keyword.rb