Package org.terrier.structures.indexing.singlepass

Examples of org.terrier.structures.indexing.singlepass.PostingInRun


    LexiconEntry le = null;
    // for each run in the list
    int counter = 0;
    //for one term: for each set of postings for that term
    while (run.hasNext()) {
      PostingInRun posting = run.next();
      lastTermWritten = posting.getTerm();
     
      if (posting.getDf() > maxDF)
        maxDF = posting.getDf();
     
      //final int _runMapID = TaskID.forName(_run.getMapNo()).getId();
      //final int runNumber = run.getRunNo();
      final int docOffset = getDocumentOffset(_run.getSplitNo(), _run.getRunNo());
      lastDocument = posting.append(bos, lastDocument, docOffset);
      if (le == null)
        le = posting.getLexiconEntry();
      else
        posting.addToLexiconEntry(le);
      lastFreq += posting.getTF();
      lastDocFreq += posting.getDf();
      counter++;
    }
    le.setTermId(currentTerm++);
    ((BasicLexiconEntry)le).setOffset(startOffset, startBitOffset);
    lexStream.writeNextEntry(lastTermWritten, le);
View Full Code Here

TOP

Related Classes of org.terrier.structures.indexing.singlepass.PostingInRun

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.