add bidict dependency to compute id2tok and tok2id efficiently