Remove some repeated words like "the the"

Found by this Python script:

import re
import sys

prev = None
for line in sys.stdin:
    for word in re.split('\W+', line):
        if len(word) > 0:
            if not word.isdigit() and word == prev:
                print "%s: %s" % (word, line.strip())
            prev = word