=head1 NAME

slmseg - maximum matching segment Chinese text.

=head1 SYNOPSIS

B<slmseg> -d I<dict_file> [I<option>]... [I<corpus_file>]...

=head1 DESCRIPTION

B<slmseg> is a tool for segmenting Chinese text into words using maximum matching algorithm. B<slmseg> segments I<corpus_file>, or standard input if no filename is specified, and write the segmented result to standard output.


=head1 OPTIONS

=over 4

=item B<-d> I<dict_file>

Use I<dict_file> as lexicon. A default lexicon can be found at F</usr/share/sunpinyin-slm/dict.utf8>.


=item B<-f>,B<--format> (B<text>|B<bin>)

Output Format, can be 'text' or 'bin'. default 'bin'.
Normally, in text mode, word text are output, while in binary mode,
binary short integer of the word-ids are written to stdout.


=item B<-s>, B<--stok> I<STOK_ID>

Sentence token id. Default 10.
It will be written to output in binary mode after every sentence.


=item B<-i>, B<--show-id>

Show Id info. Under text output format mode, attach id after known words. 
If under binary mode, print id(s) in text.


=item B<-m>, B<--model> I<language-model-file>
Speficy the language model file. This file is always generated by B<slmthread>.

=back


=head1 NOTES

Under B<binary> mode, consecutive id of 0 are merged into one 0.
Under B<text> mode, no space are inserted between unknown-words. 

=head1 AUTHOR

Originally written by Phill.Zhang E<lt>phill.zhang@sun.comE<gt>.
Currently maintained by Kov.Chai E<lt>tchaikov@gmail.comE<gt>.

=head1 SEE ALSO

B<mmseg>(1), B<ids2ngram> (1).

