public Term(object key, AnalyzedString tokenizedString, int index) { Key = key; KeyHash = key.ToHash(); TokenizedString = tokenizedString; Index = index; }
public Term(IComparable key, AnalyzedString tokenizedString, int index) { Key = key; KeyHash = key.ToHash(); TokenizedString = tokenizedString; Index = index; }
public static SortedList <long, byte> ToCharVector(this AnalyzedString term, int offset, int length) { var vec = new SortedList <long, byte>(); for (int i = 0; i < length; i++) { var codePoint = (int)term.Source[offset + i]; if (vec.ContainsKey(codePoint)) { vec[codePoint] += 1; } else { vec[codePoint] = 1; } } return(vec); }
public Term(long keyId, AnalyzedString tokenizedString, int index) { KeyId = keyId; TokenizedString = tokenizedString; Index = index; }