Mailing List Archive


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

Re: [tlug] kanji dictionary-eijiro



After using the EIJIRO dictionary in epwing form as described in my
previous post I found that the script for converting the EIJIRO removes
the kanji readings.  This saves about 10 meg on the compressed
dictionary but is not really desirable for no Japanese speakers.

#du -s *
110458	eijiro
103822	eijiro-old

I have made some modification to the script so that the readings are
kept.  Below is a diff of the files.

--- ../eijiro-fpw1.0b.orig/eijiro-fpw.pl        2003-03-30
23:04:29.000000000 +0900
+++ eijiro-fpw.pl       2003-03-30 23:07:51.000000000 +0900
@@ -395,7 +395,6 @@
        my(@example.com, $char, $next, $mean, $yorei);
 
        $mean = shift(@example.com);
-       $mean =~ s/\x81\x6f(?:$hiragana|\x81[\x5e\x69\x6a]|
)+\x81\x70//g;
 
        @example.com = unpack('C*', $mean);
        $mean = '';
@@ -429,6 +428,10 @@
                                $mean .= '[';
                        } elsif (0x6e == $next) {               # 
                                $mean .= ']';
+                       } elsif (0x6f == $next) {               # ->
+                               $mean .= pack('CC',0x81,0x6b);
+                       } elsif (0x70 == $next) {               #-> 
+                               $mean .= pack('CC',0x81,0x6c);
                        } elsif (0x7b == $next) {               # 
                                $mean .= '+';
                        } elsif (0x7c == $next) {               # 


-- 
Edward Middleton <edwardmiddleton@example.com>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links