15 references to EncodeToIds
Microsoft.ML.Tokenizers.Tests (15)
BertTokenizerTests.cs (15)
70var ids = tokenizer.EncodeToIds(text); 92ids = tokenizer.EncodeToIds(normalizedText!); 142var ids = tokenizer.EncodeToIds(text); 163ids = tokenizer.EncodeToIds(normalizedText!); 210var ids = tokenizer.EncodeToIds(text); 324IReadOnlyList<int> ids = bertTokenizer.EncodeToIds(text); 325Assert.Equal("[CLS] 叟 驷 叢 驸! [SEP]", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text))); 326Assert.Equal("叟 驷 叢 驸!", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text), skipSpecialTokens: true)); 342ids = bertTokenizer.EncodeToIds(text); 343Assert.Equal("[CLS] 叟驷 叢驸! [SEP]", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text))); 344Assert.Equal("叟驷 叢驸!", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text), skipSpecialTokens: true)); 368var ids1 = bertTokenizer.EncodeToIds(text1); 371var ids2 = bertTokenizer.EncodeToIds(text2); 468var ids1 = bertTokenizer.EncodeToIds(text1); 471var ids2 = bertTokenizer.EncodeToIds(text2);