Fix build errors on 64 bits
[platform/core/uifw/ise-engine-sunpinyin.git] / doc / mmseg.pod
1 =head1 NAME
2
3 mmseg - maximum matching segment Chinese text.
4
5 =head1 SYNOPSIS
6
7 B<mmseg> -d I<dict_file> [I<option>]... [I<corpus_file>]...
8
9 =head1 DESCRIPTION
10
11 B<mmseg> is a tool for segmenting Chinese text into words using maximum matching algorithm. B<mmseg> segments I<corpus_file>, or standard input if no filename is specified, and write the segmented result to standard output.
12
13
14 =head1 OPTIONS
15
16 =over 4
17
18 =item B<-d> I<dict_file>
19
20 Use I<dict_file> as lexicon. A default lexicon can be found at F</usr/share/sunpinyin-slm/dict.utf8>.
21
22
23 =item B<-f>,B<--format> (B<text>|B<bin>)
24
25 Output Format, can be 'text' or 'bin'. default 'bin'.
26 Normally, in text mode, word text are output, while in binary mode,
27 binary short integer of the word-ids are written to stdout.
28
29
30 =item B<-s>, B<--stok> I<STOK_ID>
31
32 Sentence token id. Default 10.
33 It will be written to output in binary mode after every sentence.
34
35
36 =item B<-i>, B<--show-id>
37
38 Show Id info. Under text output format mode, attach id after known words. 
39 If under binary mode, print id(s) in text.
40
41
42 =item B<-a>, B<--ambiguious-id> I<AMBI-ID>
43
44 Ambiguious means I<ABC> => I<A> I<BC> or I<AB> I<C>. If specified (I<AMBI-ID> != 0), 
45 The sequence I<ABC> will not be segmented, in binary mode, the I<AMBI-ID> is written out; in text mode, C<E<lt>ambiE<gt>ABCE<lt>/ambiE<gt>> will be output. Default is 0.
46
47
48 =back
49
50
51 =head1 NOTES
52
53 Under B<binary> mode, consecutive id of 0 are merged into one 0.
54 Under B<text> mode, no space are inserted between unknown-words. 
55
56 =head1 AUTHOR
57
58 Originally written by Phill.Zhang E<lt>phill.zhang@sun.comE<gt>.
59 Currently maintained by Kov.Chai E<lt>tchaikov@gmail.comE<gt>.
60
61 =head1 SEE ALSO
62
63 B<slmseg>(1), B<ids2ngram> (1).
64