[prev in list] [next in list] [prev in thread] [next in thread]
List: aspell-user
Subject: Re: [Aspell-user] Adding hyphenated words to private dictionaries
From: "Gary Setter" <setterg () worldnet ! att ! net>
Date: 2006-02-06 14:03:44
Message-ID: 000001c62b26$7f04a400$8e144a0c () pavilion
[Download RAW message or body]
----- Original Message -----
From: "Kevin Atkinson" <kevina@gnu.org>
To: "Gary Setter" <setterg@worldnet.att.net>
Cc: "aspell-user" <aspell-user@gnu.org>
Sent: Sunday, February 05, 2006 8:38 PM
Subject: Re: [Aspell-user] Adding hyphenated words to private
dictionaries
>
> >> 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 ----
Since we are in conversation mode.
Where did the idea come from that every pair of words can be
combined with a hyphen to form a valid word? I've questioned this
before and have yet to receive an answer. At lest this should be
under configuration control, IMHO.
As I wrote before:
There are two ways of making hyphen a valid middle character that
I can think of.
1. change the en.dat file to include the 'special' configuration
keyword to setup the hyphen as special.
2. change the LangImpl::setup(...) to check for characters of
type Hyphen and set LangImpl::special_ for those characters to be
valid in the middle, but not beginning or end.
Which of the two approaches to making hyphen a valid middle
character do you think is worth pursuing?
Best regards,
Gary Setter
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic