Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Nice kanji fonts for TeX/LaTeX



On 23/02/06, Marcus Metzler <mocm@example.com> wrote:

> Creating the flash cards is not that hard.

No, it is not. :)

> Lingua::JP::Kanjidic module for PERL found here
> http://search.cpan.org/dist/Lingua-JP-Kanjidic/

Yes, I discovered this module last week, and promptly found a bug. I
need to submit a patch to the CPAN bug-tracker (hell, maybe I will
take over maintaining Simon's module, since he is out of the CPAN
world now).

Here is how to exercise the bug:


use strict;
use warnings;

use Lingua::JP::Kanjidic ();

my $x = Lingua::JP::Kanjidic->new()
  or die "$0: could not construct new Lingua::JP::Kanjidic object";

my $kanji = $x->lookup("学");


This is caused because the L::J::K object's internal {last_sought}
member is initialised to 0, not 1, as it should be (since line 0 of
the kanjidic file is a comment header). To work around it, I just do
this right after constructing the object:

$x->{last_sought} = 1;

Nasty, but it works. :)

I want a little more data on my cards than you have (since I am not
using the Heisig method), so I will keep plugging away here. Does
anyone have good ideas on how to programmatically acquire the six most
common compounds involving a specific kanji?

-Josh

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links