f = 'enwiki-latest-pages-articles.xml.bz2'
with open('wiki.en.text', 'w') as fout:
w = WikiCorpus(f, lemmatize=False, dictionary={})
for i, text in enumerate(w.get_texts()):
fout.write(' '.join(text) + '\n')
if i == 10000:
sys.exit()