public abstract class AbstractTermIndexCleaner
extends org.apache.uima.fit.component.JCasAnnotator_ImplBase
TermIndex
post-processing cleaning
based on a property.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLEANING_PERIOD |
static java.lang.String |
CLEANING_PROPERTY |
protected int |
cleaningPeriod |
static java.lang.String |
KEEP_VARIANTS |
protected boolean |
keepVariants |
static java.lang.String |
NUM_TERMS_CLEANING_TRIGGER |
protected int |
numTermsCleaningTrigger |
static java.lang.String |
PERIODIC_CAS_CLEAN_ON |
protected boolean |
periodicCasClean |
protected TermProperty |
property |
protected TermIndexResource |
termIndexResource |
Constructor and Description |
---|
AbstractTermIndexCleaner() |
Modifier and Type | Method and Description |
---|---|
protected void |
clean() |
void |
collectionProcessComplete() |
protected abstract void |
doCleaningPartition(java.util.Set<Term> keptTerms,
java.util.Set<Term> removedTerms)
Does the specialized cleaning job (on which the logic
for variant keeping will apply)
|
void |
initialize(org.apache.uima.UimaContext context) |
void |
process(org.apache.uima.jcas.JCas aJCas) |
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
protected TermIndexResource termIndexResource
public static final java.lang.String CLEANING_PROPERTY
protected TermProperty property
public static final java.lang.String KEEP_VARIANTS
protected boolean keepVariants
public static final java.lang.String PERIODIC_CAS_CLEAN_ON
protected boolean periodicCasClean
public static final java.lang.String CLEANING_PERIOD
protected int cleaningPeriod
public static final java.lang.String NUM_TERMS_CLEANING_TRIGGER
protected int numTermsCleaningTrigger
public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in class org.apache.uima.fit.component.JCasAnnotator_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void process(org.apache.uima.jcas.JCas aJCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public void collectionProcessComplete() throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
collectionProcessComplete
in interface org.apache.uima.analysis_component.AnalysisComponent
collectionProcessComplete
in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
protected void clean()
protected abstract void doCleaningPartition(java.util.Set<Term> keptTerms, java.util.Set<Term> removedTerms)
keptTerms
- The set of terms to keep in index (to be fill by implementor)removedTerms
- The set of terms to remove index (to be fill by implementor)