Example #1
0
  public void join(final Reference r) {
    // joins two entries into one entry

    // combine the distance
    ImageReference oe = (ImageReference) r;
    for (Integer i : r.positions()) this.positions.add(i);
    this.posinphrase =
        (this.posofphrase == oe.posofphrase()) ? Math.min(this.posinphrase, oe.posinphrase()) : 0;
    this.posofphrase = Math.min(this.posofphrase, oe.posofphrase());

    // combine term frequency
    this.termFrequency = this.termFrequency + oe.termFrequency();
    this.wordsintext = this.wordsintext + oe.wordsintext();
  }
Example #2
0
 public ImageReferenceVars(final ImageReference e) {
   this.flags = e.flags();
   // this.freshUntil = e.freshUntil();
   this.lastModified = e.lastModified();
   this.language = e.getLanguage();
   this.urlHash = e.urlhash();
   this.type = e.getType();
   this.hitcount = e.hitcount();
   this.llocal = e.llocal();
   this.lother = e.lother();
   this.phrasesintext = e.phrasesintext();
   this.positions = new ConcurrentLinkedQueue<Integer>();
   for (Integer i : e.positions()) this.positions.add(i);
   this.posinphrase = e.posinphrase();
   this.posofphrase = e.posofphrase();
   this.urlcomps = e.urlcomps();
   this.urllength = e.urllength();
   this.virtualAge = e.virtualAge();
   this.wordsintext = e.wordsintext();
   this.wordsintitle = e.wordsintitle();
   this.termFrequency = e.termFrequency();
 }