mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
Updating char_to_token
documentation to note behaviour when trim_offsets
is True (#33919)
Updating char_to_token documentation.
This commit is contained in:
parent
612065efeb
commit
a7e4e1a77c
@ -598,7 +598,8 @@ class BatchEncoding(UserDict):
|
|||||||
|
|
||||||
|
|
||||||
Returns:
|
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:
|
if not self._encodings:
|
||||||
|
Loading…
Reference in New Issue
Block a user