[CHISE] [XEmacs CHISE] [Ruby/CHISE] [Perl/CHISE] [TopicMaps] [IDS] [glyph] [Visualization] [Ω]
CHISE 文字データベース(現状では XEmacs CHISE 用の Berkeley DB 版文字データベース)を Perl からアクセスするモジュールを 開発しています。 現在、CHISE.pm と CHISE_REG.pm の 2モジュールがあります。
CHISE
use CHISE; my $s1 = CHISE->define_char(strokes => 12, radical => 9); my $s2 = CHISE->define_char(strokes => 12, radical => 9, ideograph_daikanwa => 694); my $c = $s1->compare($s2); if ($c == $CHISE::EXCLUSIVE) { print "排他的\n"; } elsif ($c == $CHISE::HAVE_INTERSECTION) { print "共通部分あり\n"; } elsif ($c == $CHISE::PROPER_SUBSET) { print "完全部分集合\n"; } elsif ($c == $CHISE::PROPER_SUPERSET) { print "完全上位集合\n"; } elsif ($c == $CHISE::EQSET) { print "完全一致\n"; }
new(属性名=>値)
define_char(属性名=>値[, ...])
dump_attr
add_attr(属性名=>値)
del_attr(属性名)
compare(オブジェクト名)
CHISE_REG
#!/usr/bin/perl -w use CHISE_REG; use utf8; if ('山川' =~ /(.)\same_total-strokes_1/) { print STDERR "matched!\n"; } else { print STDERR "unmatched...\n"; }
[戻る]
Last modified: Thu Mar 13 01:54:38 JST 2003 .