Examples of decompressDocument()


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

  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[] doc = compDoc.decompressDocument();
      int[] hashedTerms = compDoc.transformTerms(qterms);
      computeFeatures(doc, qterms, hashedTerms, features, fvalues[d]);
    }
    return fvalues;
  }
View Full Code Here

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

  @Test public void testFeaturesSlidingWindow() throws Exception {
    for(String dvclass: documentVectorClass) {
      DocumentVector dv = DocumentVectorUtility.newInstance(dvclass, intDocVector);

      try {
        int[] transformedDoc = dv.decompressDocument();

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

          for(int[] query: features.get(f).keySet()) {
View Full Code Here

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

  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[] doc = compDoc.decompressDocument();
      int[] hashedTerms = compDoc.transformTerms(qterms);
      computeFeatures(doc, qterms, hashedTerms, 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.