Ejemplo n.º 1
0
      public double GetDocumentWeight(int docID, IIndex index)
      {
          double docWeight;

          DiskPositionalIndex.PostingDocWeight temp = index.GetPostingDocWeight(docID);
          docWeight = temp.GetDocWeight();
          return(docWeight);
      }
Ejemplo n.º 2
0
      public double GetDocumentWeight(int docID, IIndex index)
      {
          DiskPositionalIndex.PostingDocWeight temp = index.GetPostingDocWeight(docID);
          int    fileSizeInByte = temp.GetDocByteSize();
          double WackyLd        = (double)(Math.Sqrt(fileSizeInByte));

          Console.WriteLine(WackyLd);
          return(WackyLd);
      }
Ejemplo n.º 3
0
      public double calculateDoc2TermWeight(double termFrequency, int docID, int corpusSize, IIndex index)
      {
          DiskPositionalIndex.PostingDocWeight temp = index.GetPostingDocWeight(docID);
          int    documentLength = temp.GetDocTokenCount();
          double numeratorO     = 2.2 * termFrequency;
          double denominatorO   = 1.2 * (0.25 + 0.75 * (double)(documentLength / Indexer.averageDocLength)) + termFrequency;
          double OkapiWdtValue  = (double)numeratorO / denominatorO;

          return(OkapiWdtValue);
      }
Ejemplo n.º 4
0
      public double calculateDoc2TermWeight(double termFrequency, int docID, int corpusSize, IIndex index)
      {
          DiskPositionalIndex.PostingDocWeight temp = index.GetPostingDocWeight(docID);


          double avDocTermFreq = temp.GetDocAveTermFreq();
          double numeratorW    = (double)1 + Math.Log(termFrequency);
          double denominatorW  = (double)1 + Math.Log(avDocTermFreq);
          double WackyWdtValue = (double)numeratorW / denominatorW;

          return(WackyWdtValue);
      }