예제 #1
0
        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);
        }
예제 #2
0
 public VectorWithTag(TfIdfVector vector, byte?tag, int?id)
 {
     Vector = vector.IntVector.ToDictionary(kvp => kvp.Key, kvp => (float)kvp.Value);;
     Tag    = tag;
     Id     = id;
 }