classifier 1.4.2 → 1.4.3

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
  SHA256:
3
- metadata.gz: 8c8010bf5648dd9ca16e4c15e44c627c295978440a15e8ce2bd8314a91a050f7
4
- data.tar.gz: 168a80242021c3153b405a7102e480a76a66916eedb628e3d90a150bbe3f69a3
3
+ metadata.gz: e2d12a6941acf386b0567d5f504d20bffad8486111675977446867c6caf5e865
4
+ data.tar.gz: b44dca735ec32321183dc9291f339e68ef115af145d0d9ec78c767e9b3e132b2
5
5
  SHA512:
6
- metadata.gz: a3fb835c78cfa325c5008a88e3202a92df188cc0a870ce7e09a333040f2bd272c7be15747d5c7d055edfbeba6fedf7a5322d05b36e1da3bef53ca05696b12303
7
- data.tar.gz: cd3dd6304aa20a2eb251db1e6d3c5f28cd93860ca463bdc6b65af1dca7d42ee037e561d2c41ad3f8d0203fd2ba2900203e56e6fed8f0bda54f525b62cb72cc4c
6
+ metadata.gz: 4a37d6482fac59b1b6d3cf1c22f0144a08e580ab4ef681cb01189c266fa3de6d6a11668dfd2f1175db0f9d587c01302570be1814a457d2b05e2a9a72d9b9b975
7
+ data.tar.gz: b9a62dc7243527ae95cd89f946d1caf30ca0c2f52527a34427b4dbe68698b920dce8644b0ffd4f34cba4d646f2a17d8711698c096062b0596ed9228885bd822b
@@ -6,5 +6,7 @@ require 'fast_stemmer'
6
6
  require 'classifier/extensions/word_hash'
7
7
 
8
8
  class Object
9
- def prepare_category_name = to_s.gsub('_', ' ').capitalize.intern
9
+ def prepare_category_name
10
+ to_s.gsub('_', ' ').capitalize.intern
11
+ end
10
12
  end
@@ -2,6 +2,8 @@
2
2
  # Copyright:: Copyright (c) 2005 Lucas Carlson
3
3
  # License:: LGPL
4
4
 
5
+ require 'set'
6
+
5
7
  # These are extensions to the String class to provide convenience
6
8
  # methods for the Classifier package.
7
9
  class String
@@ -45,86 +47,86 @@ class String
45
47
  d
46
48
  end
47
49
 
48
- CORPUS_SKIP_WORDS = Set.new(%w[
49
- a
50
- again
51
- all
52
- along
53
- are
54
- also
55
- an
56
- and
57
- as
58
- at
59
- but
60
- by
61
- came
62
- can
63
- cant
64
- couldnt
65
- did
66
- didn
67
- didnt
68
- do
69
- doesnt
70
- dont
71
- ever
72
- first
73
- from
74
- have
75
- her
76
- here
77
- him
78
- how
79
- i
80
- if
81
- in
82
- into
83
- is
84
- isnt
85
- it
86
- itll
87
- just
88
- last
89
- least
90
- like
91
- most
92
- my
93
- new
94
- no
95
- not
96
- now
97
- of
98
- on
99
- or
100
- should
101
- sinc
102
- so
103
- some
104
- th
105
- than
106
- this
107
- that
108
- the
109
- their
110
- then
111
- those
112
- to
113
- told
114
- too
115
- true
116
- try
117
- until
118
- url
119
- us
120
- were
121
- when
122
- whether
123
- while
124
- with
125
- within
126
- yes
127
- you
128
- youll
129
- ])
50
+ CORPUS_SKIP_WORDS = ::Set.new(%w[
51
+ a
52
+ again
53
+ all
54
+ along
55
+ are
56
+ also
57
+ an
58
+ and
59
+ as
60
+ at
61
+ but
62
+ by
63
+ came
64
+ can
65
+ cant
66
+ couldnt
67
+ did
68
+ didn
69
+ didnt
70
+ do
71
+ doesnt
72
+ dont
73
+ ever
74
+ first
75
+ from
76
+ have
77
+ her
78
+ here
79
+ him
80
+ how
81
+ i
82
+ if
83
+ in
84
+ into
85
+ is
86
+ isnt
87
+ it
88
+ itll
89
+ just
90
+ last
91
+ least
92
+ like
93
+ most
94
+ my
95
+ new
96
+ no
97
+ not
98
+ now
99
+ of
100
+ on
101
+ or
102
+ should
103
+ sinc
104
+ so
105
+ some
106
+ th
107
+ than
108
+ this
109
+ that
110
+ the
111
+ their
112
+ then
113
+ those
114
+ to
115
+ told
116
+ too
117
+ true
118
+ try
119
+ until
120
+ url
121
+ us
122
+ were
123
+ when
124
+ whether
125
+ while
126
+ with
127
+ within
128
+ yes
129
+ you
130
+ youll
131
+ ])
130
132
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson