Saving huge bigram dictionary to file using pickle

后端 未结 5 1897
日久生厌
日久生厌 2021-01-05 11:45

a friend of mine wrote this little progam. the textFile is 1.2GB in size (7 years worth of newspapers). He successfully manages to create the dictionary but he

5条回答
  •  攒了一身酷
    2021-01-05 12:25

    One solution is to use buzhug instead of pickle. It's a pure Python solution, and retains very Pythonic syntax. I think of it as the next step up from shelve and their ilk. It will handle the data sizes you're talking about. Its size limit is 2 GB per field (each field is stored in a separate file).

提交回复
热议问题