2 overrides of TryMapIdToToken
Microsoft.ML.Tokenizers (2)
Model\SentencePieceBpeModel.cs (1)
65public override bool TryMapIdToToken(int id, out string? token) => _vocabReverse.TryGetValue(id, out token);
Model\SentencePieceUnigramModel.cs (1)
427public override bool TryMapIdToToken(int id, out string? token)
8 references to TryMapIdToToken
Microsoft.ML.Tokenizers (8)
Model\SentencePieceBaseModel.cs (8)
236else if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 241else if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 289if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 406model.TryMapIdToToken(id, out token); 480if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 501if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 578if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 647model.TryMapIdToToken(id, out specialToken);