How to check a document for double words

One of the things that diction looks for is doubled words−−words repeated twice in a row. If it finds such a sequence, it encloses the second member of the doubled pair in brackets, followed by a right arrow and the text `Double word', like `this [<i>this −> Double word.]'.

To check a text file for doubled words only, and not for any of the other things diction checks, use grep to find only those lines in diction's output that contain the text `Double word', if any. To output all lines containing double words in the file  `dissertation', type:

$ diction dissertation | grep 'Double word' RET

Posted on: 16/12/2009

If you want to leave a comment please Login or Register