ISPELLAFF2MYSPELL(1)

๐ŸŒˆ bestie alert: you have wandered into ISPELLAFF2MYSPELL(1), straight out of the User Contributed Perl Documentation corner of your manual ๐ŸŒˆ

โœจ NAME โœจ

ispellaff2myspell โ€” a whole program whose entire personality is converting ispell affix tables into myspell format ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

 ispellaff2myspell [options] <affixfile> --myheader your_header

Options, in all their glory:

  --affixfile=s      Affix file
  --bylocale         Use current locale setup for upper/lowercase
                     conversion
  --charset=s        Use specified charset for upper/lowercase
                     conversion (defaults to latin1)
  --debug            Print debugging info
  --extraflags=s     Allow some non alphabetic flags
  --lowercase=s      Lowercase string
  --myheader=s       Header file
  --printcomments    Print commented lines in output
  --replacements=s   Replacements file
  --split=i          Split flags with more that i entries
  --uppercase=s      Uppercase string

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

ispellaff2myspell is a script that converts ispell affix tables into myspell format in a more or less successful way ๐Ÿ˜Œ (yes, "more or less" โ€” she's honest about her range, we respect it).

Heads up though: this script does not create the dict file. Not her job, not her problem ๐Ÿซถ Something like

( echo `cat mydict.words+ | wc -l`; cat mydict.words+ ) > mydict.dict

should do the work, with mydict.words+ being the munched wordlist ๐Ÿ‘‘


๐ŸŒธ OPTIONS ๐ŸŒธ

  • --affixfile=s โ€” the affix file. You can put it directly in the command line, no shame in it.
  • --bylocale โ€” use the current locale setup for upper/lowercase conversion. โš ๏ธ Make sure the locale you picked actually matches the dictionary one, or you might get into trouble. fr fr, check it.
  • --charset=s โ€” use the specified charset for upper/lowercase conversion (defaults to latin1). Currently allowed values for charset are: latin0, latin1, latin2, latin3.
  • --debug โ€” print some debugging info. Spill the tea, queen.
  • --extraflags:s โ€” allows some non alphabetic flags.

When invoked with no value, the supported flags are currently those corresponding to chars represented with the escape char \ as first char. That \ will be stripped โœ‚๏ธ

When given with the flag prefix, it will allow that flag and strip the given prefix. โš ๏ธ Be careful when giving the prefix to properly escape chars, e.g. you will need -e "\\\\" or -e '\\' for flags like \[ to be stripped to [. Otherwise you might even get errors. Use -e "^" to allow all flags and pass them unmodified.

You will need a call to -e for each flag type, e.g., -e "\\\\" -e "~\\\\" (or -e '\\' -e '~\\').

When a prefix is explicitly set, the default value (anything starting by \) is disabled and you need to enable it explicitly, as in the previous example. ๐Ÿซถ

  • --lowercase=s โ€” lowercase string. Manually set the string of lowercase chars. This requires --uppercase having exactly that string but uppercase. They're a matched set, a duo, a ship ๐Ÿšข
  • --myheader=s โ€” header file. The myspell aff header. You need to write it manually. This can contain everything you want to be before the affix table.
  • --printcomments โ€” print commented lines in output.
  • --replacements=file โ€” add a pre-defined replacements table taken from file to the .aff file. Will skip lines not beginning with REP, and set the replacements number appropriately.
  • --split=i โ€” split flags with more that i entries. This can be of interest for flags having a lot of entries. Will split the flag in chunks containing i entries.
  • --uppercase=s โ€” uppercase string. Manually set the string of uppercase chars. This requires --lowercase having exactly that string but lowercase. Same ship, other direction ๐Ÿ’ž

If your encoding is currently unsupported ๐Ÿ˜ญ you can send me a separate file with the two strings of lower and uppercase chars. Note that they must match exactly but case changed. It will look something like

  $lowercase='a-zร รกรขรฃรครฅรฆรงรจรฉรชรซรฌรญรฎรฏรฐรฑรฒรณรดรตรถรธรนรบรปรผรฝรพ';
  $uppercase='A-Zร€รร‚รƒร„ร…ร†ร‡รˆร‰รŠร‹รŒรรŽรรร‘ร’ร“ร”ร•ร–ร˜ร™รšร›รœรรž';

A safer alternative against accidental recoding is to use octal codes for non 7bit chars. Above strings would then look like

  $lowercase='a-z\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376';
  $uppercase='A-Z\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\330\331\332\333\334\335\336';

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

  • The OpenOffice.org Lingucomponent Project home page

<http://lingucomponent.openoffice.org/index.html>

  • and the document

<http://lingucomponent.openoffice.org/affix.readme>

which provides information about the basics of the myspell affix file format ๐Ÿ“š

You can also take a look at

 /usr/share/doc/libmyspell-dev/affix.readme.gz
 /usr/share/doc/libmyspell-dev/README.compoundwords
 /usr/share/doc/libmyspell-dev/README.replacetable

in your Debian system ๐Ÿ‘‘ (go read them, bestie, they're right there)


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Agustin Martin <agustin.martin@hispalinux.es>


and that's the whole page, no cap ๐Ÿ’… this was ISPELLAFF2MYSPELL(1) from perl v5.40.1, dated 2026-05-23 โ€” slay, and good luck with your affix tables ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from