bayon/Ruby /

Filename Size Date modified Message
bayon
ext
lib
lib1.9
sparsehash
stdint-20070624
79 B
232 B
17.6 KB
1.4 KB
694 B
627 B
697 B
543 B
1.4 KB
12.7 KB
= bayon/Ruby

Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>

== Description

Ruby bindings for bayon.

see {bayon}[http://code.google.com/p/bayon/].

== Install

gem install bayon

== Example

    require 'bayon'
    
    docs = Bayon::Documents.new
    docs.cluster_size_limit = 3
    docs.add_document('Jacob'   , 'J-POP' => 10, 'J-R&B' => 6, 'Rock' => 4)
    docs.add_document('Emma'    , 'Jazz' =>  8, 'Reggae'=> 9)
    docs.add_document('Michael' , 'Classical music' => 4, 'World music' => 4)
    docs.add_document('Isabella', 'Jazz' => 9, 'Metal' => 2, 'Reggae' => 6)
    docs.add_document('Ethan'   , 'J-POP' => 4, 'Rock' => 3, 'Hip hop' => 3)
    docs.add_document('Emily'   , 'Classical music' =>  8, 'Rock' => 1)
    
    result = docs.do_clustering
    #=> [["Emma", "Isabella"], ["Jacob", "Ethan"], ["Michael", "Emily"]]
    
    result.each do |labels|
      puts labels.join(', ')
    end
    
    docs.output_similairty_point = true
    result = docs.do_clustering
    
    result.each do |label_points|
      puts label_points.map {|label, point|
        "#{label}(#{point})"
      }.join(', ')
    end

== Project Page

http://rubyforge.org/projects/bayon

== Source Code

http://coderepos.org/share/browser/lang/ruby/ruby-bayon

== License

bayon/Ruby is distributed under the GNU General Public License.

see COPYING.

== Requirements

* {bayon - simple and fast clustering tool}[http://code.google.com/p/bayon/]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.