GENPYT(1)
β¨ NAME β¨
genpyt β the little icon that generates the PINYIN lexicon π
(this is the GENPYT(1) page, user contributed Perl docs, bestie, you're in the right place)
β¨ SYNOPSIS β¨
genpyt lexicon-file result-file log-file slm-file
Four files in, one slayed lexicon out. That's the whole vibe check π«Ά
β¨ DESCRIPTION β¨
Okay so genpyt is literally the tool that generates the PINYIN lexicon π₯ That's its whole job, it's not doing side quests.
One tiny thing though, and I need you to hear me: it only works on the zh_CN.UTF-8 locale. No cap. Any other locale and it's giving "nope" π So set that locale first, bestie, and then come talk to me.
β¨ ARGUMENTS β¨
lexicon-fileβ your dictionary file, babe π It should be a line-based text file in utf-8 encoding. Every single line looks like this:
CCC id [pinyin'pinyin'pinyin]*
And listen β there's a default dictionary file already chilling at /usr/share/sunpinyin/dict.utf8 if you don't feel like making your own π
result-fileβ the output binary PINYIN lexicon file, the main character of this whole operation π This lexicon contains a trie presenting the key tree of PINYIN. And all of the candidate words are sorted using the unigram inslm-file. (Yes, that's the actual technical deal, I'm not making it up β¨) This file can be used with sunpinyin input method engines. Slay.log-fileβ this is where the log goes π Think of thelog-fileas the human-readble presentation of the binary output file. Like, same situation, but you can actually read it with your eyes πslm-fileβ the language model from which the unigram information are retrieved π§ Typically, theslm-fileis generated byslmthread. So like, go generate that first, iykyk.
β¨ AUTHOR β¨
Originally written by Phill.Zhang <phill.zhang@sun.com> πΈ Currently maintained by Kov.Chai <tchaikov@gmail.com> π¦ Shoutout to both of them, legends only.
β¨ SEE ALSO β¨
slmthread(1)β the one that makes yourslm-file, go check it out bestie β
Okay that's the whole page, mwah π And for the record, this was perl v5.36.0, dated 2023-08-08, filed under User Contributed Perl Documentation β so if anyone asks, that's the version and date, periodt π
π
π¦ 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