It takes approximately 1 second to load a dictionary with 10k words, and ImportUserDict get stuck when I try to load a dictionary of 100k, and there's no way to trigger a keyboard interrupt.
I suspect that the time complexity of loading user dictionary is greater than O(n^2).
@huntzhan The pynlpir.nlpir.ImportUserDict() function calls the NLPIR function directly. PyNLPIR itself does not open the user dict file or read its data. You might try asking around at NLPIR:
OS: CentOS 6.7
Test code I've run:
example format of dict:
It takes approximately 1 second to load a dictionary with 10k words, and
ImportUserDict
get stuck when I try to load a dictionary of 100k, and there's no way to trigger a keyboard interrupt.I suspect that the time complexity of loading user dictionary is greater than O(n^2).