Get the token_id of given token.

        Args:
            token (str): token from vocabulary.

        Returns:
            int: int id of token.

def token_to_id(self, token):
        """Get the token_id of given token.

        Args:
            token (str): token from vocabulary.

        Returns:
            int: int id of token.
        """
        token = self.process_token(token)
        return self._token2id.get(token, len(self._token2id) - 1)