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)
132public override bool TryMapIdToToken(int id, out string? token)
6 references to TryMapIdToToken
Microsoft.ML.Tokenizers (6)
Model\SentencePieceBaseModel.cs (6)
190else if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 195else if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 243if (!TryDecodeAsSpecialToken(this, current, considerSpecialTokens, ref sb) && TryMapIdToToken(current, out string? token)) 430if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 451if (!isSpecialToken && TryMapIdToToken(current, out string? token)) 528if (!isSpecialToken && TryMapIdToToken(current, out string? token))