aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aspell-user] Adding hyphenated words to private dictionaries


From: Kevin Atkinson
Subject: Re: [Aspell-user] Adding hyphenated words to private dictionaries
Date: Sun, 5 Feb 2006 19:38:38 -0700 (MST)


Something that correctly implements the idea I described a few
emails ago,
this involve at least:
   1) Adding a new character class for hyphens
   2) Reworking the code that checks a document
   3) Intelligently handling the situation when an hyphened
word is misspelled

Just for conversation,
The LangImpl class has an enum, like this:
   enum CharType {Unknown, WhiteSpace, Hyphen, Digit,
                  NonLetter, Modifier, Letter};

I forgot about that.

Take a look at the LangImpl::setup(...) function. It reads the
.cset file and stores the character type in member data
LangImpl::char_type_. So we know which character is a hyphen. We
also have an existing data member for specifying how a character
can be used, LangImpl::special_. All we need to do is set
special_ for the hyphen character to be valid in the middle of a
word, but not the beginning or end.

There is more too it too that.  I repeat from an earlier email:

  The correct thing to do is first check if "co-counsel" is in the
  dictionary, than if not check both parts.  Aspell does not support this
  behavior yet.

If it was a simple as making it a normal "middle" character I would have done so already.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]