Closed SoluMilken closed 6 years ago
token to index (with unk token)
init
fit
transform
inverse_transform
state
Did you forget to add a op?
added op token to index fa9235b
token to index (with unk token)
init
: vocab_size, vocabulary, unk_token, necessary_tokensfit
: (1) check unk token not in sentences (2) build limited size vocabulary from sentences + (add unk token + add important_tokens must have)transform
: map token to index based on vocabulary,inverse_transform
: index to tokenstate
: token2index, index2token