.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MMSEG 1" .TH MMSEG 1 2024-02-10 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME mmseg \- maximum matching segment Chinese text. .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBmmseg\fR \-d \fIdict_file\fR [\fIoption\fR]... [\fIcorpus_file\fR]... .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBmmseg\fR is a tool for segmenting Chinese text into words using maximum matching algorithm. \fBmmseg\fR segments \fIcorpus_file\fR, or standard input if no filename is specified, and write the segmented result to standard output. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-d\fR \fIdict_file\fR" 4 .IX Item "-d dict_file" Use \fIdict_file\fR as lexicon. A default lexicon can be found at \fI/usr/share/sunpinyin\-slm/dict.utf8\fR. .IP "\fB\-f\fR,\fB\-\-format\fR (\fBtext\fR|\fBbin\fR)" 4 .IX Item "-f,--format (text|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. .IP "\fB\-s\fR, \fB\-\-stok\fR \fISTOK_ID\fR" 4 .IX Item "-s, --stok STOK_ID" Sentence token id. Default 10. It will be written to output in binary mode after every sentence. .IP "\fB\-i\fR, \fB\-\-show\-id\fR" 4 .IX Item "-i, --show-id" Show Id info. Under text output format mode, attach id after known words. If under binary mode, print id(s) in text. .IP "\fB\-a\fR, \fB\-\-ambiguious\-id\fR \fIAMBI-ID\fR" 4 .IX Item "-a, --ambiguious-id AMBI-ID" Ambiguious means \fIABC\fR => \fIA\fR \fIBC\fR or \fIAB\fR \fIC\fR. If specified (\fIAMBI-ID\fR != 0), The sequence \fIABC\fR will not be segmented, in binary mode, the \fIAMBI-ID\fR is written out; in text mode, \f(CW\*(C`ABC\*(C'\fR will be output. Default is 0. .SH NOTES .IX Header "NOTES" Under \fBbinary\fR mode, consecutive id of 0 are merged into one 0. Under \fBtext\fR mode, no space are inserted between unknown-words. .SH AUTHOR .IX Header "AUTHOR" Originally written by Phill.Zhang . Currently maintained by Kov.Chai . .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBslmseg\fR(1), \fBids2ngram\fR (1).