class gensim.utils.FakeDict(num_terms)[source]

Objects of this class act as dictionaries that map integer->str(integer), for a specified range of integers <0, num_terms).

This is meant to avoid allocating real dictionaries when num_terms is huge, which is a waste of memory.


get(val[, default])
keys() Override the dict.keys() function, which is used to determine the maximum internal id of a corpus = the vocabulary dimensionality.