1 instantiation of Word
Microsoft.ML.Tokenizers (1)
14 references to Word
Microsoft.ML.Tokenizers (14)
Model\BPETokenizer.cs (13)
247Cache = new StringSpanOrdinalKeyCache<Word>();
795internal StringSpanOrdinalKeyCache<Word>? Cache { get; }
864internal Word MergeWord(ReadOnlySpan<char> w, ref PriorityQueue<Merge>? priorityQueue)
866Word word = Word.WithCapacity(w.Length);
979internal void WordToTokens(ref Word word, List<EncodedToken> tokens, int offset) => word.ToTokens(VocabReverse, tokens, offset);
989Word word;
1013internal int WordToIds(ref Word word, IList<int>? accumulatedIds, out int charsConsumed, int fullTextLength, int maxTokens)
1034internal int WordToIdsFromEnd(ref Word word, IList<int>? accumulatedIds, out int textIndex, int fullTextLength, int maxTokens)
1064Word word;
1068if (Cache.TryGetValue(text, out Word hit))
1090Word word;
1101if (Cache.TryGetValue(text, out Word hit))