Пример #1
0
 public void Compute()
 {
     if (TermFrequencyByScope.ContainsKey(DocumentBlenderFunctionOptions.layerLevel))
     {
         layer_frequency = TermFrequencyByScope[DocumentBlenderFunctionOptions.layerLevel];
     }
     if (TermFrequencyByScope.ContainsKey(DocumentBlenderFunctionOptions.blockLevel))
     {
         block_frequency = TermFrequencyByScope[DocumentBlenderFunctionOptions.blockLevel];
     }
     if (TermFrequencyByScope.ContainsKey(DocumentBlenderFunctionOptions.pageLevel))
     {
         page_frequency = TermFrequencyByScope[DocumentBlenderFunctionOptions.pageLevel];
     }
     if (TermFrequencyByScope.ContainsKey(DocumentBlenderFunctionOptions.siteLevel))
     {
         site_frequency = TermFrequencyByScope[DocumentBlenderFunctionOptions.siteLevel];
     }
     if (TermFrequencyByScope.ContainsKey(DocumentBlenderFunctionOptions.categoryLevel))
     {
         class_frequency = TermFrequencyByScope[DocumentBlenderFunctionOptions.categoryLevel];
     }
     if (TermFrequencyByScope.ContainsKey(DocumentBlenderFunctionOptions.datasetLevel))
     {
         total_frequency = TermFrequencyByScope[DocumentBlenderFunctionOptions.datasetLevel];
     }
 }
Пример #2
0
 public void Add(DocumentBlenderFunctionOptions scope, Boolean contained)
 {
     if (!TermFrequencyByScope.ContainsKey(scope))
     {
         TermFrequencyByScope.Add(scope, 0);
     }
     if (contained)
     {
         TermFrequencyByScope[scope]++;
     }
 }
Пример #3
0
 public void Add(DocumentBlenderFunctionOptions scope, Double __score, Boolean sumValue = true)
 {
     if (!TermFrequencyByScope.ContainsKey(scope))
     {
         TermFrequencyByScope.Add(scope, 0);
     }
     if (sumValue)
     {
         TermFrequencyByScope[scope] += __score;
     }
     else
     {
         TermFrequencyByScope[scope] = __score;
     }
 }