root/lang/ruby/ruby-bayon/trunk/README @ 34106

Revision 34106, 1.4 kB (checked in by winebarrel, 5 years ago)

bayon 0.0.4にあわせて類似度を表示するオプションを追加

Line 
1= bayon/Ruby
2
3Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
4
5== Description
6
7Ruby bindings for bayon.
8
9see {bayon}[http://code.google.com/p/bayon/].
10
11== Install
12
13gem install bayon
14
15== Example
16
17    require 'bayon'
18   
19    docs = Bayon::Documents.new
20    docs.cluster_size_limit = 3
21    docs.add_document('Jacob'   , 'J-POP' => 10, 'J-R&B' => 6, 'Rock' => 4)
22    docs.add_document('Emma'    , 'Jazz' =>  8, 'Reggae'=> 9)
23    docs.add_document('Michael' , 'Classical music' => 4, 'World music' => 4)
24    docs.add_document('Isabella', 'Jazz' => 9, 'Metal' => 2, 'Reggae' => 6)
25    docs.add_document('Ethan'   , 'J-POP' => 4, 'Rock' => 3, 'Hip hop' => 3)
26    docs.add_document('Emily'   , 'Classical music' =>  8, 'Rock' => 1)
27   
28    result = docs.do_clustering
29    #=> [["Emma", "Isabella"], ["Jacob", "Ethan"], ["Michael", "Emily"]]
30   
31    result.each do |labels|
32      puts labels.join(', ')
33    end
34   
35    docs.output_similairty_point = true
36    result = docs.do_clustering
37   
38    result.each do |label_points|
39      puts label_points.map {|label, point|
40        "#{label}(#{point})"
41      }.join(', ')
42    end
43
44== Project Page
45
46http://rubyforge.org/projects/bayon
47
48== Source Code
49
50http://coderepos.org/share/browser/lang/ruby/ruby-bayon
51
52== License
53
54bayon/Ruby is distributed under the GNU General Public License.
55
56see COPYING.
57
58== Requirements
59
60* {bayon - simple and fast clustering tool}[http://code.google.com/p/bayon/]
Note: See TracBrowser for help on using the browser.