Updating char_to_token documentation to note behaviour when trim_offsets is True (#33919)

Updating char_to_token documentation.
This commit is contained in:
Adam Pocock 2024-10-05 08:13:26 -04:00 committed by GitHub
parent 612065efeb
commit a7e4e1a77c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -598,7 +598,8 @@ class BatchEncoding(UserDict):
Returns:
`int`: Index of the token.
`int`: Index of the token, or None if the char index refers to a whitespace only token and whitespace is
trimmed with `trim_offsets=True`.
"""
if not self._encodings: