Package ivory.core.data.document

Examples of ivory.core.data.document.IntDocVector


    for(int qid: qrels.keySet()) {
      for(int docid: qrels.get(qid)) {
        if(!docidHistory.contains(docid)) {
          docidHistory.add(docid);

          IntDocVector vector = env.documentVectors(new int[]{docid})[0];
          output.writeInt(docid);
          DocumentVectorUtility.newInstance(documentVectorClass, vector).write(output);
        }
      }
      LOGGER.info("Compressed query " + qid);
View Full Code Here


    Map<String, Integer> vocab = Maps.newHashMap();
    Map<String, Short>[] tfs = new HashMap[docVecs.length];
    int[] doclens = new int[docVecs.length];

    for (int i = 0; i < docVecs.length; i++) {
      IntDocVector doc = docVecs[i];

      Map<String, Short> docTfs = new HashMap<String, Short>();
      int doclen = 0;

      Reader dvReader = doc.getReader();
      while (dvReader.hasMoreTerms()) {
        int termid = dvReader.nextTerm();
        String stem = env.getTermFromId(termid);
        short tf = dvReader.getTf();
View Full Code Here

    Map<String, Integer> vocab = Maps.newHashMap();
    Map<String, Short>[] tfs = new HashMap[docVecs.length];
    int[] doclens = new int[docVecs.length];

    for (int i = 0; i < docVecs.length; i++) {
      IntDocVector doc = docVecs[i];

      Map<String, Short> docTfs = new HashMap<String, Short>();
      int doclen = 0;

      Reader dvReader = doc.getReader();
      while (dvReader.hasMoreTerms()) {
        int termid = dvReader.nextTerm();
        String stem = env.getTermFromId(termid);
        short tf = dvReader.getTf();
View Full Code Here

    for(int qid: qrels.keySet()) {
      for(int docid: qrels.get(qid)) {
        if(!docidHistory.contains(docid)) {
          docidHistory.add(docid);

          IntDocVector vector = env.documentVectors(new int[]{docid})[0];
          output.writeInt(docid);
          DocumentVectorUtility.newInstance(documentVectorClass, vector).write(output);
        }
      }
      LOGGER.info("Compressed query " + qid);
View Full Code Here

TOP

Related Classes of ivory.core.data.document.IntDocVector

Copyright © 2018 www.massapicom. 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.