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 of gendict and 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, --icudatadir directory β€” looks for any necessary ICU data files in directory. for example, the file pnames.icu must be located when ICU's data is not built as a shared library. the default ICU data directory is specified by the environment variable ICU_DATA. most configurations of ICU do not require this argument, so don't stress bestie 🌸
  • --uchars β€” sets the output trie type to UChar. mutually exclusive with --bytes β€” you can't have both, pick a lane πŸ’€
  • --bytes β€” sets the output trie type to Bytes. 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 maps U+200D to 0xFF and U+200C to 0xFE, 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 between 0x00 and 0xFF. 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 0x prefix, or in decimal.
  • either --bytes or --uchars must 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 if ICU_DATA is 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 (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