gensim.corpora.HashDictionary.restricted_hash

HashDictionary.restricted_hash(token)[source]

Calculate id of the given token. Also keep track of what words were mapped to what ids, for debugging reasons.