ispell blues (was: localization formats proposal)


Subject: ispell blues (was: localization formats proposal)
From: Frodo Looijaard (frodol@dds.nl)
Date: Sat Jul 21 2001 - 05:58:26 CDT


Martin Sevior wrote:

> > Remind me: How should I create ispell dictionaries so they'll work
> > with AbiWord?
> >
>
> Sorry I don't know. Frodo does though. Care to post a link to a HOWTO
> Frodo?

I was not really sure myself. One option is simply to use pspell, which
will do the hard work for you - but I gather that is not an option on
all platforms.

I still find it a bit wasteful to have AbiWord use its own ispell
libraries, when the system-wide ones are perfectly fine. I would like
to suggest the following solution:

  * When we distribute binary packages, we include all AbiWord ispell
    libraries
  * When somebody compiles from source and selects ispell, not pspell,
    we try to find any system-wide installed ispell dictionaries. If
    none are found, we again install the AbiWord ispell libraries. If
    we do find a system-wide ispell, we determine what options are used
    in it (see below) and compile our own ispell support with the same
    options. Perhaps we still offer the option to use AbiWord's own
    dictionaries, though.

I have attached a small C program that will detect for you what options
an ispell hash is compiled with (rewriting it in C++ is left as an exercize
for the reader). When run on the (old) AbiWord ispell hashes you get this:

(bash-2.05.0) frodo@arda:~/projects/abiword/ispell-detect$ ./ispell-detect ../abidistfiles/dictionary/*.hash
../abidistfiles/dictionary/BigEndian32.american.hash: big endian (options: 0002) #undef NO8BIT
  #define NO_CAPITALIZATION_SUPPORT
  #define MASKBITS 32
../abidistfiles/dictionary/LittleEndian32.american.hash: little endian (options: 0006)
  #undef NO8BIT
  #define NO_CAPITALIZATION_SUPPORT
  #define MASKBITS 64

Comments?
  Frodo

-- 
Frodo Looijaard <frodol@dds.nl>  PGP key and more: http://huizen.dds.nl/~frodol
Defenestration n. (formal or joc.):
  The act of removing Windows from your computer in disgust, usually followed
  by the installation of Linux or some other Unix-like operating system.




This archive was generated by hypermail 2b25 : Sat Jul 21 2001 - 05:58:40 CDT