classyfier 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,10 +8,11 @@ module Classyfier
8
8
  @english_dict = load_dictionary()
9
9
  end
10
10
 
11
- def classify(text, opts = {:word_count => 1})
11
+ def classify(text, opts = {:word_count => 1, :word_size => 1})
12
12
  words = text.split(" ")
13
13
  count = 0
14
14
  for word in words
15
+ next if word.length < opts[:word_size]
15
16
  count += 1 if @english_dict[clean_word(word)]
16
17
  break if count >= opts[:word_count]
17
18
  end
@@ -1,3 +1,3 @@
1
1
  module Classyfier
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classyfier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-16 00:00:00.000000000 Z
12
+ date: 2012-07-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simple Ruby Classifier Utilities
15
15
  email: