MMSEG(1)
π MMSEG(1) β like, the mmseg manual but make it make sense π
okay so bestie, welcome to mmseg, a user-contributed Perl situation, and honestly? she's iconic. let's get into it β¨
β¨ NAME β¨
mmseg β maximum matching segment Chinese text. that's it, that's the whole vibe. she takes Chinese text and chops it into words, no cap πΈ
π¦ SYNOPSIS π¦
mmseg -d dict_file [option]... [corpus_file]...
likeβ¦ you need the dict, the options are optional (as options are), and the corpus files are whatever you feel like throwing at her π
π DESCRIPTION π
mmseg is a tool for segmenting Chinese text into words using the maximum matching algorithm. periodt.
she segments corpus_file, or standard input if you didn't name a file (she's not picky, she's flexible π«Ά), and writes the segmented result to standard output. in, chopped up, out. main character energy from start to finish π
π OPTIONS π
-ddict_fileβ usedict_fileas the lexicon, bestie. and if you don't have one handy, there's a default lexicon chillin' at/usr/share/sunpinyin-slm/dict.utf8β she's already there waiting for you π₯°-f,--format(text|bin) β output format, and it can be'text'or'bin'. default is'bin'. so like, normally: in text mode the actual word text gets output, while in binary mode a binary short integer of the word-ids gets written to stdout. two totally different aesthetics, both valid π«-s,--stokSTOK_IDβ sentence token id. default10. this lil cutie gets written to output in binary mode after every sentence, like a little period but make it numeric π―-i,--show-idβ show id info. under text output format mode, she attaches the id after known words; if you're under binary mode, she prints the id(s) in text. either way you're getting the receipts π-a,--ambiguious-idAMBI-IDβ okay so "ambiguious" (yes, that's how it's spelled, we love her for it π) meansABC=>A BCorAB C. if you specify it (AMBI-ID != 0), the sequenceABCwill not be segmented. in binary mode theAMBI-IDis written out; in text mode<ambi>ABC</ambi>gets output. default is0, i.e. she minding her own business π
π§ NOTES π§
under binary mode, consecutive ids of0are merged into one0. under text mode, no spaces are inserted between unknown-words. that's just how she rolls, don't @ her π
π AUTHOR π
originally written by Phill.Zhang <phill.zhang@sun.com>. currently maintained by Kov.Chai <tchaikov@gmail.com>. legends, both of them ππ
β SEE ALSO β
slmseg(1), ids2ngram (1) β go read those too, iykyk πβ¨
okay that's the whole page, you're officially educated ππ this lil number was brought to you by perl v5.36.0 and dated 2023-08-08 β mwah, go segment something gorgeous ππ¦
π¦ where this page comes from
- ubuntu noble: sunpinyin-utils 3.0.0~rc2+ds1-5 Β· LGPL-2.1-only OR CDDL
- ubuntu questing: sunpinyin-utils 3.0.0~rc2+ds1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms