bayon 0.1.1-mswin32 → 0.1.4-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/bayon.rb +19 -0
  2. data/lib/i386-mswin32/bayonext.so +0 -0
  3. metadata +15 -6
@@ -45,7 +45,26 @@ module Bayon
45
45
  end
46
46
  end
47
47
 
48
+ def delete_document(label)
49
+ @documents.delete_if {|l, f| l == label }
50
+ end
51
+
52
+ def [](label)
53
+ label, features = @documents.assoc(label)
54
+ return features
55
+ end
56
+
57
+ def labels
58
+ @documents.map {|l, f| l }
59
+ end
60
+
61
+ def clear
62
+ @documents.clear
63
+ end
64
+
48
65
  def do_clustering(method = Analyzer::REPEATED_BISECTION)
66
+ return [] if @documents.empty?
67
+
49
68
  analyzer = Analyzer.new
50
69
  analyzer.set_cluster_size_limit(@cluster_size_limit) if @cluster_size_limit
51
70
  analyzer.set_eval_limit(@eval_limit) if @eval_limit
Binary file
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bayon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 4
9
+ version: 0.1.4
5
10
  platform: mswin32
6
11
  authors:
7
12
  - winebarrel
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-06-24 00:00:00 +09:00
17
+ date: 2010-05-27 00:00:00 +09:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -28,6 +33,8 @@ files:
28
33
  - COPYING
29
34
  has_rdoc: true
30
35
  homepage: http://bayon.rubyforge.org
36
+ licenses: []
37
+
31
38
  post_install_message:
32
39
  rdoc_options:
33
40
  - --title
@@ -39,20 +46,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
39
46
  requirements:
40
47
  - - ">="
41
48
  - !ruby/object:Gem::Version
49
+ segments:
50
+ - 0
42
51
  version: "0"
43
- version:
44
52
  required_rubygems_version: !ruby/object:Gem::Requirement
45
53
  requirements:
46
54
  - - ">="
47
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
48
58
  version: "0"
49
- version:
50
59
  requirements: []
51
60
 
52
61
  rubyforge_project: bayon
53
- rubygems_version: 1.3.1
62
+ rubygems_version: 1.3.6
54
63
  signing_key:
55
- specification_version: 2
64
+ specification_version: 3
56
65
  summary: Ruby bindings for bayon.
57
66
  test_files: []
58
67