tmnt.data_loading.load_vocab

load_vocab(vocab_file, encoding='utf-8')[source]

Load a pre-derived vocabulary, assumes format consisting of a single word on each line. Note: this is a bit of a hack to use a counter to sort the vocab items IN THE ORDER THEY ARE FOUND IN THE FILE.