public void CreateVector(PositionalIndex TitleIndex, PositionalIndex ContentIndex) { if (TitleIndex != null) { TitleVector = new TfIdfVector(TitleIndex, GetTokens(TitleTokens), Document.Id); } ContentVector = new TfIdfVector(ContentIndex, GetTokens(ContentTokens), Document.Id); }
public VectorWithTag(TfIdfVector vector, byte?tag, int?id) { Vector = vector.IntVector.ToDictionary(kvp => kvp.Key, kvp => (float)kvp.Value);; Tag = tag; Id = id; }