You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding needed Tokenizer's APIs
* Address the feedback
* Small update to the newly exposed APIs
* fix comments
* Update the APIs signatures
* More feedback addressing
* Fix the comments
/// <param name="text">The text to encode.</param>
180
-
/// <param name="isSpecialToken">Indicate if the token is a special token.</param>
179
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
180
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token. This parameter is ignored in this model.</param>
181
181
/// <returns>The list of tokens generated from the text tokenization.</returns>
@@ -192,17 +192,17 @@ public override IReadOnlyList<Token> Encode(string text, bool isSpecialToken = f
192
192
/// <summary>
193
193
/// Encode a split text string to a list of Ids and add them to the accumulatedIds list.
194
194
/// </summary>
195
-
/// <param name="text">The text to split.</param>
196
-
/// <param name="isSpecialToken">Indicate if the token is a special token.</param>
195
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
196
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token. This parameter is ignored in this model.</param>
197
197
/// <param name="accumulatedIds">The list of accumulated encoded Ids.</param>
/// Get the number of tokens that the input text will be encoded to.
202
202
/// </summary>
203
-
/// <param name="text">The text to encode.</param>
204
-
/// <param name="isSpecialToken">Indicate if the token is special token.</param>
205
-
/// <returns>The number of tokens that the input text will be encoded to.</returns>
203
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
204
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token. This parameter is ignored in this model.</param>
205
+
/// <returns>The number of tokens that the input text will be encoded to. This parameter is ignored in this model.</returns>
/// <param name="text">The text to encode.</param>
180
-
/// <param name="isSpecialToken">Indicate if the token is a special token.</param>
179
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
180
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token. This parameter is ignored in this model.</param>
181
181
/// <returns>The list of tokens generated from the text tokenization.</returns>
@@ -224,16 +224,16 @@ public override IReadOnlyList<Token> Encode(string text, bool isSpecialToken = f
224
224
/// <summary>
225
225
/// Encode a split text string to a list of Ids and add them to the accumulatedIds list.
226
226
/// </summary>
227
-
/// <param name="text">The text to split.</param>
228
-
/// <param name="isSpecialToken">Indicate if the token is a special token.</param>
227
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
228
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token. This parameter is ignored in this model.</param>
229
229
/// <param name="accumulatedIds">The list of accumulated encoded Ids.</param>
/// Get the number of tokens that the input text will be encoded to.
234
234
/// </summary>
235
-
/// <param name="text">The text to encode.</param>
236
-
/// <param name="isSpecialToken">Indicate if the token is special token.</param>
235
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
236
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token. This parameter is ignored in this model.</param>
237
237
/// <returns>The number of tokens that the input text will be encoded to.</returns>
Copy file name to clipboardExpand all lines: src/Microsoft.ML.Tokenizers/Model/Model.cs
+6-6
Original file line number
Diff line number
Diff line change
@@ -16,16 +16,16 @@ public abstract class Model
16
16
/// <summary>
17
17
/// Encode a text to a list of tokens.
18
18
/// </summary>
19
-
/// <param name="text">The text to encode.</param>
20
-
/// <param name="isSpecialToken">Indicate if the token is a special token.</param>
19
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
20
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token.</param>
21
21
/// <returns>The list of tokens generated from the text tokenization.</returns>
/// Encode a text to a list of Ids and add them to the accumulatedIds list.
26
26
/// </summary>
27
-
/// <param name="text">The text to encode.</param>
28
-
/// <param name="isSpecialToken">Indicate if the token is a special token.</param>
27
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
28
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token.</param>
29
29
/// <param name="accumulatedIds">The list of accumulated encoded Ids.</param>
30
30
/// <remarks>
31
31
/// This method does the default implementation that uses the Encode method to get the token's Ids.
@@ -49,8 +49,8 @@ public virtual void EncodeToIds(ReadOnlySpan<char> text, bool isSpecialToken, IL
49
49
/// <summary>
50
50
/// Get the number of tokens that the input text will be encoded to.
51
51
/// </summary>
52
-
/// <param name="text">The text to encode.</param>
53
-
/// <param name="isSpecialToken">Indicate if the token is special token.</param>
52
+
/// <param name="text">The text to encode. If the value of the parameter <paramref name="isSpecialToken"/> is true, the entire text will be treated as a special token.</param>
53
+
/// <param name="isSpecialToken">Specifies whether the entire <paramref name="text"/> is considered a special token.</param>
54
54
/// <returns>The number of tokens that the input text will be encoded to.</returns>
55
55
/// <remarks>
56
56
/// This method does the default implementation that uses the EncodeToIds method to get the number of token's Ids.
0 commit comments