modified version of WikiExtractor.py from the Tanl team