I have a word list which has more than 800 million words in a txt file, when I use it, it will take more than 10 minutes to load, jieba.load_userdict(r"/path/to/my/file/dict.txt") so how can I accelerate loading method.
you can write a OOP Class and initiate the dictionary from there. After that call the class and its function in another python file and keep it looping using while True.
1条答案
按热度按时间yr9zkbsy1#
you can write a OOP Class and initiate the dictionary from there.
After that call the class and its function in another python file and keep it looping using while True.