Package org.terrier.structures.postings

Examples of org.terrier.structures.postings.Posting


    List<Posting> postingList = new ArrayList<Posting>();
    int doclen = 0;
    TIntHashSet foundIds = new TIntHashSet();
    while(documentPostings.hasNext())
    {
      final Posting p = documentPostings.next().asWritablePosting();
      //check for duplicate pointers
      if (! foundIds.contains(p.getId()) )
      {
        postingList.add(p);
        doclen += p.getFrequency();
        reporter.progress();
        foundIds.add(p.getId());
      }
      else
      {
        dupPointers++;
      }
View Full Code Here


  {
    BitIndexPointer pointer = new SimpleBitIndexPointer();
    pointer.setOffset(output.getByteOffset(), output.getBitOffset());
    int numberOfEntries = 0;
   
    Posting posting = null;
    while(iterator.hasNext())
    {
      posting = iterator.next();
      output.writeGamma(posting.getId() - previousId);
      previousId = posting.getId();
      writePostingNotDocid(posting);
      numberOfEntries++;
    }
    pointer.setNumberOfEntries(numberOfEntries);
    return pointer;
View Full Code Here

          final IterablePosting postings = dfInput2.next();
         
          List<Posting> postingList = new ArrayList<Posting>();
          while(postings.next() != IterablePosting.EOL)
          {
            final Posting p = postings.asWritablePosting();
            p.setId(termcodeHashmap.get(postings.getId()));
            postingList.add(p);
          }
          Collections.sort(postingList, new PostingIdComparator());
          pointerDF = dfOutput.writePostings(postingList.iterator());
        }
View Full Code Here

TOP

Related Classes of org.terrier.structures.postings.Posting

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.