[MINOR:TYPO] Fix docstrings (#1653)

* [MINOR:TYPO] Update pre_tokenizers.rs

* [MINOR:TYPO] Update __init__.pyi
This commit is contained in:
Christopher Akiki
2024-11-05 16:25:06 +01:00
committed by GitHub
parent 5e223ceb48
commit 57884ebaa2
2 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ class Split(PreTokenizer):
Args: Args:
pattern (:obj:`str` or :class:`~tokenizers.Regex`): pattern (:obj:`str` or :class:`~tokenizers.Regex`):
A pattern used to split the string. Usually a string or a a regex built with `tokenizers.Regex`. A pattern used to split the string. Usually a string or a regex built with `tokenizers.Regex`.
If you want to use a regex pattern, it has to be wrapped around a `tokenizer.Regex`, If you want to use a regex pattern, it has to be wrapped around a `tokenizer.Regex`,
otherwise we consider is as a string pattern. For example `pattern="|"` otherwise we consider is as a string pattern. For example `pattern="|"`
means you want to split on `|` (imagine a csv file for example), while means you want to split on `|` (imagine a csv file for example), while

View File

@ -334,7 +334,7 @@ impl PyWhitespaceSplit {
/// ///
/// Args: /// Args:
/// pattern (:obj:`str` or :class:`~tokenizers.Regex`): /// pattern (:obj:`str` or :class:`~tokenizers.Regex`):
/// A pattern used to split the string. Usually a string or a a regex built with `tokenizers.Regex`. /// A pattern used to split the string. Usually a string or a regex built with `tokenizers.Regex`.
/// If you want to use a regex pattern, it has to be wrapped around a `tokenizer.Regex`, /// If you want to use a regex pattern, it has to be wrapped around a `tokenizer.Regex`,
/// otherwise we consider is as a string pattern. For example `pattern="|"` /// otherwise we consider is as a string pattern. For example `pattern="|"`
/// means you want to split on `|` (imagine a csv file for example), while /// means you want to split on `|` (imagine a csv file for example), while