2 writes to NormalizerSpec
Microsoft.ML.Tokenizers (2)
SentencepieceModel.cs (2)
4151
NormalizerSpec
= new global::Sentencepiece.NormalizerSpec();
4247
NormalizerSpec
= new global::Sentencepiece.NormalizerSpec();
17 references to NormalizerSpec
Microsoft.ML.Tokenizers (17)
Model\LlamaTokenizer.cs (6)
52
if (modelProto.
NormalizerSpec
.Name != "identity" && !string.IsNullOrEmpty(modelProto.
NormalizerSpec
.Name))
54
throw new ArgumentException($"Normalization '{modelProto.
NormalizerSpec
.Name}' is not supported.", nameof(modelProto));
58
modelProto.
NormalizerSpec
.RemoveExtraWhitespaces,
59
modelProto.
NormalizerSpec
.AddDummyPrefix,
60
modelProto.
NormalizerSpec
.EscapeWhitespaces,
Model\SentencePieceTokenizer.cs (3)
70
AddDummyPrefix = modelProto.
NormalizerSpec
.AddDummyPrefix;
71
EscapeWhiteSpaces = modelProto.
NormalizerSpec
.EscapeWhitespaces;
76
_normalizer = new SentencePieceNormalizer(modelProto.
NormalizerSpec
.RemoveExtraWhitespaces, AddDummyPrefix, EscapeWhiteSpaces, modelProto.TrainerSpec.TreatWhitespaceAsSuffix, specialTokens);
SentencepieceModel.cs (8)
4015
if (!object.Equals(
NormalizerSpec
, other.
NormalizerSpec
)) return false;
4030
if (normalizerSpec_ != null) hash ^=
NormalizerSpec
.GetHashCode();
4091
output.WriteMessage(
NormalizerSpec
);
4119
size += 1 + pb::CodedOutputStream.ComputeMessageSize(
NormalizerSpec
);
4153
NormalizerSpec
.MergeFrom(other.
NormalizerSpec
);
4249
input.ReadMessage(
NormalizerSpec
);