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