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)
407public override bool TryMapIdToToken(int id, out string? token)
6 references to TryMapIdToToken
Microsoft.ML.Tokenizers (6)
Model\SentencePieceBaseModel.cs (6)
234else if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 239else if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 287if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 474if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 495if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 572if (!isSpecialToken && TryMapIdToToken(current, out string? token))