francois-classifier 1.3.4 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 3
3
- :patch: 5
3
+ :patch: 6
4
4
  :major: 1
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{classifier}
5
- s.version = "1.3.4"
5
+ s.version = "1.3.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Yury Korolev"]
9
- s.date = %q{2009-07-12}
9
+ s.date = %q{2009-07-13}
10
10
  s.description = %q{Bayesian classifier and others.}
11
11
  s.email = %q{yury.korolev@gmail.com}
12
12
  s.extra_rdoc_files = [
@@ -1,6 +1,8 @@
1
1
  # coding:utf-8
2
2
  $KCODE = 'utf8'
3
3
 
4
+ puts "Custom Classifier"
5
+
4
6
  module Classifier
5
7
  class Base
6
8
 
@@ -36,8 +38,11 @@ module Classifier
36
38
 
37
39
  private
38
40
 
41
+ def stemmer
42
+ @stemmer ||= Lingua::Stemmer.new(@options)
43
+ end
44
+
39
45
  def word_hash_for_words(words)
40
- stemmer = Lingua::Stemmer.new(@options)
41
46
  d = Hash.new
42
47
  skip_words = SKIP_WORDS[@options[:language]] || []
43
48
  words.each do |word|
@@ -303,4 +308,4 @@ module Classifier
303
308
  }
304
309
 
305
310
  end
306
- end
311
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: francois-classifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-12 00:00:00 -07:00
12
+ date: 2009-07-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency