Examples of decompressPositions()


Examples of ivory.ffg.data.CompressedPositionalPostings.decompressPositions()

        //extract features
        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];

          pos[0] = ps.decompressPositions(cnt);
          int dl = docLengths.get(docno);
          for(int fid = 0; fid < features.length; fid++) {
            fvalues[cnt][fid] = features[fid].computeScoreWithMiniIndexes(pos, query, dl, stats);
          }
          if(writeOutput) {
View Full Code Here

Examples of ivory.ffg.data.CompressedPositionalPostings.decompressPositions()

        //extract features
        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];

          pos[0] = ps.decompressPositions(cnt);
          int dl = docLengths.get(docno);
          for(int fid = 0; fid < features.length; fid++) {
            fvalues[cnt][fid] = features[fid].computeScoreWithMiniIndexes(pos, query, dl, stats);
          }
          if(writeOutput) {
View Full Code Here

Examples of ivory.ffg.data.DocumentVector.decompressPositions()

  public float[][] extract(int[] qterms, int[] docids, Feature[] features) throws Exception {
    float[][] fvalues = new float[docids.length][features.length];

    for(int d = 0; d < docids.length; d++) {
      DocumentVector compDoc = documents.get(docids[d]);
      int[][] positions = compDoc.decompressPositions(qterms);
      computeFeatures(qterms, positions, compDoc.getDocumentLength(), features, fvalues[d]);
    }
    return fvalues;
  }
View Full Code Here

Examples of ivory.ffg.data.DocumentVector.decompressPositions()

      try {
        for(Feature f: features.keySet()) {
          f.initialize(new TfScoringFunction());

          for(int[] query: features.get(f).keySet()) {
            int[][] positions = dv.decompressPositions(query);
            float fValue = f.
              computeScoreWithMiniIndexes(positions, query, dv.getDocumentLength(), null);
            assertEquals(features.get(f).get(query), fValue, 1e-10);
          }
        }
View Full Code Here

Examples of ivory.ffg.data.DocumentVector.decompressPositions()

  public float[][] extract(int[] qterms, int[] docids, Feature[] features) throws Exception {
    float[][] fvalues = new float[docids.length][features.length];

    for(int d = 0; d < docids.length; d++) {
      DocumentVector compDoc = documents.get(docids[d]);
      int[][] positions = compDoc.decompressPositions(qterms);
      computeFeatures(qterms, positions, compDoc.getDocumentLength(), features, fvalues[d]);
    }
    return fvalues;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.