Re: Detecting the duplication of a word



On May 30, 1:23 am, Andreas Röhler <andreas.roeh...@xxxxxxxxx> wrote:

Agreed?


Yes, by all means.

If some kind soul intends to volunteer to write such a utility, let's
see how it might work.

There could be a continuous highlighting mode that searches in the
current emacs page (not buffer, in case it's large) and that signals
(somewhat like matching brackets works now) the words that match. That
is probably too distracting since the writer will not want to see
lights blinking on and off continuously throughout the page.

Another issue is whether conjugation should be taken into account.
This would make the utility much harder to write since it would need
to search based on the infinitive of verbs, on the neutral form of
adjectives, and so on. It would also have to check across word types.
For instance, even though the word 'duplication' is a noun and 'to
duplicate' is a verb, they should be treated as, well, duplicates.
Worst, the rules would need to be customized for the language the
writer is using (but catering for English only is a convenient
start!).

The utility could work offline. Just before one is ready to send a
manuscript off, one would check whether there are nearby word
duplications.

But it would be a nice luxury to signal that a word is being
duplicated after, say, one presses the space bar (to type the
following word). For release 1.0, it's enough to match words exactly.
For release 1.1, the matches would be colored in deeper red, say, for
a longer match. After all, it is all right (and inevitable) to repeat
shorter words, and the longer a word gets, the poorer style it is to
reuse it.

Thanks!
Samuel
.