GENDICT(1)
π GENDICT(1) β the ICU 78.3 manual era π
okay bestie, sit down, hydrate, because we're about to compile a word list into an ICU string trie dictionary and it's gonna be cute π
β¨ NAME β¨
gendict β compiles a word list into an ICU string trie dictionary π¦
πΈ SYNOPSIS πΈ
gendict [ --uchars | --bytes --transform transform ] [ -h, -?, --help ]
[ -V, --version ] [ -c, --copyright ] [ -v, --verbose ] [ -i,
--icudatadir directory ] input-file output-file
π«Ά DESCRIPTION π«Ά
so gendict literally reads the word list from dictionary-file and creates a string trie dictionary file. no cap. normally that data file has the .dict extension, that's just the vibe π
here's the tea on how words work: words begin at the beginning of a line and are terminated by the first whitespace. and lines that begin with whitespace? ignored. not invited to the party. bye π
β OPTIONS β
-h,-?,--helpβ prints help about usage and dips out. that's it, that's the whole job π-V,--versionβ prints the version ofgendictand then exits. iconic behaviour honestly π-c,--copyrightβ embeds the standard ICU copyright straight into the output-file. legal girlies stay winning π-v,--verboseβ spills extra informative messages while it's running. she's chatty and we love that for her π¦-i,--icudatadirdirectory β looks for any necessary ICU data files in directory. for example, the filepnames.icumust be located when ICU's data is not built as a shared library. the default ICU data directory is specified by the environment variableICU_DATA. most configurations of ICU do not require this argument, so don't stress bestie πΈ--ucharsβ sets the output trie type toUChar. mutually exclusive with--bytesβ you can't have both, pick a lane π--bytesβ sets the output trie type toBytes. mutually exclusive with--uchars. same energy, opposite direction π₯--transformβ sets the transform type. should only be specified with--bytes. currently supported transforms are:offset-<hex-number>, which specifies an offset to subtract from all input characters. and listen β it should be noted that the offset transform also mapsU+200Dto0xFFandU+200Cto0xFE, in order to offer compatibility to languages that require these characters. a transform must be specified for a bytes trie, and when applied to the non-value characters in the input-file it must produce output between0x00and0xFF. no shortcuts, the math has to math β¨- input-file β the source file to read. your raw material, your muse π
- output-file β the file to write the output dictionary to. the glow-up destination π
π CAVEATS π
okay this is the part where we get serious for a sec, bestie, because these are real:
- the input-file is assumed to be encoded in UTF-8. don't come at her with anything else π«Ά
- the integers in the input-file that are used as values must be made up of ASCII digits. they may be specified either in hex, by using a
0xprefix, or in decimal. - either
--bytesor--ucharsmust be specified. like, mandatory mandatory. no trie type, no dictionary, periodt π
π ENVIRONMENT π
ICU_DATAβ specifies the directory containing ICU data. defaults to${prefix}/share/icu/78.3/. β οΈ some tools in ICU depend on the presence of the trailing slash. it is thus important to make sure that it is present ifICU_DATAis set. like, do not remove that slash, she notices π
fr fr, that trailing slash is not decorative. keep it.
π AUTHORS π
Maxime Serrano
π VERSION π
1.0
π COPYRIGHT π
Copyright (C) 2012 International Business Machines Corporation and others
π¦ SEE ALSO π¦
http://www.icu-project.org/userguide/boundaryAnalysis.html
and that's the whole page bestie!! this lil' legend lives in the ICU MANPAGE, version 1.0, dated 1 June 2012, page 1 of the GENDICT(1) manual. go compile something gorgeous πβ¨πΈ
π¦ where this page comes from
- arch rolling: icu 78.3-1 Β· LicenseRef-Unicode-3.0 AND BSD-2-Clause AND BSD-3-Clause AND NAIST-2003
- ubuntu stonking: icu-devtools 78.3-2ubuntu1 Β· MIT
- Copyright (C) 2016 and later: Unicode, Inc. and others
- Copyright (C) 2012 International Business Machines Corporation and others
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms