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: Gary Setter
Subject: Re: [Aspell-user] Adding hyphenated words to private dictionaries
Date: Mon, 6 Feb 2006 08:03:44 -0600

----- Original Message ----- 
From: "Kevin Atkinson" <address@hidden>
To: "Gary Setter" <address@hidden>
Cc: "aspell-user" <address@hidden>
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





reply via email to

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