ISPELLAFF2MYSPELL(1) | User Contributed Perl Documentation | ISPELLAFF2MYSPELL(1) |
ispellaff2myspell - A program to convert ispell affix tables to myspell format.
ispellaff2myspell [options] <affixfile> --myheader your_header Options: --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
ispellaff2myspell is a script that will convert ispell affix tables to myspell format in a more or less successful way.
This script does not create the dict file. Something like
( echo `cat mydict.words+ | wc -l`; cat mydict.words+ ) > mydict.dict
should do the work, with mydict.words+ being the munched wordlist
When invoked with no value the supported flags are currently those corresponding to chars represented with the escape char \ as first char. \ will be stripped.
When given with the flag prefix 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 previous example.
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';
The OpenOffice.org Lingucomponent Project home page
<http://lingucomponent.openoffice.org/index.html>
and the document
<http://lingucomponent.openoffice.org/affix.readme>
that 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.
Agustin Martin <agustin.martin@hispalinux.es>
2022-08-22 | perl v5.34.0 |