I am doing some searches on the XML version of the British National Corpus (not distributed with the NLTK), using the NLTK's BNCCorpusReader. It works fine, but it's SLOW. Simply counting the words in the first 30 files (about 950 thousand words) takes 21 seconds
on my computer. By comparison, counting the words on the Brown corpus (500 plain text files, one million words) takes less than three seconds.
The problem is clearly because the BNC reader must deal with a whole bunch of XML files. So the question is: Is there any provision for speeding up access, by hooking up the BNCCorpusReader to a (faster) third-party XML library in some way?
Alexis