help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: correcting word groups (general spelling question)


From: Richard Wordingham
Subject: Re: correcting word groups (general spelling question)
Date: Wed, 1 Jul 2015 04:46:55 +0100

On Wed, 01 Jul 2015 02:08:32 +0200
Emanuel Berg <embe8573@student.uu.se> wrote:

> Yuri D'Elia <wavexx@thregr.org> writes:
> 
> > If I add Kitteh to the dictionary, I will obviously
> > allow Kitteh to roam free in my text, which I don't
> > want. I really want to lean "Hello Kitteh" instead,
> > and also give auto-correct suggestions based on this
> > specific meaning, and not on the individual word.
> 
> You can do it like this:
> 
>     (setq ispell-skip-region-alist
>           (append ispell-skip-region-alist '(("Hello" . "Kitteh")) ))

No you can't.  It would skip all of, "Hello James.  We noq go around
saying, 'Hello Kitteh'.".  "Noq" is a typo for "now".

> However, I consider this over-engineering. How many
> such combinations to you have?
> 
> Why not just add "Kitteh"?
> 
> Are you really that worried that will appear instead
> of the correct spelling?

A better example is "fro", which only appears in "to and fro".  "Fro"
is a common typo for "for" and "from".

Hunspell seems to have a method of handling these words.  It consists
of the qualifier -r on hunspell(1) and WARN in the affix file (see
hunspell(4)), along with a qualifier on the word itself in the
dictionary file.  I haven't tried it, but presumably it relies on the
author being careless rather than ignorant of spelling.

Another approach is to move these words from the domain of
spell-checking to that of grammar-checking.  It looks as though the
LibreOffice add-on langtool allows one to add grammar rules that would
check that Kitteh is preceded by Hello, and that 'fro' occurs in 'to
and fro'.

Richard.



reply via email to

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