RFC: spellchecking hyphenated words

From: Tomas Frydrych <tomasfrydrych_at_yahoo.co.uk>
Date: Mon Jun 13 2005 - 22:04:12 CEST

I have come up with this algorithm for handling hyphenated words (bug 4973):

1. Treat ordinary hyphen surrounded by alphanumerics as word character
so that the entire compound gets passed from the layout code to the
spellechecking interface (SpellChecker::checkWord()).

2. Before calling the spellchecker in SpellChecker::checkWord(), split
any hyphenated phrase into its components and test them individually; if
all check correct, we are done (spelling correct).

3. If one or more parts check incorrect, try the entire hyphenated phrase.

This would improve things, in that it would work for English full-time
(on basis of rule 2), but it would allow dictionaries to contain
hyphenated constructions.

As it stands, if there is an error, the whole hyphenated phrase will get
squiggled. This is probably not a bad thing, as otherwise there would be
no easy way of adding the hyphenated phrases to custom dictionary.

How does this sound?

Tomas

        
        
                
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Received on Mon Jun 13 22:06:58 2005

This archive was generated by hypermail 2.1.8 : Mon Jun 13 2005 - 22:07:00 CEST