def dict_from_corpus(corpus):
 num_terms = (1 + get_max_id(corpus))
 id2word = FakeDict(num_terms)
 return id2word

def dict_from_corpus ( corpus ) : num_terms = ( 1 + get_max_id ( corpus ) ) id2word = FakeDict ( num_terms ) return id2word
scan corpus for all word ids that appear in it .