ruby-stemmer 0.9.6 → 2.0.0

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
- SHA1:
3
- metadata.gz: 678d0596a279406b80a9d589f279b1f5604c92bc
4
- data.tar.gz: f7ba42633938431650926e8bf240343be08d65c6
2
+ SHA256:
3
+ metadata.gz: 02b3e3b11e2a4a00b904607855a551e3df0dc330eaa77d1822bcb377df70d2c5
4
+ data.tar.gz: f4be7cba4b8578aee14d1039ba245b7e6f3d87cee4620e08157526ab88fb9924
5
5
  SHA512:
6
- metadata.gz: dd2d9cfcff4e729d2658c33641df1bbfab967b230ac79eb48a0be453480727092c78fb2b5c1b7b4d05c7db5025ce1ae8d9b0a595fb5c3b01c663ccc3403c14fd
7
- data.tar.gz: 30597a92efd51b3f4b0da267b7f9cbe741d7103936001ab01e699aaa81d598f9ff4e537e46ead8c7acd4c8bef63bdcca5384a7f8c73425b221e977ab8b739644
6
+ metadata.gz: b42a23792334ff447745b0e5af1f9618c458ef3fff752a0fabc34f2c10570f22b53372a899f36d6cc65820f466dbbd233918febfd2372e147dbc5072020efc78
7
+ data.tar.gz: 2ef5552bd98bad1045d1f40ceb51611e5eac2cfac0b4ad360c9ffecced246553bd453dea9532586665d626ccdff066b8a3deeb5dd3f134ec3ebd796b3c8b0ae8
data/.travis.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
- rvm:
3
- - 1.8.7
2
+ rvm:
4
3
  - 1.9.3
5
- - 2.1.5
6
- - 2.2.0
4
+ - 2.0
5
+ - 2.2
6
+ - 2.4
7
+ - 2.6
7
8
  script: bundle exec rake
data/Gemfile.lock CHANGED
@@ -1,18 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-stemmer (0.9.6)
4
+ ruby-stemmer (2.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- json (1.8.2)
10
9
  minitest (5.5.1)
11
10
  rake (10.4.2)
12
11
  rake-compiler (0.9.5)
13
12
  rake
14
- rdoc (4.2.0)
15
- json (~> 1.4)
16
13
 
17
14
  PLATFORMS
18
15
  ruby
@@ -20,5 +17,7 @@ PLATFORMS
20
17
  DEPENDENCIES
21
18
  minitest (~> 5.5)
22
19
  rake-compiler (~> 0.9)
23
- rdoc (~> 4.2)
24
20
  ruby-stemmer!
21
+
22
+ BUNDLED WITH
23
+ 1.16.1
data/README.rdoc CHANGED
@@ -1,16 +1,14 @@
1
- = Ruby-Stemmer {Project Status}[http://stillmaintained.com/aurelian/ruby-stemmer.png]
2
-
3
- rdoc-image:https://travis-ci.org/aurelian/ruby-stemmer.svg?branch=master
1
+ = Ruby-Stemmer
4
2
 
5
3
  Ruby-Stemmer exposes SnowBall API to Ruby.
6
4
 
7
- This package includes libstemmer_c library released under BSD licence
8
- and available for free {here}[http://snowball.tartarus.org/dist/libstemmer_c.tgz].
5
+ {Travis CI Status}[https://api.travis-ci.org/aurelian/ruby-stemmer.png]
6
+
7
+ This package includes libstemmer_c library released under BSD licence and available for free {here}[https://snowballstem.org/download.html].
9
8
 
10
- Support for latin language is also included and it has been generated with the snowball compiler using
11
- {schinke contribution}[http://snowball.tartarus.org/otherapps/schinke/intro.html].
9
+ Support for latin language is also included and it has been generated with the snowball compiler using {schinke contribution}[https://snowballstem.org/otherapps/schinke/].
12
10
 
13
- For more details about libstemmer_c please visit the {SnowBall website}[http://snowball.tartarus.org].
11
+ For more details about libstemmer_c please visit the {SnowBall website}[https://snowballstem.org/].
14
12
 
15
13
  == Usage
16
14
 
@@ -31,36 +29,30 @@ For more details about libstemmer_c please visit the {SnowBall website}[http://s
31
29
  puts "~> #{word}" #=> "instal"
32
30
  end # => #<Lingua::Stemmer:0x102501e48>
33
31
 
34
- === Rails
35
-
36
- # Rails2: -- config/environment.rb:
37
- config.gem 'ruby-stemmer', :version => '>=0.6.2', :lib => 'lingua/stemmer'
38
-
39
- # Rails3: -- Gemfile
40
- gem 'ruby-stemmer', '>=0.8.3', :require => 'lingua/stemmer'
32
+ === Gemfile
33
+
34
+ gem 'ruby-stemmer', '>=2.0.0', :require => 'lingua/stemmer'
41
35
 
42
- === More details
36
+ === More details
43
37
 
44
38
  * Complete API in {RDoc format}[http://rdoc.info/github/aurelian/ruby-stemmer/master/frames]
45
- * More usage on the {test file}[http://github.com/aurelian/ruby-stemmer/blob/master/test/lingua/test_stemmer.rb]
39
+ * More usage on the {test file}[https://github.com/aurelian/ruby-stemmer/blob/master/test/lingua/test_stemmer.rb]
46
40
 
47
41
  == Install
48
42
 
49
- === Standard install with:
50
-
51
43
  gem install ruby-stemmer
52
44
 
53
45
  ==== Windows
54
46
 
55
- There's also a Windows (Fat bin) compiled against ruby versions: 1.8.7, 1.9.3, 2.1.5, 2.2.0
47
+ There's also a Windows (Fat bin)
56
48
 
57
49
  gem install ruby-stemmer --platform=x86-mingw32
58
50
 
59
- As far as I know the above should work with {rubyinstaller}[http://rubyinstaller.org/]. If if fails, you could try with:
51
+ As far as I know the above should work with {rubyinstaller}[http://rubyinstaller.org/]. If it fails, you could try with:
60
52
 
61
53
  gem install ruby-stemmer --platform=x86-mswin32
62
54
 
63
- {It's known}[http://cl.ly/BX9o] to work under Windows XP.
55
+ {It's known}[https://cl.ly/BX9o] to work under Windows XP.
64
56
 
65
57
  === Development version
66
58
 
@@ -72,30 +64,28 @@ As far as I know the above should work with {rubyinstaller}[http://rubyinstaller
72
64
 
73
65
  ==== Cross Compiling
74
66
 
75
- Install {rake-compiler-dev-box}[https://github.com/tjschuck/rake-compiler-dev-box] and follow the setup.
76
- Inside vagrant box run:
67
+ Install {rake-compiler-dock}[https://github.com/rake-compiler/rake-compiler-dock] and follow the setup.
77
68
 
78
- $ cd /vagrant
79
- $ RUBY_CC_VERSION=1.8.7:1.9.3:2.1.5:2.2.0 package_win32_fat_binary ruby-stemmer
69
+ Then, inside the docker image:
80
70
 
81
- Idea is to have same builds as in travis.yml.
71
+ $ AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc LD=i686-w64-mingw32-ld rake cross native gem
82
72
 
83
73
  == NOT A BUG
84
74
 
85
75
  The stemming process is an algorithm to allow one to find the stem of an word (not the root of it).
86
76
  For further reference on stem vs. root, please check wikipedia articles on the topic:
87
77
 
88
- * http://en.wikipedia.org/wiki/Stem_%28linguistics%29
89
- * http://en.wikipedia.org/wiki/Root_%28linguistics%29
78
+ * https://en.wikipedia.org/wiki/Word_stem
79
+ * https://en.wikipedia.org/wiki/Root_(linguistics)
90
80
 
91
81
  == TODO
92
82
 
93
- * {Open issues}[http://github.com/aurelian/ruby-stemmer/issues]
83
+ * {Open issues}[https://github.com/aurelian/ruby-stemmer/issues]
94
84
 
95
85
  == Note on Patches/Pull Requests
96
86
 
97
- * Fork the project from {github}[http://github.com/aurelian/ruby-stemmer]
98
- * Make your feature addition or {bug fix}[http://github.com/aurelian/ruby-stemmer/issues]
87
+ * Fork the project from {github}[https://github.com/aurelian/ruby-stemmer]
88
+ * Make your feature addition or {bug fix}[https://github.com/aurelian/ruby-stemmer/issues]
99
89
  * Add tests for it. This is important so I don't break it in a
100
90
  future version unintentionally.
101
91
  * Commit, do not mess with rakefile, version, or history.
@@ -106,15 +96,15 @@ For further reference on stem vs. root, please check wikipedia articles on the t
106
96
 
107
97
  == Alternative Stemmers for Ruby
108
98
 
109
- * {stemmer4r}[http://rubyforge.org/projects/stemmer4r] (ext)
110
- * {fast-stemmer}[http://github.com/romanbsd/fast-stemmer] (ext)
111
- * {uea-stemmer}[http://github.com/ealdent/uea-stemmer] (ext)
112
- * {stemmer}[http://rubyforge.org/projects/stemmer] (pure ruby)
99
+ * {stemmer4r}[https://rubygems.org/gems/stemmer4r] (ext)
100
+ * {fast-stemmer}[https://rubygems.org/gems/fast-stemmer] (ext)
101
+ * {uea-stemmer}[https://rubygems.org/gems/uea-stemmer] (ext)
102
+ * {stemmer}[https://rubygems.org/gems/stemmer] (pure ruby)
113
103
  * add yours
114
104
 
115
105
  == Copyright
116
106
 
117
- Copyright (c) 2008-2015 {Aurelian Oancea}[http://locknet.ro]. See MIT-LICENSE for details.
107
+ Copyright (c) 2008-2020 {Aurelian Oancea}[http://locknet.ro]. See MIT-LICENSE for details.
118
108
 
119
109
  == Contributors
120
110
 
@@ -123,7 +113,4 @@ Copyright (c) 2008-2015 {Aurelian Oancea}[http://locknet.ro]. See MIT-LICENSE fo
123
113
  * {Aaron Patterson}[https://github.com/tenderlove] - rake compiler (windows support), code cleanup
124
114
  * {Damián Silvani}[https://github.com/munshkr] - Ruby 1.9 encoding
125
115
 
126
- == Real life usage
127
- * http://planet33.ru is using Ruby-Stemmer together with {Classifier}[http://github.com/yury/classifier] to automatically rate places based on users comments.
128
-
129
116
  # encoding: utf-8
@@ -23,7 +23,7 @@ module Lingua
23
23
  end
24
24
 
25
25
  return stemmer if block_given?
26
- results.length == 1 ? results[0] : results
26
+ o.kind_of?(String) ? results[0] : results
27
27
  end
28
28
 
29
29
  class Stemmer
@@ -2,6 +2,6 @@ module Lingua
2
2
 
3
3
  class Stemmer
4
4
 
5
- VERSION = "0.9.6"
5
+ VERSION = "2.0.0"
6
6
  end
7
7
  end
data/ruby-stemmer.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.version = Lingua::Stemmer::VERSION
9
9
 
10
10
  s.platform = Gem::Platform::RUBY
11
- s.required_ruby_version = ">= 1.8.7"
11
+ s.required_ruby_version = ">= 1.9.3"
12
12
 
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Aurelian Oancea", "Yury Korolev"]
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.description = "Expose the bundled libstemmer_c library to Ruby."
17
17
  s.email = "oancea@gmail.com"
18
18
  s.extensions = ["ext/lingua/extconf.rb"]
19
- s.has_rdoc = true
20
19
  s.extra_rdoc_files = ["README.rdoc"]
21
20
  s.files = `git ls-files`.split("\n")
22
21
  s.homepage = "http://github.com/aurelian/ruby-stemmer"
@@ -25,6 +24,5 @@ Gem::Specification.new do |s|
25
24
 
26
25
  s.add_development_dependency 'rake-compiler', '~> 0.9'
27
26
  s.add_development_dependency 'minitest', '~> 5.5'
28
- s.add_development_dependency 'rdoc', '~> 4.2'
29
27
  end
30
28
 
@@ -50,6 +50,12 @@ class TestStemmer < Minitest::Test
50
50
  assert_kind_of Array, results
51
51
  end
52
52
 
53
+ def test_array_stemmer_issue_22
54
+ results= ::Lingua.stemmer(["one"], :language => "de", :encoding => "ISO_8859_1")
55
+ assert_equal 1, results.size
56
+ assert_kind_of Array, results
57
+ end
58
+
53
59
  def test_stemmer_subclass
54
60
  assert_raises(RuntimeError) do
55
61
  Class.new(Lingua::Stemmer) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-stemmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurelian Oancea
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-27 00:00:00.000000000 Z
12
+ date: 2019-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -39,20 +39,6 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '5.5'
42
- - !ruby/object:Gem::Dependency
43
- name: rdoc
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '4.2'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '4.2'
56
42
  description: Expose the bundled libstemmer_c library to Ruby.
57
43
  email: oancea@gmail.com
58
44
  executables: []
@@ -171,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
157
  requirements:
172
158
  - - ">="
173
159
  - !ruby/object:Gem::Version
174
- version: 1.8.7
160
+ version: 1.9.3
175
161
  required_rubygems_version: !ruby/object:Gem::Requirement
176
162
  requirements:
177
163
  - - ">="
@@ -179,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
165
  version: '0'
180
166
  requirements: []
181
167
  rubyforge_project:
182
- rubygems_version: 2.4.5
168
+ rubygems_version: 2.7.3
183
169
  signing_key:
184
170
  specification_version: 4
185
171
  summary: Expose libstemmer_c to Ruby.