rspeer / wordfreq

Access a database of word frequencies, in various natural languages.
Other
1.39k stars 101 forks source link

Data packs are not detected by PyInstaller #112

Open thelabcat opened 6 months ago

thelabcat commented 6 months ago

I'm working on an app that uses this library, but best I can tell, when I pack my app into an executable using PyInstaller, it doesn't realize that the data packs are necessary. As it so happens, I only need the English data pack, but I'm not sure where to put it in terms of the exe's temp extraction path. Any suggestions? I'll try just (drop point)/data/large_en.msgpack.gz and see if it works. Some implementation of #61 where, instead of appending data packs, the library lets one choose where to load all of them from might work to help with this, but IDK for sure.

thelabcat commented 6 months ago

Thankfully, (drop point)/wordfreq/data/large_en.msgpack.gz worked. It feels janky, but it isn't too bad.