Commit be0ae2e 1 parent de895de commit be0ae2e Copy full SHA for be0ae2e
File tree 1 file changed +41
-0
lines changed
bindings/python/py_src/tokenizers/normalizers
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,47 @@ class BertNormalizer(Normalizer):
99
99
"""
100
100
pass
101
101
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
+
102
143
class Lowercase (Normalizer ):
103
144
"""
104
145
Lowercase Normalizer
You can’t perform that action at this time.
0 commit comments