fizx-stringset 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 2
data/lib/stringset.rb CHANGED
@@ -12,7 +12,7 @@ class StringSet
12
12
  def initialize(strings = [], options = {})
13
13
  @stemming = options[:stem]
14
14
  @strings = tokenize strings
15
- @max_token_size = @strings.map{|str| str.split(TOKENIZER).length }.max
15
+ @max_token_size = @strings.map{|str| str.split(TOKENIZER).length }.max.to_i
16
16
  @strings.map! {|str| stem(str.split(TOKENIZER)).join(" ") } if stemming?
17
17
  end
18
18
 
@@ -27,7 +27,7 @@ class StringSet
27
27
  when String:
28
28
  stem(strings.split(TOKENIZER))
29
29
  else
30
- raise Error.new("Could not tokenize")
30
+ tokenize(strings.to_s, ngramize)
31
31
  end
32
32
  ngramize ? ngramize(tokens) : tokens
33
33
  end
data/stringset.gemspec ADDED
@@ -0,0 +1,49 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{stringset}
5
+ s.version = "0.2.2"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Kyle Maxwell"]
9
+ s.date = %q{2009-06-05}
10
+ s.email = %q{kyle@kylemaxwell.com}
11
+ s.extra_rdoc_files = [
12
+ "LICENSE",
13
+ "README.rdoc"
14
+ ]
15
+ s.files = [
16
+ ".document",
17
+ ".gitignore",
18
+ "LICENSE",
19
+ "README.rdoc",
20
+ "Rakefile",
21
+ "VERSION",
22
+ "VERSION.yml",
23
+ "lib/stringset.rb",
24
+ "spec/hamlet.txt",
25
+ "spec/spec_helper.rb",
26
+ "spec/stringset_spec.rb",
27
+ "stringset.gemspec"
28
+ ]
29
+ s.has_rdoc = true
30
+ s.homepage = %q{http://github.com/fizx/stringset}
31
+ s.rdoc_options = ["--charset=UTF-8"]
32
+ s.require_paths = ["lib"]
33
+ s.rubygems_version = %q{1.3.1}
34
+ s.summary = %q{TODO}
35
+ s.test_files = [
36
+ "spec/spec_helper.rb",
37
+ "spec/stringset_spec.rb"
38
+ ]
39
+
40
+ if s.respond_to? :specification_version then
41
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
+ s.specification_version = 2
43
+
44
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
45
+ else
46
+ end
47
+ else
48
+ end
49
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizx-stringset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Maxwell
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-04 00:00:00 -07:00
12
+ date: 2009-06-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,14 +23,18 @@ extra_rdoc_files:
23
23
  - LICENSE
24
24
  - README.rdoc
25
25
  files:
26
+ - .document
27
+ - .gitignore
26
28
  - LICENSE
27
29
  - README.rdoc
28
30
  - Rakefile
31
+ - VERSION
29
32
  - VERSION.yml
30
33
  - lib/stringset.rb
31
34
  - spec/hamlet.txt
32
35
  - spec/spec_helper.rb
33
36
  - spec/stringset_spec.rb
37
+ - stringset.gemspec
34
38
  has_rdoc: true
35
39
  homepage: http://github.com/fizx/stringset
36
40
  post_install_message: