i
[chise/ruby.git] / chise / network.rb
index 18bb9a7..ed0d679 100755 (executable)
@@ -1,25 +1,25 @@
 # Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved.
 
-$LOAD_PATH << "../../lib" if $0 == __FILE__
-require "chise"
-include CHISE
+require "chise/char"
 require "chise/kanjilist"
 require "chise/defkanji"
 require "chise/graphviz"
 
 module CHISE
-  class KanjiNetwork #=========================漢字間のネットワークを計算する。
+  class KanjiNetwork # 漢字間のネットワークを計算する
     def initialize()
       reset()
       @formatter = GraphvizFormatter.new(self)
       # @formatter = XSpringiesFormatter.new(self)
     end
     attr_reader :h, :list
+
     def reset
       @h = Hash.new
       @done = Hash.new
       @list = []
     end
+
     def make_network(list) #@h, @listに結果を入れていく。
       list.each_char {|ch|
        make_network_one(ch)
@@ -72,13 +72,15 @@ module CHISE
     def out(filename)
       open(filename, "w"){|out| out.print to_s }
     end
+
     def to_s() @formatter.to_s; end
   end
 
-  class GraphvizFormatter #======================================== Graphviz関係
+  class GraphvizFormatter # Graphviz関係
     def initialize(network)
       @network = network
     end
+
     def to_s() #Graphvizのフォーマット、dotフォーマットに変換する。
       page = DotPage.new
       page.size = "5.5, 5.5"
@@ -118,7 +120,7 @@ module CHISE
     end
   end
 
-  class XSpringiesFormatter #=================================================
+  class XSpringiesFormatter
     def initialize(network)
       @network = network
     end