From: eto Date: Fri, 9 Jul 2004 15:58:35 +0000 (+0000) Subject: update. X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fruby.git;a=commitdiff_plain;h=069acda7069999c4e01b35caa9c91211ff67e55a update. --- diff --git a/Makefile b/Makefile index 0e2e233..6ac1246 100755 --- a/Makefile +++ b/Makefile @@ -5,4 +5,4 @@ tarball: cd ..; tar czvf ruby-chise.tar.gz ruby; cd ruby doc-update: - cd docs; scp * eto.com:www/2003/ruby + cd doc; scp index.html.ja index.html.en style.css eto.com:www/2003/ruby diff --git a/doc/index.html b/doc/index.html index 9f71b71..e69de29 100755 --- a/doc/index.html +++ b/doc/index.html @@ -1,377 +0,0 @@ - - - -Ruby/CHISE - - - - - -
-
- - - -

Ruby/CHISE

- -
-

■Ruby/CHISEとは

-
-
-

Ruby/CHISEは,XEmacs CHISEにおけるChaon実装をRubyへ移植することを試みたモジュールです. - -

Chaonモデルとは

-

Chaonモデルとは,文字を符号ではなく素性によって扱う方法を意味します. -

Ruby/CHISEではそれを拡張し,文字をオブジェクトとして扱っています. -

-
-
- -
-

■download

-
-
-

最新版

- - -

文字データベース

-

Ruby/CHISEを使うには,別途文字データベースを用意する必要があります. -文字データベースはXEmacs CHISEと一緒に配付されてますが, -必要な環境(GNU/Linux)を用意できない人もいるため, -文字データベースのみを取り出したファイルを用意しました. -

    -
  • 2003-11-04 : char-db.tar.gz Windows用
    -LinuxでXEmacs CHISEをinstallし,付属のmkdbtarball.rbを使った作成した.tar.gzにしたもの. -
  • 2003-11-04 : char-db-linux.tar.bz2 Linux用
    -/usr/local/lib/xemacs-21.4.12/i686-pc-linux/char-db以下をtar.bz2にしたもの. -
- -

CVS access

-

CVSによる入手もできます. -

- -

ライセンス

-

GPLです.COPYINGをごらんください.

- -
-
-
- -
-

■install

-
-
- -

chise以下を,適当なdirectoryに移動します.
-例: -

-# mv chise /usr/local/lib/ruby/site_ruby/1.8
-
-

通常,/usr/local/lib/ruby/site_ruby/以下にinstallされます. - -

拡張ライブラリは,ext以下にcdし,下記のように打ち込みます. -

-% ruby extconf.rb
-% make
-# make install
-
-

拡張ライブラリが無くても動作します.ある場合は,高速化します. - -

config

-

chise/config.rb内および,ext/config.h内にて -

DB_DIR = '/usr/local/lib/xemacs-21.4.10/i686-pc-linux/char-db'
-などを必要に応じて変更してください. -

IDS_DB_DIR = '/home/eto/work/chise/ids/''
-IDSのテキストファイルが置かれているディレクトリーを指すます.(下記の字形分解・合成についてを参照.) - -

依存関係

-

下記のパッケージが必要です. -

-

一般にRubyのパッケージは -RAAを使って探すことができます. - -

Unicode

-

現状では,Ruby/CHISEに渡す文字コードはUTF-8のUnicodeにしておくと便利です. -

将来的にはプログラム自体がSJIS,EUCなどで書かれていても -問題なく処理できるようにしたいと思っています. -

WindowsでUnicodeを使えるエディターとして,Meadow + Mule-UCSが使えます. -

フリーのUnicode対応エディターとして「サクラエディタ」が使えます. -

また,Windows付属のメモ帳も使えます. -

見るだけであればIEが使えます. -

-
-
- -
-

■使い方

-
-
- -

基本的な使い方

-
-require "chise"
-
-str = "字"		# Stringを拡張している.UTF8で与える.
-p str.ucs		# その文字のucsの値が表示される.
-p str.total_strokes	# 画数が表示される.
-p str.gb2312		# などなど.
-str.each_feature {|f, v|	# 全素性を表示する.
-  print f, ": ", v, "\n"
-}
-
- -
-
-
- -
-

■字形分解・合成

-
-
-

Ruby/CHISEは,もともと字形分解・合成を扱うために作られたため,その機能が強化されています. - -

字形分解・合成は,現在はUnicodeにおけるIDS(Ideographic Description Structure)という仕様に準拠しています. -U+2FF0〜U+2FFBで表わされるIDC(Ideographic Description Characters)によって合成方法を指定し,これに続く二文字から三文字の文字を合成して表示します. - -

IDSを使うための準備

- -

下記のようにして,IDSのテキストファイル群を持ってきます. -

% cd ~/work/chise (このディレクトリーは適宜変更する)
-% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
-password: (何も入れずにただもう一度return)
-
-% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise co -d ids ids
-
- -

このようにすると,IDSのテキストファイル群を持ってくることができます. - -

その後,chise/config.rb内の,
-IDS_DB_DIR = '/home/eto/work/chise/ids/''
-ここに,上記のIDSテキストファイル群を持ってきたディレクトリーを入れます. -このようにして適切にIDS_DB_DIRを設定し, -./tools/idsdbdumpall.rbを実行します.(かなり時間がかかります.) -これで,文字素性として新たにidsなどが加わります. - -

字形分解

-

Stringに,decompose, decompose_allという二つのメソッドがあります. -decomposeは一段階だけ分解します.decompose_allはそれを再帰的に行います. -

-p "字".decompose
-p "字".decompose_all
-p "榊".decompose
-p "榊".decompose_all
-p "終了".decompose
-p "終了".decompose_all
-p "鬱".decompose
-p "鬱".decompose_all
-
- -

最初の説明から,字形分解されて出てきた結果の文字列には, -IDSキャラクターが含まれているため,うまく表示されない場合もあります. -メモ帳だと表示できます. - -

字形合成

-

字形合成は,composeメソッドで行います. -

-p "⿰木木".compose
-
- -

findメソッドで,ある部品が漢字の一部として含まれている漢字群を探すことができます. -

-p "日雲".find
-
-

ここでは,日と雲という部品が含まれている全漢字を出力します. - -

-
-
- -
-

■説明

-
-
-

現時点では,test caseを見たほうが使い方はわかりやすいです. -

-class String
-	char	先頭の文字をCharacterに変換したものを返す
-
-class Character
-	[]	ある素性をgetします.
-	[]=	ある素性をputします.
-存在しない素性を参照したときは,nilが返えってきます.
-
- -

tools

-

詳しくはtools/READMEを参照してください. -

    -
  • define-kanji-meaning.rb : 漢字の意味による分解を行うための情報を素性として定義します. -
  • dump-database.rb : 文字データベースをテキストとしてダンプします. -
  • make-chisedb-tarball.rb : XEmacs CHISEの文字データベースを,一つのtarballにまとめます.Windowsでは使えないファイル名を適宜変更します.UNIX上で使います.Windowsでtar.gzを展開するには,eoがおすすめです. -
  • make-ids-database.rb : IDSのテキストファイル群を読みこみ,素性として使えるようにします. -
  • move-obsolete-files.rb : すでにobsoleteになった素性のBDBファイルをobsolete directoryに移動させます. -
  • rename-files.rb : 古い構造の文字データベースのディレクトリ構造を,新しいディレクトリ構造に直します. -
  • trim_bom.rb : Unicodeファイルを作ったときの先頭についてくるBOM(byte order mark)を削除します. -
-
-
-
- -
-

■付属libraryの説明

-
-
-

現時点では個々の詳細には立ち入りません. - -

    - -
  • ext/*
    -C言語版のlibchiseを用いたextensionです. - -
  • network.rb, makegraph.rb, graphviz.rb, defkanji.rb, kanjilist.rb
    -漢字の部品間の接続関係を計算します.Graphvizによるグラフ化も行います. -
    -ruby makegraph.rb
    -
    -

    Graphvizが必要です.min.svgが生成されます. - -

    -ruby defkanji.rb
    -
    -

    漢字の定義を行います. - -

  • stroke.rb, kage.rb, kageserver.rb, csf.rb
    -StrokeFontを用いるライブラリー群. -上地宏一氏によるKAGE System, 坂直純氏によるCSFという二つのStrokeFontが使えます. -別途フォントファイルが必要です.
    -csf.rb中のCSF_FONT_DIR = 'd:/work/chise/csf/'を適切に設定してください. -

    sglという独自のグラフィックライブラリーが必要ですが,これはまだ非公開です. - -

    -ruby stroke.rb
    -
    -

    漢字のCodeTableが表れ,その中の文字を表示できます. - -

    - -
-
-
-
- -
-

■discussion

-
-
-

-

Ruby/M17Nとの整合性

-

Ruby/M17Nとの整合性をどうとればいいか. -

- -

Ruby/M17Nブランチが本体に反映されるのは,ruby-1.8以降が予定されている. - -

ソースコード中のm17n.c, m17n.hが該当個所. -内部的にはUTF-8として扱えるので,それを拡張すればいいか? -UTF-8の処理への追加という形で実装できる? - -

-
-
- - - -
-

■history

-
-
-
    -
  • 2003-0110 : テスト公開 -
  • 2003-0112 : XString追加 -
  • 2003-0115 : IDSの読み込み機能β版 -
  • 2003-0116 : IDSの読み込み機能1.0 -
  • 2003-0117 : XStringを廃止し,Stringに一本化.IDSの読み込み機能を強化. -
  • 2003-0120 : IDS_Treeの読み込み機能を追加.木構造の整合性checkを追加. -
  • 2003-0130 : IDSの逆変換機能などを追加. -
  • 2003-0213 : ruby-chise-20030213.tar.bz2
    -名称をRuby/UTF-2000からRuby/CHISEへと変更. -
  • 2003-0312 : ruby-chise-20030312.tar.bz2
    -様々なライブラリを追加. -
  • 2003-1004 : ruby-chise-20031004.tar.bz2
    -新しい素性名に対応した.Copyright noticeをいれた. -
  • 2003-10-31 : LC2003にて発表. -
  • 2003-1110 : ruby-chise-20031110.tar.bz2
    -ディレクトリ構造をchise/*.rbとなるように変更.installerをつけた. -
-
-
-
- - - - - -
-
- - - diff --git a/doc/index.html.en b/doc/index.html.en new file mode 100755 index 0000000..bdf5363 --- /dev/null +++ b/doc/index.html.en @@ -0,0 +1,409 @@ + + + +Ruby/CHISE + + + + + +
+
+ + + +

Ruby/CHISE

+ +
+

What's Ruby/CHISE?

+
+
+

Ruby/CHISE is a implementation of Chaon model. + +

What's Chaon model?

+

Chan model means a model that uses a character as a bundle of +features not code point. +

Ruby/CHISE extend the model and use a character as a object. +

+
+
+ +
+

download

+
+
+

new

+ + +

CHISE Character database

+

You should have CHISE Character database to use Ruby/CHISE. +The CHISE Character database is distributed with XEmacs CHISE. +For your convenience, I provide a CHISE Chacater database tarball. + +

    +
  • 2003-11-04 : char-db.tar.gz for Windows
    +Build XEmacs CHISE on GNU/Linux, use "make-chisedb-tarball.rb" to make tarball. +
  • 2003-11-04 : char-db-linux.tar.bz2 for Linux
    +make a tarball under "/usr/local/lib/xemacs-21.4.12/i686-pc-linux/char-db" +
+ +

CVS access

+

You can access the CVS tree. +

+ +

license

+

This software is released under GPL.See COPYING.

+ +
+
+
+ +
+

install

+
+
+ +

move the direcotory "chise" to somewhere.
+eg. +

+# mv chise /usr/local/lib/ruby/site_ruby/1.8
+
+

Usually,it'll be on /usr/local/lib/ruby/site_ruby/. + +

Cd to "ext", input like this. +

+% ruby extconf.rb
+% make
+# make install
+
+

Ruby/CHISE fully functional without C extention. +If you have it, it works faster. + +

config

+

In chise/config.rb and ext/config.h, +

DB_DIR = '/usr/local/lib/xemacs-21.4.10/i686-pc-linux/char-db'
+change these lines. +

IDS_DB_DIR = '/home/eto/work/chise/ids/''
+Store IDS Text database files here. (see below "ids" section.) + +

dependency

+

You need followings. +

+

You can find Ruby package by RAA. + +

Unicode

+

Currentle, you should use utf-8 as a charset when using Ruby/CHISE. +

You can use a editor "Meadow + Mule-UCS" to use Unicode on Windows. +

There are some other free editor. +

+
+
+
+ +
+

How to

+
+
+ +

Basic

+
+require "chise"
+
+str = "字"		# extends String. use UTF-8 as charset.
+p str.ucs		# show the code_point in UCS.
+p str.total_strokes	# show the total strokes.
+p str.gb2312		# etc.
+str.each_feature {|f, v|	# show the all features.
+  print f, ": ", v, "\n"
+}
+
+ +
+
+
+ +
+

Ideographics Structure

+
+
+

I designed Ruby/CHISE for use ideographic structure of Kanji character. +

Ruby/CHISE uses IDS (Ideographic Description Structure) to describe +the ideographics structure. This is a specification in Unicode. +Start sequence with IDC(Ideographic Description Characters) (U+2FF0 to +U+2FFB) that specify the connection of the parts. Followin two or +three characters are composed. + +

preparation to use IDS

+ +

get IDS Text database by following, +

% cd ~/work/chise (change as your environment)
+% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
+password: (just hit return again)
+
+% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise co -d ids ids
+
+ +

Then, change the line in chise/config.rb. +IDS_DB_DIR = '/home/eto/work/chise/ids/''
+Input the direcoty here. + +After setting IDS_DB_DIR, run this line. +./tools/idsdbdumpall.rb (takes time a lot.) +Then, you'll have a feature like ids. + +

Decompose

+

There are two methods String#decompose, String#decompose_all. +String#decompose decmopose one level. +String#decompose_all decompose recursively. + +

+p "字".decompose
+p "字".decompose_all
+p "榊".decompose
+p "榊".decompose_all
+p "終了".decompose
+p "終了".decompose_all
+p "鬱".decompose
+p "鬱".decompose_all
+
+ +

The result is a IDS. +Many environment can not show IDC correctly. +You can see it with IE. + +

Compose

+

Use String#compose. +

+p "⿰木木".compose	# 林
+
+ +

You can find characters by using String#find method. +

+p "日雲".find
+
+

Output is a string of characters that contains "日" and "雲". +

+
+
+ +
+

usage

+
+
+

Please see test case to usage. +

+class String
+	char	convert it as Characgter.
+
+class Character
+	[]	get a feature.
+		return nil if there is no such features.
+	[]=	set a feature.
+
+ +

tools

+
+
define-kanji-meaning.rb +
add new features about the meaning of Kanji Character in IDS. +
dump-database.rb +
This tool dumps all data of the database to text files. You can see the inside of the database. +
make-chisedb-tarball.rb +
+
+Usage: make-chisedb-tarball.rb <directory of XEmacs CHISE> <tmp dir>
+
+
example.
+ % ./make-chisedb-tarball.rb /usr/local/lib/xemacs-21.4.14/i686-pc-linux
+
+ +This makes a tarball (chise-db.tar.gz) of the Chise Character DataBase +files. Set a directory that contains "chise-db" directory to the +first argument. You can input the temp directory to the second arg. +(default value: /var/tmp) + +This tools also rename the characters that contains Windows forbidden +characters. + +Please use eo to +extract the tarball on Windows. + +
make-ids-database.rb +
This tool read all of the IDS Text database, and store them as features. +This tool take time a lot. + +
move-obsolete-files.rb +
There are some obsolete features. This tool moves the obsolete files +to anothre directory. + +
rename-files.rb +
Currently, the directory tree of XEmacs CHISE and the requirement of +libchise is not same. This tool renames the old files trees to the +new file trees. + +
trim_bom.rb +
This tool remove a BOM (Byte Order Mark) in the head of file. + +
+
+
+
+ +
+

description of each library

+
+
+ +
    + +
  • ext/*
    +Extension using libchise by C. + +
  • network.rb, makegraph.rb, graphviz.rb, defkanji.rb, kanjilist.rb
    +Calculate the network of Kanji characters. +Make a graph by Graphiviz. +
    +ruby makegraph.rb
    +
    +

    You need Graphviz. Output is "min.svg". + +

    +ruby defkanji.rb
    +
    +

    define the meaning under ideographics of Kanji characters. + +

  • stroke.rb, kage.rb, kageserver.rb, csf.rb
    +Libraries to use StrokeFont. +You can use two system, KAGE by Koichi Kamichi and CSF by Saka Naozumi. +You need fonr files.
    +change the line in csf.rb, CSF_FONT_DIR = 'd:/work/chise/csf/'. +

    You need sgl (my own graphic library) to use this. sgl is not published yet. + +

    +ruby stroke.rb
    +
    +

    Show a code table and you can see the character. + +

    + +
+
+
+
+ +
+

discussion

+
+
+

+

compatibility with Ruby/M17N

+

How to make it compatible with Ruby/M17N. +

+ +
+
+
+ + + +
+

history

+
+
+
    +
  • 2003-0110 : Test +
  • 2003-0112 : add XString +
  • 2003-0115 : add reading IDS Text DB +
  • 2003-0116 : IDS Text DB 1.0 +
  • 2003-0117 : remove XString, move the methods to String. read more IDS Text DB. +
  • 2003-0120 : add IDS_Tree. check integrity of IDS Tree structure. +
  • 2003-0130 : add reverse translation of IDS. +
  • 2003-0213 : ruby-chise-20030213.tar.bz2
    +change the name to Ruby/CHISE from Ruby/UTF-2000. +
  • 2003-0312 : ruby-chise-20030312.tar.bz2
    +add some libraries. +
  • 2003-1004 : ruby-chise-20031004.tar.bz2
    +change feature names. add Copyright notice. +
  • 2003-10-31 : presentation at LC2003. +
  • 2003-1110 : ruby-chise-20031110.tar.bz2
    +change directory structure to "chise/*.rb". add installer. +
  • 2004-07-08 : ruby-chise-0.2.targz
    +add libchise extension. make many changes. +
+
+
+
+ + + + + +
+
+ + + diff --git a/doc/index.html.ja b/doc/index.html.ja new file mode 100755 index 0000000..5b878b9 --- /dev/null +++ b/doc/index.html.ja @@ -0,0 +1,396 @@ + + + +Ruby/CHISE + + + + + +
+
+ + + +

Ruby/CHISE

+ +
+

■Ruby/CHISEとは

+
+
+

Ruby/CHISEは,XEmacs CHISEにおけるChaon実装をRubyへ移植することを試みたモジュールです. + +

Chaonモデルとは

+

Chaonモデルとは,文字を符号ではなく素性によって扱う方法を意味します. +

Ruby/CHISEではそれを拡張し,文字をオブジェクトとして扱っています. +

+
+
+ +
+

■download

+
+
+

最新版

+ + +

文字データベース

+

Ruby/CHISEを使うには,別途文字データベースを用意する必要があります. +文字データベースはXEmacs CHISEと一緒に配付されてますが, +必要な環境(GNU/Linux)を用意できない人もいるため, +文字データベースのみを取り出したファイルを用意しました. +

    +
  • 2003-11-04 : char-db.tar.gz Windows用
    +LinuxでXEmacs CHISEをinstallし,付属のmkdbtarball.rbを使った作成した.tar.gzにしたもの. +
  • 2003-11-04 : char-db-linux.tar.bz2 Linux用
    +/usr/local/lib/xemacs-21.4.12/i686-pc-linux/char-db以下をtar.bz2にしたもの. +
+ +

CVS access

+

CVSによる入手もできます. +

+ +

ライセンス

+

GPLです.COPYINGをごらんください.

+ +
+
+
+ +
+

■install

+
+
+ +

chise以下を,適当なdirectoryに移動します.
+例: +

+# mv chise /usr/local/lib/ruby/site_ruby/1.8
+
+

通常,/usr/local/lib/ruby/site_ruby/以下にinstallされます. + +

拡張ライブラリは,ext以下にcdし,下記のように打ち込みます. +

+% ruby extconf.rb
+% make
+# make install
+
+

拡張ライブラリが無くても動作します.ある場合は,高速化します. + +

config

+

chise/config.rb内および,ext/config.h内にて +

DB_DIR = '/usr/local/lib/xemacs-21.4.10/i686-pc-linux/char-db'
+などを必要に応じて変更してください. +

IDS_DB_DIR = '/home/eto/work/chise/ids/''
+IDSのテキストファイルが置かれているディレクトリーを指すます.(下記の字形分解・合成についてを参照.) + +

依存関係

+

下記のパッケージが必要です. +

+

一般にRubyのパッケージは +RAAを使って探すことができます. + +

Unicode

+

現状では,Ruby/CHISEに渡す文字コードはUTF-8のUnicodeにしておくと便利です. +

将来的にはプログラム自体がSJIS,EUCなどで書かれていても +問題なく処理できるようにしたいと思っています. +

WindowsでUnicodeを使えるエディターとして,Meadow + Mule-UCSが使えます. +

フリーのUnicode対応エディターとして「サクラエディタ」が使えます. +

また,Windows付属のメモ帳も使えます. +

見るだけであればIEが使えます. +

+
+
+ +
+

■使い方

+
+
+ +

基本的な使い方

+
+require "chise"
+
+str = "字"		# Stringを拡張している.UTF8で与える.
+p str.ucs		# その文字のucsの値が表示される.
+p str.total_strokes	# 画数が表示される.
+p str.gb2312		# などなど.
+str.each_feature {|f, v|	# 全素性を表示する.
+  print f, ": ", v, "\n"
+}
+
+ +
+
+
+ +
+

■字形分解・合成

+
+
+

Ruby/CHISEは,もともと字形分解・合成を扱うために作られたため,その機能が強化されています. + +

字形分解・合成は,現在はUnicodeにおけるIDS(Ideographic Description Structure)という仕様に準拠しています. +U+2FF0〜U+2FFBで表わされるIDC(Ideographic Description Characters)によって合成方法を指定し,これに続く二文字から三文字の文字を合成して表示します. + +

IDSを使うための準備

+ +

下記のようにして,IDSのテキストファイル群を持ってきます. +

% cd ~/work/chise (このディレクトリーは適宜変更する)
+% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
+password: (何も入れずにただもう一度return)
+
+% cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/chise co -d ids ids
+
+ +

このようにすると,IDSのテキストファイル群を持ってくることができます. + +

その後,chise/config.rb内の,
+IDS_DB_DIR = '/home/eto/work/chise/ids/''
+ここに,上記のIDSテキストファイル群を持ってきたディレクトリーを入れます. +このようにして適切にIDS_DB_DIRを設定し, +./tools/idsdbdumpall.rbを実行します.(かなり時間がかかります.) +これで,文字素性として新たにidsなどが加わります. + +

字形分解

+

Stringに,decompose, decompose_allという二つのメソッドがあります. +decomposeは一段階だけ分解します.decompose_allはそれを再帰的に行います. +

+p "字".decompose
+p "字".decompose_all
+p "榊".decompose
+p "榊".decompose_all
+p "終了".decompose
+p "終了".decompose_all
+p "鬱".decompose
+p "鬱".decompose_all
+
+ +

最初の説明から,字形分解されて出てきた結果の文字列には, +IDSキャラクターが含まれているため,うまく表示されない場合もあります. +メモ帳だと表示できます. + +

字形合成

+

字形合成は,composeメソッドで行います. +

+p "⿰木木".compose
+
+ +

findメソッドで,ある部品が漢字の一部として含まれている漢字群を探すことができます. +

+p "日雲".find
+
+

ここでは,日と雲という部品が含まれている全漢字を出力します. + +

+
+
+ +
+

■説明

+
+
+

現時点では,test caseを見たほうが使い方はわかりやすいです. +

+class String
+	char	先頭の文字をCharacterに変換したものを返す
+
+class Character
+	[]	ある素性をgetします.
+		存在しない素性を参照したときは,nilが返えってきます.
+	[]=	ある素性をputします.
+
+ +

tools

+
+
define-kanji-meaning.rb +
漢字の意味による分解を行うための情報を素性として定義します. +
dump-database.rb +
文字データベースをテキストとしてダンプします.中身を見ることができます. +
make-chisedb-tarball.rb +
+
+Usage: make-chisedb-tarball.rb <directory of XEmacs CHISE> <tmp dir>
+
+
example.
+ % ./make-chisedb-tarball.rb /usr/local/lib/xemacs-21.4.14/i686-pc-linux
+
+ +XEmacs CHISEの文字データベースを,一つのtarballにまとめます.Windowsで +は使えないファイル名を適宜変更します.UNIX上で使います. + +Windowsでtar.gzを展開するには, +eoがおすすめです. + +
make-ids-database.rb +
IDSのテキストファイル群を読みこみ,素性として使えるようにします. +実行には時間がかかります. + +
move-obsolete-files.rb +
すでにobsoleteになった素性のBDBファイルをobsolete directoryに移動させます. + +
rename-files.rb +
古い構造の文字データベースのディレクトリ構造を,新しいディレクトリ構造に直します. + +
trim_bom.rb +
Unicodeファイルを作ったときの先頭についてくるBOM(byte order mark)を削除します. + +
+
+
+
+ +
+

■付属libraryの説明

+
+
+ +
    + +
  • ext/*
    +C言語版のlibchiseを用いたextensionです. + +
  • network.rb, makegraph.rb, graphviz.rb, defkanji.rb, kanjilist.rb
    +漢字の部品間の接続関係を計算します.Graphvizによるグラフ化も行います. +
    +ruby makegraph.rb
    +
    +

    Graphvizが必要です.min.svgが生成されます. + +

    +ruby defkanji.rb
    +
    +

    漢字の定義を行います. + +

  • stroke.rb, kage.rb, kageserver.rb, csf.rb
    +StrokeFontを用いるライブラリー群. +上地宏一氏によるKAGE System, 坂直純氏によるCSFという二つのStrokeFontが使えます. +別途フォントファイルが必要です.
    +csf.rb中のCSF_FONT_DIR = 'd:/work/chise/csf/'を適切に設定してください. +

    sglという独自のグラフィックライブラリーが必要ですが,これはまだ非公開です. + +

    +ruby stroke.rb
    +
    +

    漢字のCodeTableが表れ,その中の文字を表示できます. + +

    + +
+
+
+
+ +
+

■discussion

+
+
+

+

Ruby/M17Nとの整合性

+

Ruby/M17Nとの整合性をどうとればいいか. +

+ +
+
+
+ + + +
+

■history

+
+
+
    +
  • 2003-0110 : テスト公開 +
  • 2003-0112 : XString追加 +
  • 2003-0115 : IDSの読み込み機能β版 +
  • 2003-0116 : IDSの読み込み機能1.0 +
  • 2003-0117 : XStringを廃止し,Stringに一本化.IDSの読み込み機能を強化. +
  • 2003-0120 : IDS_Treeの読み込み機能を追加.木構造の整合性checkを追加. +
  • 2003-0130 : IDSの逆変換機能などを追加. +
  • 2003-0213 : ruby-chise-20030213.tar.bz2
    +名称をRuby/UTF-2000からRuby/CHISEへと変更. +
  • 2003-0312 : ruby-chise-20030312.tar.bz2
    +様々なライブラリを追加. +
  • 2003-1004 : ruby-chise-20031004.tar.bz2
    +新しい素性名に対応した.Copyright noticeをいれた. +
  • 2003-10-31 : LC2003にて発表. +
  • 2003-1110 : ruby-chise-20031110.tar.bz2
    +ディレクトリ構造をchise/*.rbとなるように変更.installerをつけた. +
  • 2004-07-08 : ruby-chise-0.2.targz
    +libchiseに対応した.他,多数の変更. +
+
+
+
+ + + + + +
+
+ + + diff --git a/tools/README b/tools/README index 2624541..e69de29 100755 --- a/tools/README +++ b/tools/README @@ -1,51 +0,0 @@ -* tools for Chise Character DataBase management - -** define-kanji-meaning.rb - -add new features about the meaning of Kanji Character in IDS. - -** dump-database.rb - -This tool dumps all data of the database to text files. -You can see the inside of the database. It's convenient. - -** make-chisedb-tarball.rb - - Usage: make-chisedb-tarball.rb - -example. - % ./make-chisedb-tarball.rb /usr/local/lib/xemacs-21.4.14/i686-pc-linux - -This makes a tarball (chise-db.tar.gz) of the Chise Character DataBase -files. Set a directory that contains "chise-db" directory to the -first argument. You can input the temp directory to the second arg. -(default value: /var/tmp) - -This tools also rename the characters that contains Windows forbidden -characters. - - < > * ? ¨ ( ) + ! - -** make-ids-database.rb - -This tool read the all of IDS test files, parse them and store them to -BDB files. Then, you can use some ids features as normal features. -It's very slow. It takes time almost 1 hour. - -** move-obsolete-files.rb - -There are some obsolete features. This tool moves the obsolete files -to a directory. - -** rename-files.rb - -Currently, the directory tree of XEmacs CHISE and the requirement of -libchise is not same. This tool renames the old files trees to the -new file trees. - -** trim_bom.rb - -This tool remove a BOM (Byte Order Mark) in the head of file. - -==== -Kouichirou Eto, http://eto.com/