uk.ac.gla.dcs.renaissance.interference
Class PhasesComputer
java.lang.Object
bpiwowar.experiments.AbstractTask
uk.ac.gla.dcs.renaissance.interference.PhasesComputer
- All Implemented Interfaces:
- bpiwowar.experiments.Task
public class PhasesComputer
- extends bpiwowar.experiments.AbstractTask
Nested classes/interfaces inherited from class bpiwowar.experiments.AbstractTask |
bpiwowar.experiments.AbstractTask.Information |
Methods inherited from class bpiwowar.experiments.AbstractTask |
getName, getParent, init, processTrailingArguments, run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PhasesComputer
public PhasesComputer()
PhasesComputer
public PhasesComputer(Cooccurrences cooccurrencesProcessor,
CorpusCooccurrences corpusCooccurrences)
setCorpusCooccurrences
public void setCorpusCooccurrences(CorpusCooccurrences corpusCooccurrences)
computePhases
public double[] computePhases(Iterator<Long> termIterator,
Map<Long,Integer> mapping,
Set<Long> interestingTerms)
throws Exception
- Computes the phases for a set of terms
- Parameters:
termIterator
- mapping
- Internal mapping between a term id and a phase in the array,
which is filled while processing the document if the term is
interfering with another oneinterestingTerms
- Terms for which we have in interested in knowing the phase
(null if all)
- Returns:
- An array of phases for which mapping provides the mapping
- Throws:
Exception
- if something goes wrong
processDocument
public void processDocument(Iterator<Long> termIterator,
Map<Cooccurrences.UnorderedPair,Cooccurrences.Statistics> statistics,
Set<Long> terms)
- Process a document
- Parameters:
termIterator
- The iterator on termsstatistics
- The statistics that we will collectterms
- The set of terms of the documentglobalPairs
- The set of pairs that have been detected at a global level
init
public void init(Mapping<String,Long> mappingAdaptator)
throws IOException
- Throws:
IOException
execute
public int execute()
throws Throwable
- Overrides:
execute
in class bpiwowar.experiments.AbstractTask
- Throws:
Throwable
Copyright © 2011. All Rights Reserved.