From 2a5ce8fe19897f306bc3ae1387a9fb183c274511 Mon Sep 17 00:00:00 2001 From: moro Date: Wed, 12 Mar 2003 17:00:47 +0000 Subject: [PATCH] add two sample files. --- sample1.pl | 5 +++++ sample2.pl | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 sample1.pl create mode 100644 sample2.pl diff --git a/sample1.pl b/sample1.pl new file mode 100644 index 0000000..c651543 --- /dev/null +++ b/sample1.pl @@ -0,0 +1,5 @@ +use CHISE; + +my $s1 = CHISE->new(ideograph_daikanwa => 6942); # 「字」 +print $s1->dumpAttr; +print $s1->strokes, "\n"; # ø½Šæ•°ã‚’表示 diff --git a/sample2.pl b/sample2.pl new file mode 100644 index 0000000..7c9833c --- /dev/null +++ b/sample2.pl @@ -0,0 +1,18 @@ +# compareのsample +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"; +} -- 1.7.10.4