Skip to content

Commit be0ae2e

Browse files
committed
stub
1 parent de895de commit be0ae2e

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

bindings/python/py_src/tokenizers/normalizers/__init__.pyi

+41
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,47 @@ class BertNormalizer(Normalizer):
9999
"""
100100
pass
101101

102+
class ByteLevel(Normalizer):
103+
"""
104+
Bytelevel Normalizer
105+
"""
106+
def __init__(self):
107+
pass
108+
109+
def normalize(self, normalized):
110+
"""
111+
Normalize a :class:`~tokenizers.NormalizedString` in-place
112+
113+
This method allows to modify a :class:`~tokenizers.NormalizedString` to
114+
keep track of the alignment information. If you just want to see the result
115+
of the normalization on a raw string, you can use
116+
:meth:`~tokenizers.normalizers.Normalizer.normalize_str`
117+
118+
Args:
119+
normalized (:class:`~tokenizers.NormalizedString`):
120+
The normalized string on which to apply this
121+
:class:`~tokenizers.normalizers.Normalizer`
122+
"""
123+
pass
124+
125+
def normalize_str(self, sequence):
126+
"""
127+
Normalize the given string
128+
129+
This method provides a way to visualize the effect of a
130+
:class:`~tokenizers.normalizers.Normalizer` but it does not keep track of the alignment
131+
information. If you need to get/convert offsets, you can use
132+
:meth:`~tokenizers.normalizers.Normalizer.normalize`
133+
134+
Args:
135+
sequence (:obj:`str`):
136+
A string to normalize
137+
138+
Returns:
139+
:obj:`str`: A string after normalization
140+
"""
141+
pass
142+
102143
class Lowercase(Normalizer):
103144
"""
104145
Lowercase Normalizer

0 commit comments

Comments
 (0)