13 references to EncodeToIds
Microsoft.ML.Tokenizers.Tests (13)
BertTokenizerTests.cs (13)
53var ids = tokenizer.EncodeToIds(text); 74ids = tokenizer.EncodeToIds(normalizedText!); 121var ids = tokenizer.EncodeToIds(text); 235IReadOnlyList<int> ids = bertTokenizer.EncodeToIds(text); 236Assert.Equal("[CLS] 叟 驷 叢 驸! [SEP]", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text))); 237Assert.Equal("叟 驷 叢 驸!", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text), skipSpecialTokens: true)); 253ids = bertTokenizer.EncodeToIds(text); 254Assert.Equal("[CLS] 叟驷 叢驸! [SEP]", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text))); 255Assert.Equal("叟驷 叢驸!", bertTokenizer.Decode(bertTokenizer.EncodeToIds(text), skipSpecialTokens: true)); 279var ids1 = bertTokenizer.EncodeToIds(text1); 282var ids2 = bertTokenizer.EncodeToIds(text2); 379var ids1 = bertTokenizer.EncodeToIds(text1); 382var ids2 = bertTokenizer.EncodeToIds(text2);