1Text::Kakasi::JP(3)   User Contributed Perl Documentation  Text::Kakasi::JP(3)
2
3
4

NAME

6       Text::Kakasi::JP - Text::Kakasi ueEeUeXiXEXXaaXaXoXE
7

SYNOPSIS

9         use Text::Kakasi;
10         # functional
11         $res = Text::Kakasi::getopt_argv('kakasi', '-ieuc', '-w');
12         $str = Text::Kakasi::do_kakasi($japanese_text);
13         # object-oriented
14         $obj = Text::Kakasi->new('-ieuc','-w');
15         $str = $obj->get($japanese_text);
16

DESCRIPTION

18       EeUeXaXXXaaXXXeeXIekakasi (kanji kana simple
19       inverter)XOXIXXXoXXXXXO~XXXXXX
20       XoAeoXXXXXLPXXXXkakasiXXAeoXXXXXeeXIXIeXXinput
21       methodXEXO~XXXXXEXieXAXXXEXAXu
22       XLPXXXeEXXoXOXeXXXEXXXXXXXXXEXXXiXXXLPXuXEXEXEeXO~EN~XXXXXeeXXCXXCXXXXkakasi
23       XIeXLPXXEXXn~XIEXXXXAXn~XXEeXaIoIN~XXXeeXXXEXXXCXXLPXXXXXUeXXXXXIe
24       <http://kakasi.namazu.org/> XoXaeIXXXXXXXXX
25
26       Text::Kakasi
27       XIeXXAaAAayAaXXEXOXoXUXXXXXXXeXOXXXOeXXXXXXXEXOXbpXIAD‐EyXIXXXo
28       XXXXXO~XXXXXXXoAeoXXXXXLPXXXXXOXoXUXXXXXIEyXIe ver. 1.05 XE 100%
29       XssXXXCXX XXXXPerl 5.8
30       XEXssXIXXXXCXXoXEXXXEeXIeXXXOeXXXXXXXEXOXbpXXXoXXXXXO~XXXXXXXo
31       XEXXEXIXXXXXXeXLPXXXX
32

Functional APIs

34       A~iXO~:XEXXXIAaIAXCXIe "Text::Kakasi::"
35       XIeXEIXXXXXXXLPXXXXXCXO~XXXeeXEXCXIe Text::Kakasi XIeXXXa export
36       XXXLPXXXoXXXEXXXIXOXoXo import XXXeeXEeXIeXXIa~
37       XXXD‐XEXXXIXeXXXEeXXXLPXXXX
38
39         use Text::Kakasi qw/getopt_argv do_kakasi/;
40
41       $err = getopt_argv($arg1, $arg2, ...)
42           kakasiXoXeXueXXXXXLPXXXXXuXoXIekakasiXIXXXXXXXcXoXEXAauXCXXXXXEXXXIe
43           kakasi 2.3.4 XEeXXXXXeeXXXXXXXcXoXIXXIXXCXXXX
44
45             -a[jE] -j[aE] -g[ajE] -k[ajKH]
46             -E[aj] -K[ajkH] -H[ajkK] -J[ajkKH]
47             -i{oldjis,newjis,dec,euc,sjis}
48              -o{oldjis,newjis,dec,euc,sjis}
49             -r{hepburn,kunrei} -p -s -f -c"chars"
50              [jisyo1, jisyo2,,,]
51
52             Character Sets:
53                  a: ascii  j: jisroman  g: graphic  k: kana
54                  (j,k     defined in jisx0201)
55                  E: kigou  K: katakana  H: hiragana J: kanji
56                  (E,K,H,J defined in jisx0208)
57
58             Options:
59               -i: input coding system    -o: output coding system
60               -r: romaji conversion system
61               -p: list all readings (with -J option)
62               -s: insert separate characters (with -J option)
63               -f: furigana mode (with -J option)
64               -c: skip chars within jukugo
65                   (with -J option: default TAB CR LF BLANK)
66               -C: romaji Capitalize (with -Ja or -Jj option)
67               -U: romaji Upcase     (with -Ja or -Jj option)
68               -u: call fflush() after 1 character output
69               -w: wakatigaki mode
70
71           EeUeXOXoXIeXXAXXuXbpXEe0XoXXXXCOXbpXEeXIeXXXiXEXXXIA~IXoEOeXXXLPXXXX
72
73       $processed_str = do_kakasi($str)
74           $strXEeAD‐XXXkakasiXoXAXOXXXXXeeXIXoEOeXXXLPXXXXXXXeXXXIIaeAeXXEXAXXXXX
75           XiXcXX"undef"XoEOeXXXLPXXXX
76
77           Ver. 1.x
78           XEXUXEXeXXXuXoXIXCXeXEe"kakasi"XoXAeXXXeeEXIXXIeXXXeXLPXXXoXXXaXA
79           XiXoXXXLPXCXEXXXeXAeXXXXaXXXXXLPXXXoXX
80
81       close_kanwadic()
82           XAaXXAaXXEeopenXXXiXXX‐
83           Xn~XO~XXXXXeeXocloseXXXLPXXXXEeUeXOXoXIeXaXiXIXssXXAXIXss
84           XIXXXaXEeAXXssXXXXXXXssXCXIeIoIN~XXXeeEXIXXIeXLPXXXEXXXCXXXcXXXX
85

Object-Oriented APIs

87       Version 2.0
88       XeXeXXEeUeXaXXXaaXXXeeXIeXXXOeXXXXXXXEXOXbp(OOP)XIAPIXaAeoXXXXXLPXXXX
89
90       $k = Text::Kakasi->new($args ...)
91           XXXOeXXXXXXXEXoAXAXXXXLPXXXXXuXoXXAXXssXXXeeXiXcXIeXX
92           "Text::Kakasi->new->set($args ...)"  XXXXXIXEXXXXeeXIXEXEXeXLPXXXX
93
94       $k->set($args ...)
95           "getopt_argv" XOXIOOPXXXoXXXXXO~XXXXXXXX
96
97             my $k = Text::Kakasi->new;
98             $k->set('-w'); # Text::Kakasi::getopt_argv('-w');
99
100           XXXXXXXXXXoEOeXX "getopt_argv()" XEXIeXUXEXeXX "set"
101           XIeXieXEeXXXOeXXXXXX XEXXXEXoEOeXXXIXCXXXEXXXIXeXXXEEXX‐
102           XXXAeCXXCXXXX
103
104             my $tokenized = $k->set('-w')->get($raw_japanese);
105
106           XXXXXXXXXXXIssXXXXXiXcXEeXIeXX "$k->error" XoXEXXXLPXXXX
107
108       $k->error
109           XCXaaXEeXXD‐XiXXXaXXXA~XEXIXXXXXXXXXXoEOeXXXLPXXXX
110
111       $processed = $k->get($raw_japanese);
112           "do_kakasi"
113           XOXIOOPXXXoXXXXXO~XXXXXXXXXEXXXIoXAeXIXXXXXEXIeAauXAXCXXXX
114
115             # Functional
116             getopt_argv('-w'); $processed = do_kakasi($raw_japanese);
117             # OOP
118             $k->set('-w')->get($raw_japanese);
119

Perl 5.8 Features

121       Perl 5.8
122       XCXXEXXuXXXXXEEN~XXXIEXXaAaXXEIeEAEXssXXEncodeXaXXXaaXXXeeXEeXeXA~
123       XAeoXXXXXiXLPXXXXXXEeUeXaXXXaaXXXeeXIe perl 5.8
124       XEXssXEeXXXXIXXCXXoIoIN~XXXeeXe XXXEeXEXA~XXXXLPXXXX
125
126       "$k->set($args ...)"XOXIXuXoXEeXX"-iI<encoding>" XXXeXO
127       "-oI<encoding>"XXXXXLPXLPXiXeeXiXcXXEXXuXXXXXEEN~XXXIeEncodeXXXOXXXLPXXXX
128       XuXoXEeXIekakasiXXXXXYXXXEXXXXXXeeXaXIXEXXXEeXaXXEncodeXXXXXYXXXEXXX-1AE
129       XXXeeXaXIXIeAXXXEXXXLPXXXX Ia~XXXD‐XX
130
131         $result = $k->set(qw/-iutf8 -outf8 -w/)->get($utf8);
132
133       XIeXEXXXEXUXUeXXAXCXXXX
134
135         $euc = encode('eucjp' => $utf8);
136         getopt_argv('-w');
137         $tmp = do_kakasi($euc);
138         $result = decode('eucjp' => $tmp);
139
140       "-outf8",XXXLPXLPXiXXXXeeXiXcXIeXX "$k->get" XIeutf8XO~XeXXEO~XXIEXXu
141       IoXoEOeXXXLPXXXX
142
143       XXXiXeXIXXCXXIeXX
144       $Text::Kakasi::HAS_ENCODEXEe0XoAssAeeXXXeeXXXEXCIoIN~XX
145       XEXXXeXXXEeXXXeeXXXEXaXAeCXXCXXXXAeIXieEN~XoXIeXXEeUeXaXXXaaXXXeeXouseXXXXXYXEeXX
146       XAaXXEeAssAeeXXXiXLPXXXX
147

SEE ALSO

149       kakasi(1), <http://kakasi.namazu.org/>,Encode,perlunicode
150
152         (C) 1998, 1999, 2000 NOKUBI Takatsugu <knok@daionet.gr.jp>
153         (C) 2003 Dan Kogai <dankogai@dan.co.jp>
154
155       There is no warranty for this free software. Anyone can modify and/or
156       redistribute this module under GNU GENERAL PUBLIC LICENSE. See COPYING
157       file that is included in the archive for more details.
158
159
160
161perl v5.12.0                      2003-05-26               Text::Kakasi::JP(3)
Impressum