文件名称:ruby-tf-idf:从文本中计算出TF-IDF的Ruby gem,可在语料库的每个文档中找到最相关的单词
文件大小:6KB
文件格式:ZIP
更新时间:2024-06-01 06:52:14
Ruby
Ruby-Tf-Idf 此gem计算TF-IDF来查找语料库中每个文档的最相关词 TF-IDF用于术语频率-反向文档频率 安装 将此行添加到您的应用程序的Gemfile中: gem 'ruby-tf-idf' 然后执行: $ bundle install 或将其自己安装为: $ gem install ruby-tf-idf 用法 require 'rubygems' require 'ruby-tf-idf' corpus = [ 'A big enough hammer can usually fix anything', 'A bird in the hand is a big mistake .', 'A bird in the hand is better than one overhead!', 'A career is a job that takes abou
【文件预览】:
ruby-tf-idf-master
----ruby-tf-idf.gemspec(845B)
----Rakefile(28B)
----Gemfile(96B)
----.gitignore(154B)
----lib()
--------ruby-tf-idf()
--------ruby-tf-idf.rb(7KB)
----README.md(2KB)
----LICENSE.txt(1KB)