maciejkula/glove-python — pull request #11 by maciejkula (2014-11-07 10:16:40+00:00)
Title: Use a Python object as a word-id mapping.

Optimize moving window co-occurrence calculation. Add tests.

@piskvorky @ogrisel This moves to a Python dictionary for the word-id mapping, side-stepping the encoding issue. This way the dictionary contains exactly what the user passes into it, and there are no encoding surprises. There is also the possibility of the user passing in their own `dict`-like object.

Despite this, matrix creation performance is about 40% better due to operating on a numeric `vector` in the moving window inner loops.