User:Ssvb/Lua dictionary module

The following Ruby script can be used to automatically generate a Lua module, which can perform a look-up in an arbitrarily large reasonably efficiently encoded dictionary:

If the produced Lua file is slightly larger than the 2MB limit, then the ACCEPTABLE_COLLISION_PROBABILITY parameter can be tweaked a bit. But if it's a lot larger than 2MB, then it may need to be split into multiple parts in the following manner:

And each of the data modules may look like: