stopwords-filter 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG +10 -9
- data/Gemfile.lock +8 -7
- data/README.md +2 -1
- data/VERSION +1 -1
- data/lib/stopwords/snowball/filter.rb +2 -2
- data/lib/stopwords/snowball/locales/ru.csv +159 -159
- data/spec/lib/snowball_filter_spec.rb +10 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDU4NTU1NmEyM2VkMmE3MzExYjVhZDVlOTQ0ZjFjZTEwMWI3MDA1OQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 83490e1d348019aa0cd4419cf407c874a716d3c7
|
4
|
+
data.tar.gz: a68e53541242e77fcc8ed8def8e3bead45088438
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MjU2M2M4ZTMyNmYzOWQzNDljMTZlNjg3MDE1M2MzNDMyNTJkN2FhNWNhZTYw
|
11
|
-
NDk5Yjc5NDAxMTgyOGYzYjA1MjZkNTY0MDk2MGI2Yzk4OTI0ODc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZTg1ZTlhN2QxNTViMjAyMmUyMzFjYjVhNDEyYzAzYWYxNWIxNzQxMmRlZTYz
|
14
|
-
OTFmOWRjOGViNWJkNmNlNDI3YTAzZmYwZGU5NzNiMDhiNGQ0NjAyNjA3MzJh
|
15
|
-
M2VjYTg4NWI4ZDNhOGFjOWQzM2YyNDNmMjQyZDM4MDAxMTc3MmM=
|
6
|
+
metadata.gz: ab735351bd1531eba25c890aa7c30484d35c96c6cfae2d9de976ad0fea5ae47bb689430448ec3e29906537d56bd43451fef57ea7efe8fb916c8138ff9bc329cb
|
7
|
+
data.tar.gz: 74cffbd7465326d213e35b61c33d8c3098b8da273d90cdbb19d3e707a3270a7143b4215f17f11fff70f743f3cfa7b825331b47b9ed299ec1a739947d4e27ae7c
|
data/CHANGELOG
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
0.
|
2
|
-
* Added
|
1
|
+
0.4.0:
|
2
|
+
* Added Polish stopwords based on https://pl.wikipedia.org/wiki/Wikipedia:Stopwords [@grzegorzblaszczyk]
|
3
|
+
* Added info when no locale is found on snowball filter [@nerde]
|
3
4
|
0.3.0:
|
4
|
-
|
5
|
-
|
5
|
+
* Added custom words list to snowball filter [@sbeckeriv]
|
6
|
+
* Fixed problem about initialization: https://github.com/brenes/stopwords-filter/issues/3 [@zackxu1]
|
6
7
|
0.2.0:
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
* Added stopword? method [@s2gatev]
|
9
|
+
* Added Sieve class [@s2gatev]
|
10
|
+
* Added bulgarian language [@s2gatev]
|
10
11
|
0.1.0
|
11
|
-
|
12
|
-
|
12
|
+
* Added simple filter [@brenes]
|
13
|
+
* Added snowball filter [@brenes]
|
data/Gemfile.lock
CHANGED
@@ -2,24 +2,22 @@ GEM
|
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
4
|
diff-lcs (1.1.3)
|
5
|
-
git (1.
|
5
|
+
git (1.3.0)
|
6
6
|
jeweler (1.8.4)
|
7
7
|
bundler (~> 1.0)
|
8
8
|
git (>= 1.2.5)
|
9
9
|
rake
|
10
10
|
rdoc
|
11
|
-
|
12
|
-
|
13
|
-
rdoc (3.12)
|
14
|
-
json (~> 1.4)
|
11
|
+
rake (12.0.0)
|
12
|
+
rdoc (5.0.0)
|
15
13
|
rspec (2.11.0)
|
16
14
|
rspec-core (~> 2.11.0)
|
17
15
|
rspec-expectations (~> 2.11.0)
|
18
16
|
rspec-mocks (~> 2.11.0)
|
19
17
|
rspec-core (2.11.1)
|
20
|
-
rspec-expectations (2.11.
|
18
|
+
rspec-expectations (2.11.3)
|
21
19
|
diff-lcs (~> 1.1.3)
|
22
|
-
rspec-mocks (2.11.
|
20
|
+
rspec-mocks (2.11.3)
|
23
21
|
|
24
22
|
PLATFORMS
|
25
23
|
ruby
|
@@ -27,3 +25,6 @@ PLATFORMS
|
|
27
25
|
DEPENDENCIES
|
28
26
|
jeweler (= 1.8.4)
|
29
27
|
rspec (= 2.11)
|
28
|
+
|
29
|
+
BUNDLED WITH
|
30
|
+
1.13.6
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -8,8 +8,8 @@ module Stopwords
|
|
8
8
|
@locale = locale
|
9
9
|
@locale_filename = "#{File.dirname(__FILE__)}/locales/#{locale}.csv"
|
10
10
|
|
11
|
-
raise "Unknown locale" unless File.exists?(@locale_filename)
|
12
|
-
super File.read(@locale_filename).split(",") + custom_list
|
11
|
+
raise ArgumentError.new("Unknown locale: #{locale.inspect}") unless File.exists?(@locale_filename)
|
12
|
+
super File.read(@locale_filename).split(",") + custom_list
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -1,159 +1,159 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
1
|
+
и
|
2
|
+
в
|
3
|
+
во
|
4
|
+
не
|
5
|
+
что
|
6
|
+
он
|
7
|
+
на
|
8
|
+
я
|
9
|
+
с
|
10
|
+
со
|
11
|
+
как
|
12
|
+
а
|
13
|
+
то
|
14
|
+
все
|
15
|
+
она
|
16
|
+
так
|
17
|
+
его
|
18
|
+
но
|
19
|
+
да
|
20
|
+
ты
|
21
|
+
к
|
22
|
+
у
|
23
|
+
же
|
24
|
+
вы
|
25
|
+
за
|
26
|
+
бы
|
27
|
+
по
|
28
|
+
только
|
29
|
+
ее
|
30
|
+
мне
|
31
|
+
было
|
32
|
+
вот
|
33
|
+
от
|
34
|
+
меня
|
35
|
+
еще
|
36
|
+
нет
|
37
|
+
о
|
38
|
+
из
|
39
|
+
ему
|
40
|
+
теперь
|
41
|
+
когда
|
42
|
+
даже
|
43
|
+
ну
|
44
|
+
вдруг
|
45
|
+
ли
|
46
|
+
если
|
47
|
+
уже
|
48
|
+
или
|
49
|
+
ни
|
50
|
+
быть
|
51
|
+
был
|
52
|
+
него
|
53
|
+
до
|
54
|
+
вас
|
55
|
+
нибудь
|
56
|
+
опять
|
57
|
+
уж
|
58
|
+
вам
|
59
|
+
сказал
|
60
|
+
ведь
|
61
|
+
там
|
62
|
+
потом
|
63
|
+
себя
|
64
|
+
ничего
|
65
|
+
ей
|
66
|
+
может
|
67
|
+
они
|
68
|
+
тут
|
69
|
+
где
|
70
|
+
есть
|
71
|
+
надо
|
72
|
+
ней
|
73
|
+
для
|
74
|
+
мы
|
75
|
+
тебя
|
76
|
+
их
|
77
|
+
чем
|
78
|
+
была
|
79
|
+
сам
|
80
|
+
чтоб
|
81
|
+
без
|
82
|
+
будто
|
83
|
+
человек
|
84
|
+
чего
|
85
|
+
раз
|
86
|
+
тоже
|
87
|
+
себе
|
88
|
+
под
|
89
|
+
жизнь
|
90
|
+
будет
|
91
|
+
ж
|
92
|
+
тогда
|
93
|
+
кто
|
94
|
+
этот
|
95
|
+
говорил
|
96
|
+
того
|
97
|
+
потому
|
98
|
+
этого
|
99
|
+
какой
|
100
|
+
совсем
|
101
|
+
ним
|
102
|
+
здесь
|
103
|
+
этом
|
104
|
+
один
|
105
|
+
почти
|
106
|
+
мой
|
107
|
+
тем
|
108
|
+
чтобы
|
109
|
+
нее
|
110
|
+
кажется
|
111
|
+
сейчас
|
112
|
+
были
|
113
|
+
куда
|
114
|
+
зачем
|
115
|
+
сказать
|
116
|
+
всех
|
117
|
+
никогда
|
118
|
+
сегодня
|
119
|
+
можно
|
120
|
+
при
|
121
|
+
наконец
|
122
|
+
два
|
123
|
+
об
|
124
|
+
другой
|
125
|
+
хоть
|
126
|
+
после
|
127
|
+
над
|
128
|
+
больше
|
129
|
+
тот
|
130
|
+
через
|
131
|
+
эти
|
132
|
+
нас
|
133
|
+
про
|
134
|
+
всего
|
135
|
+
них
|
136
|
+
какая
|
137
|
+
много
|
138
|
+
разве
|
139
|
+
сказала
|
140
|
+
три
|
141
|
+
эту
|
142
|
+
моя
|
143
|
+
впрочем
|
144
|
+
хорошо
|
145
|
+
свою
|
146
|
+
этой
|
147
|
+
перед
|
148
|
+
иногда
|
149
|
+
лучше
|
150
|
+
чуть
|
151
|
+
том
|
152
|
+
нельзя
|
153
|
+
такой
|
154
|
+
им
|
155
|
+
более
|
156
|
+
всегда
|
157
|
+
конечно
|
158
|
+
всю
|
159
|
+
между
|
@@ -25,6 +25,16 @@ describe Stopwords::Snowball::Filter do
|
|
25
25
|
|
26
26
|
end
|
27
27
|
|
28
|
+
context "when locale is not found" do
|
29
|
+
|
30
|
+
let (:filter) { Stopwords::Snowball::Filter.new "no-real" }
|
31
|
+
|
32
|
+
subject { filter }
|
33
|
+
|
34
|
+
it("should throw an error explaining the locale not found") { expect{filter}.to raise_error(ArgumentError)}
|
35
|
+
|
36
|
+
end
|
37
|
+
|
28
38
|
|
29
39
|
|
30
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stopwords-filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David J. Brenes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Small library that allows you to create a simple stopwords filter or
|
14
14
|
use some based on Snowball stopwords lists
|
@@ -57,17 +57,17 @@ require_paths:
|
|
57
57
|
- lib
|
58
58
|
required_ruby_version: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
69
|
rubyforge_project:
|
70
|
-
rubygems_version: 2.
|
70
|
+
rubygems_version: 2.5.1
|
71
71
|
signing_key:
|
72
72
|
specification_version: 4
|
73
73
|
summary: Snowball based filters for stopwords
|