make_token_to_id¶
- mlpractice.rnn_torch.make_token_to_id(tokens)¶
Creates a mapping between tokens and its int identifiers.
- Parameters
- tokenslist of str
List with all unique tokens.
- Returns
- token_to_iddict of str
Tokens to its identifier (index in tokens list).