buma/gensim — pull request #1 by piskvorky (2012-09-06 19:13:21+00:00)
Title: make len(Dictionary.from_corpus) consistent with its content

That's a nice, clean commit -- thanks Marko!

Unfortunately it wouldn't work like that -- it must be that `len(dictionary) > max(dictionary.values())`. In other words, other function use `len(dictionary)` to allocate a block memory, and then assume that any id falls in the range `<0, len(dictionary) - 1>`.

I am attaching a commit which makes `from_corpus` work that way. Maybe like this the method is no longer useful to you -- let me know.