Skip to content

Commit

Permalink
fixed token_to_id doc + error msg (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackd authored Sep 11, 2023
1 parent 8fea705 commit 1302c84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keras_nlp/tokenizers/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def id_to_token(self, id: int) -> str:
)

def token_to_id(self, token: str) -> int:
"""Convert an integer id to a string token."""
"""Convert a string token to an integer id."""
raise NotImplementedError(
"No implementation of `id_to_token()` was found for "
"No implementation of `token_to_id()` was found for "
f"{self.__class__.__name__}."
)

Expand Down

0 comments on commit 1302c84

Please sign in to comment.