corevoikko icon indicating copy to clipboard operation
corevoikko copied to clipboard

voikko-fi/common/voikkoutils.py: process_wordlist: use XML parser for whole word list

Open hatapitk opened this issue 8 years ago • 0 comments

When the code was written xml.dom.minidom was way too slow for parsing the whole word list. SAX parsers were too complicated. So we decided to parse each word element separately with minidom and just assume that tags could be found on their own lines. Thus the parser does not actually accept any valid XML document but makes extra assumptions about formatting.

These days we may have better parsers so it would be good to rewrite this function to use them.

hatapitk avatar Oct 18 '17 18:10 hatapitk