tf-idf-similarity 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 736ca4c4b93d14ea046cbc4bdae930c8b88082be
4
- data.tar.gz: 6b43e8356c59e0f48ac08f300186d4e12497368d
3
+ metadata.gz: 03431fb16064caa54fe9cbfc17a151acb1a25fa5
4
+ data.tar.gz: be2e97b63e14244925937ee71fc8dc60c88dfce4
5
5
  SHA512:
6
- metadata.gz: 635ea3047ba54a951020f95ab7e9412adf07a39d6042b85e605fcd0517345d506690bac11ab05f7f20e16f80106e95e8002fd1ae2ab4e466a27cc4f143ac15d6
7
- data.tar.gz: 693ac6c70f9daf3f0a1ed06ba693d170654e7c871702641d598e59a6fc69cbd5316e76441da062aca05d0b8f67c0ba0c958a4115e2c9da17316a2ebef2190738
6
+ metadata.gz: f615fae6cfad994fa25c85b1f3d6882742944e7bb5894ae3fcf6b4c9d7b34647b0da1b3914f127eb26e46a299c0f8a4e9d64bc05a7cb1c429663beaf657704eb
7
+ data.tar.gz: 317ea7c5a1a72e53419f2eadb5b4789bccbe29f0f7bf742f89e9ed9ffb210b43a78180ebef818baf497a48911e0f25897e6906251c45cd787d61c5da43cbbb92
@@ -2,7 +2,6 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 1.9.3
6
5
  - 2.0.0
7
6
  - 2.1.0
8
7
  - 2.2.0
data/README.md CHANGED
@@ -88,6 +88,14 @@ document1 = TfIdfSimilarity::Document.new(text, :term_counts => term_counts, :si
88
88
 
89
89
  [Read the documentation at RubyDoc.info.](http://rubydoc.info/gems/tf-idf-similarity)
90
90
 
91
+ ## Troubleshooting
92
+
93
+ ```
94
+ NoMethodError: undefined method `[]' for Matrix:Module
95
+ ```
96
+
97
+ The `matrix` gem conflicts with Ruby's internal `Matrix` module. Don't use the `matrix` gem.
98
+
91
99
  ## Speed
92
100
 
93
101
  Instead of using the Ruby Standard Library's [Matrix](http://www.ruby-doc.org/stdlib-2.0/libdoc/matrix/rdoc/Matrix.html) class, you can use one of the [GNU Scientific Library (GSL)](http://www.gnu.org/software/gsl/), [NArray](http://narray.rubyforge.org/) or [NMatrix](https://github.com/SciRuby/nmatrix) (0.0.9 or greater) gems for faster matrix operations. For example:
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+ require 'delegate'
2
3
 
3
4
  # A token.
4
5
  #
@@ -9,7 +10,7 @@
9
10
  # @see http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.WordDelimiterFilterFactory
10
11
  # @see http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory
11
12
  module TfIdfSimilarity
12
- class Token < SimpleDelegator
13
+ class Token < ::SimpleDelegator
13
14
  # Returns a falsy value if all its characters are numbers, punctuation,
14
15
  # whitespace or control characters.
15
16
  #
@@ -1,3 +1,3 @@
1
1
  module TfIdfSimilarity
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.add_runtime_dependency('unicode_utils', '~> 1.4')
19
19
 
20
20
  s.add_development_dependency('coveralls')
21
- s.add_development_dependency('rake')
21
+ s.add_development_dependency('json', '< 2')
22
+ s.add_development_dependency('rake', '< 12')
22
23
  s.add_development_dependency('rspec', '~> 2.10')
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tf-idf-similarity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James McKinney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-18 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unicode_utils
@@ -38,20 +38,34 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: '2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "<"
53
+ - !ruby/object:Gem::Version
54
+ version: '2'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - "<"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: '12'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">="
66
+ - - "<"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: '12'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -131,4 +145,3 @@ test_files:
131
145
  - spec/term_count_model_spec.rb
132
146
  - spec/tf_idf_model_spec.rb
133
147
  - spec/token_spec.rb
134
- has_rdoc: