OSDN Git Service

perl module & chmod +x tests/*.sh
[chasen-legacy/chasen.git] / perl / ChaSen.pm
1 #
2 # $Id: ChaSen.pm,v 1.2 2008/07/22 13:00:45 masayu-a Exp $
3
4 package Text::ChaSen;
5
6 =head1 NAME
7
8 Text::ChaSen - ChaSen library module for perl
9
10 =head1 SYNOPSIS
11
12  use Text::ChaSen;
13
14  $res = Text::ChaSen::getopt_argv('chasen-perl', '-j', '-F', '%m ');
15  $str = Text::ChaSen::sparse_tostr("ÆüËܸì¤Îʸ»úÎó");
16
17 =head1 DESCRIPTION
18
19 ¤³¤Î¥â¥¸¥å¡¼¥ë¤Ï¡¢ÆàÎÉÀèü²Ê³Øµ»½ÑÂç³Ø¤¬³«È¯¤·¤¿ÆüËܸì·ÁÂÖÁDzòÀÏ
20 ¥½¥Õ¥È¥¦¥§¥¢"Ããä¥"¤òperl¤«¤é»È¤¦¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£
21
22 =over 4
23
24 =item getopt_argv($arg1, $arg2, ...)
25
26 Ãã䥤˥ª¥×¥·¥ç¥ó¤òÅϤ·¡¢½é´ü²½¤ò¹Ô¤¦¡£¥ª¥×¥·¥ç¥ó¤Ï¡¢chasen¥³¥Þ¥ó¥É
27 ¤Ë»ØÄê¤Ç¤­¤ë¤â¤Î¤Ë½à¤º¤ë¤¬¡¢C<-s>¤äC<-D>¤Ê¤É¤Î¥µ¡¼¥Ð¤ä¥¯¥é¥¤¥¢¥ó¥È¤Ë´Ø¤¹¤ë
28 ¥ª¥×¥·¥ç¥ó¤ÏÍøÍѤǤ­¤Ê¤¤¡£
29 ¤Þ¤¿¡¢°ìÈֺǽé¤Î¥ª¥×¥·¥ç¥ó¤Ï¥×¥í¥°¥é¥à¤Î¥Õ¥¡¥¤¥ë̾¤Ç¤¢¤ë¡£
30
31 Î㤨¤Ð¡¢¼¡¤Î¤è¤¦¤Ê°ú¿ô¤Ç¼Â¹Ô¤·¤¿chasen¥³¥Þ¥ó¥É¤¬¤¢¤ë¡£
32
33 $ chasen C<-j> C<-F> '%m '
34
35 ¤³¤ì¤ÈƱ¤¸µóÆ°¤ò¤µ¤»¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ê°ú¿ô¤Çgetopt_argv¤ò¸Æ¤Ó½Ð¤¹¡£
36
37 getopt_argv('chasen', 'C<-j>', 'C<-F>', '%m ');
38
39 =item sparse_tostr($str)
40
41 ·ÁÂÖÁDzòÀϤò¹Ô¤¤¡¢·ë²Ì¤òʸ»úÎó¤È¤·¤ÆÊÖ¤¹¡£
42
43 =item sparse_tostr_long($str)
44
45 ·ÁÂÖÁDzòÀϤò¹Ô¤¤¡¢·ë²Ì¤òʸ»úÎó¤È¤·¤ÆÊÖ¤¹¡£¤³¤Î´Ø¿ô¤Ï¡¢°ÊÁ°¤Î¥Ð¡¼¥¸¥ç¥ó
46 ¤È¤Î¸ß´¹À­¤Î¤¿¤á¤À¤±¤Ë¸ºß¤¹¤ë¡£
47
48 =back
49
50 =head1 COPYRIGHT
51
52 Copyright(c) 1998, 1999 NOKUBI Takatsugu <knok@daionet.gr.jp>
53 Copyright(c) 1997 Nara Institute of Science and Technorogy.
54 All Rights Reserved.
55
56 Use, reproduction, and distribution of this software is permitted.
57 Any copy of this software, whether in its original form or modified,
58 must include both the above copyright notice and the following
59 paragraphs.
60
61 Nara Institute of Science and Technology (NAIST),
62 the copyright holders, disclaims all warranties with regard to this
63 software, including all implied warranties of merchantability and
64 fitness, in no event shall NAIST be liable for
65 any special, indirect or consequential damages or any damages
66 whatsoever resulting from loss of use, data or profits, whether in an
67 action of contract, negligence or other tortuous action, arising out
68 of or in connection with the use or performance of this software.
69
70 The Japanese morphological dictionary included in this system
71 originates from ICOT Free Software.  The following conditions for ICOT
72 Free Software applies to the morphological dictionary of the system.
73
74 Each User may also freely distribute the Program, whether in its
75 original form or modified, to any third party or parties, PROVIDED
76 that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
77 on, or be attached to, the Program, which is distributed substantially
78 in the same form as set out herein and that such intended
79 distribution, if actually made, will neither violate or otherwise
80 contravene any of the laws and regulations of the countries having
81 jurisdiction over the User or the intended distribution itself.
82
83 NO WARRANTY
84
85 The program was produced on an experimental basis in the course of the
86 research and development conducted during the project and is provided
87 to users as so produced on an experimental basis.  Accordingly, the
88 program is provided without any warranty whatsoever, whether express,
89 implied, statutory or otherwise.  The term "warranty" used herein
90 includes, but is not limited to, any warranty of the quality,
91 performance, merchantability and fitness for a particular purpose of
92 the program and the nonexistence of any infringement or violation of
93 any right of any third party.
94
95 Each user of the program will agree and understand, and be deemed to
96 have agreed and understood, that there is no warranty whatsoever for
97 the program and, accordingly, the entire risk arising from or
98 otherwise connected with the program is assumed by the user.
99
100 Therefore, neither ICOT, the copyright holder, or any other
101 organization that participated in or was otherwise related to the
102 development of the program and their respective officials, directors,
103 officers and other employees shall be held liable for any and all
104 damages, including, without limitation, general, special, incidental
105 and consequential damages, arising out of or otherwise in connection
106 with the use or inability to use the program or any product, material
107 or result produced or otherwise obtained by using the program,
108 regardless of whether they have been advised of, or otherwise had
109 knowledge of, the possibility of such damages at any time during the
110 project or thereafter.  Each user will be deemed to have agreed to the
111 foregoing by his or her commencement of use of the program.  The term
112 "use" as used herein includes, but is not limited to, the use,
113 modification, copying and distribution of the program and the
114 production of secondary products from the program.
115
116 In the case where the program, whether in its original form or
117 modified, was distributed or delivered to or received by a user from
118 any person, organization or entity other than ICOT, unless it makes or
119 grants independently of ICOT any specific warranty to the user in
120 writing, such person, organization or entity, will also be exempted
121 from and not be held liable to the user for any such damages as noted
122 above as far as the program is concerned.
123
124 =cut
125
126 require Exporter;
127 require DynaLoader;
128
129 @ISA = qw(Exporter DynaLoader);
130
131 @EXPORT_OK = qw(getopt_argv sparse_tostr fparse_tostr sparse_tostr_long);
132 %EXPORT_TAGS = (all => [qw(getopt_argv sparse_tostr fparse_tostr
133  sparse_tostr_long)]);
134
135 $VERSION = '1.04';
136
137 bootstrap Text::ChaSen $VERSION;
138
139 1;
140 __END__
141                 pos = (unsigned char *) "";