33 references to Types
Microsoft.ML.Tokenizers (33)
Model\SentencePieceBpeModel.cs (11)
34
if (piece.Type == ModelProto.Types.SentencePiece.
Types
.Type.Byte)
56
_vocab.Add(new StringSpanOrdinalKey(item.Token), (id, item.Score, (byte)ModelProto.Types.SentencePiece.
Types
.Type.Normal));
226
if (type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused)
314
if (id.Type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused ||
504
if (type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused)
619
if (id.Type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused ||
772
if (type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused)
878
if (id.Type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused ||
1048
if (type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused)
1154
if (id.Type != (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused ||
1254
if (leftId.Type == (byte)ModelProto.Types.SentencePiece.
Types
.Type.Unused)
Model\SentencePieceUnigramModel.cs (16)
21
private readonly (string Piece, float Score, ModelProto.Types.SentencePiece.
Types
.Type Type)[] _vocabReverse;
30
_vocabReverse = new (string Piece, float Score, ModelProto.Types.SentencePiece.
Types
.Type Type)[modelProto.Pieces.Count];
37
if (modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.
Types
.Type.Normal ||
38
modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.
Types
.Type.UserDefined ||
39
modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.
Types
.Type.Unused)
48
else if (modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.
Types
.Type.Byte)
52
else if (modelProto.Pieces[i].Type == ModelProto.Types.SentencePiece.
Types
.Type.Unknown)
55
_vocabReverse[i] = (modelProto.Pieces[i].Piece, modelProto.Pieces[i].Score, ModelProto.Types.SentencePiece.
Types
.Type.Unknown);
77
_vocabReverse[modelProto.TrainerSpec.BosId] = (modelProto.TrainerSpec.BosPiece, 0f, ModelProto.Types.SentencePiece.
Types
.Type.Control);
78
_vocabReverse[modelProto.TrainerSpec.EosId] = (modelProto.TrainerSpec.EosPiece, 0f, ModelProto.Types.SentencePiece.
Types
.Type.Control);
79
_vocabReverse[modelProto.TrainerSpec.UnkId] = (modelProto.TrainerSpec.UnkPiece, 0f, ModelProto.Types.SentencePiece.
Types
.Type.Unknown);
84
_vocabReverse[modelProto.TrainerSpec.PadId] = (modelProto.TrainerSpec.PadPiece, 0f, ModelProto.Types.SentencePiece.
Types
.Type.Control);
94
List<(string Piece, float Score, ModelProto.Types.SentencePiece.
Types
.Type Type)> vocabReverse = new(250_000);
103
vocabReverse.Add((item.Token, item.Score, ModelProto.Types.SentencePiece.
Types
.Type.Normal));
556
if (_vocabReverse[ret].Type == ModelProto.Types.SentencePiece.
Types
.Type.Unused)
566
float score = _vocabReverse[ret].Type == ModelProto.Types.SentencePiece.
Types
.Type.UserDefined ? length * _maxScore - 0.1f : _vocabReverse[ret].Score;
SentencepieceModel.cs (6)
104
new pbr::GeneratedClrTypeInfo(typeof(global::Sentencepiece.ModelProto), global::Sentencepiece.ModelProto.Parser, new[]{ "Pieces", "TrainerSpec", "NormalizerSpec", "SelfTestData", "DenormalizerSpec" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Sentencepiece.ModelProto.Types.SentencePiece), global::Sentencepiece.ModelProto.Types.SentencePiece.Parser, new[]{ "Piece", "Score", "Type" }, null, new[]{ typeof(global::Sentencepiece.ModelProto.Types.SentencePiece.
Types
.Type) }, null, null)})
4408
private readonly static global::Sentencepiece.ModelProto.Types.SentencePiece.
Types
.Type TypeDefaultValue = global::Sentencepiece.ModelProto.Types.SentencePiece.
Types
.Type.Normal;
4410
private global::Sentencepiece.ModelProto.Types.SentencePiece.
Types
.Type type_;
4413
public global::Sentencepiece.ModelProto.Types.SentencePiece.
Types
.Type Type {
4624
Type = (global::Sentencepiece.ModelProto.Types.SentencePiece.
Types
.Type) input.ReadEnum();