uk.ac.gla.dcs.renaissance.interference
Class Cooccurrences

java.lang.Object
  extended by uk.ac.gla.dcs.renaissance.interference.Cooccurrences
Direct Known Subclasses:
CollectionCooccurrence

public class Cooccurrences
extends Object


Nested Class Summary
static class Cooccurrences.Statistics
           
protected static class Cooccurrences.UnorderedPair
          Set of two integers
 
Field Summary
protected  int width
           
 
Constructor Summary
Cooccurrences()
           
 
Method Summary
protected  void add(Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics, bpiwowar.utils.SlidingWindow<Long> window, int position, TreeMap<Long,bpiwowar.utils.MutableInteger> lastOccurrences, uk.ac.gla.dcs.renaissance.interference.Cooccurrences.Limit limit)
          Update term co-occurrence statistics
protected  void processDocument(Iterator<Long> stemsId, Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics)
           
protected  void processDocument(Iterator<Long> stemIterator, Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics, Set<Cooccurrences.UnorderedPair> includePairs, uk.ac.gla.dcs.renaissance.interference.Cooccurrences.Limit limit)
          Process a document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected int width
Constructor Detail

Cooccurrences

public Cooccurrences()
Method Detail

processDocument

protected void processDocument(Iterator<Long> stemsId,
                               Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics)

processDocument

protected void processDocument(Iterator<Long> stemIterator,
                               Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics,
                               Set<Cooccurrences.UnorderedPair> includePairs,
                               uk.ac.gla.dcs.renaissance.interference.Cooccurrences.Limit limit)
Process a document

Parameters:
stemIterator - An iterator on the stem ids
statistics - The structure to fill with co-occurrence counts
includePairs - Pairs to include
limit - Limit the processing to some words / occurrences

add

protected void add(Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics,
                   bpiwowar.utils.SlidingWindow<Long> window,
                   int position,
                   TreeMap<Long,bpiwowar.utils.MutableInteger> lastOccurrences,
                   uk.ac.gla.dcs.renaissance.interference.Cooccurrences.Limit limit)
Update term co-occurrence statistics

Parameters:
window - the window
position - the position of the term to analyze
lastOccurrences -
limit -


Copyright © 2011. All Rights Reserved.