aspell-user
[Top][All Lists]
Advanced

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

Re: [Aspell-user] Feature request: Double word checking


From: Ralph Corderoy
Subject: Re: [Aspell-user] Feature request: Double word checking
Date: Fri, 19 Dec 2003 22:13:24 +0000

Hi John,

> I've been using aspell for awhile now and its been great. However,
> there is one feature that I would really like to see in aspell. And
> that is checking for double words. e.g This is one of the the most
> common mistakes one make when typing fast!
> 
> I believe this is something alot of people would like to see too.

I'm not sure it's something that should be in a spelling checker.

The DWB, Documenter's Work Bench, used to have a program to do this.  It may
have been diction(1)?  It would also pick up on other faults, like using a
common multi-word phase when one would do.

A poor man's duplicate spotter can be knocked up fairly easily.

    $ echo this this is not the beginning or the middle of the the end |
    > tr -sc 'A-Za-z' '\012' |
    > awk '{print ($0==l)*3,$0;l=$0}' |
    > awk '$1<l{$1=l-1}{l=$1}1'|
    > tac |
    > awk '{o=$1}$1<l{$1=l-1+(r==3)}{l=$1;r=o}1' |
    > tac |
    > awk '$1{printf "%s ",$2;f=1}!$1&&f{print "";f=0}END{if (f)print ""}'
    this this is not 
    middle of the the end 
    $

The DWB program would [highlight] the duplicate words.

Cheers,


Ralph.





reply via email to

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