Modifier and Type | Method and Description |
---|---|
void |
addAll(java.util.Collection<TermOccurrence> c) |
void |
addExtension(Term t) |
void |
addOccurrence(TermOccurrence e)
Adds the parameter occurrence and stores it to the inner occurrence list.
|
void |
addOccurrence(TermOccurrence e,
boolean keepOccurrence)
Increments the frequency, updates the inner list of source documents of this term
and optionnaly updates the inner list of occurrences of this term if param
keepOccurrence is set to true. |
void |
addTermVariation(TermVariation termVariation)
|
TermVariation |
addTermVariation(Term variant,
VariationType type,
java.lang.Object info)
|
void |
clearContext() |
int |
compareTo(Term o) |
ContextVector |
computeContextVector(OccurrenceType coTermsType,
int contextSize,
int cooccFrequencyThreshhold,
boolean useTermClasses)
Regenerate the single-word contextVector of this term and returns it.
|
java.util.Iterator<java.util.Iterator<TermOccurrence>> |
contextIterator(OccurrenceType coTermsType,
int contextSize) |
boolean |
equals(java.lang.Object obj) |
TermWord |
firstWord() |
java.util.Set<TermVariation> |
getBases() |
java.lang.Iterable<TermVariation> |
getBases(VariationType... variantTypes)
Get all bases of given
VariationType s |
ContextVector |
getContextVector()
Returns the context vector of this term.
|
int |
getDocumentFrequency() |
java.util.Set<Term> |
getExtensionBases() |
java.util.Set<Term> |
getExtensions() |
java.util.Set<java.lang.String> |
getForms()
Deprecated.
|
int |
getFrequency() |
double |
getFrequencyNorm()
The average number of occurrences of this term in the
corpus for each slice of 1000 words.
|
double |
getGeneralFrequencyNorm()
The average number of occurrences of this term in the
general language corpus for each slice of 1000 words.
|
java.lang.String |
getGroupingKey() |
int |
getId() |
java.lang.String |
getLemma()
Returns the concatenation of inner words' lemmas.
|
java.util.Collection<TermOccurrence> |
getOccurrences() |
java.lang.String |
getPattern()
Turns the term into a list
LemmaStemHolder where each word of the term
is given as itself if not compound, or as a list of its components if compound. |
java.lang.String |
getPilot()
Deprecated.
|
int |
getRank() |
double |
getSpecificity() |
java.lang.String |
getSpottingRule() |
TermClass |
getTermClass() |
java.lang.Number |
getValue() |
java.util.List<VariationPath> |
getVariationPaths(int depth) |
java.util.Set<TermVariation> |
getVariations() |
java.lang.Iterable<TermVariation> |
getVariations(VariationType... variantTypes)
Get all variations of given
VariationType s |
java.util.List<TermWord> |
getWords() |
int |
hashCode() |
boolean |
isCompound() |
boolean |
isContextVectorComputed()
True if the context vector of this term has been computed.
|
boolean |
isFixedExpression() |
boolean |
isMultiWord() |
boolean |
isSingleWord() |
boolean |
isVariant() |
void |
normalize(CrossTable crossTable) |
void |
removeTermVariation(TermVariation variation)
Removes the param variation from this
variations and
from variant's bases . |
void |
setBases(java.util.SortedSet<TermVariation> bases)
Deprecated.
|
void |
setContextVector(ContextVector vector) |
void |
setFixedExpression(boolean fixedExpression) |
void |
setFrequency(int frequency) |
void |
setFrequencyNorm(double normalizedTermFrequency) |
void |
setGeneralFrequencyNorm(double normalizedGeneralTermFrequency) |
void |
setPattern(java.lang.String pattern) |
void |
setRank(int rank) |
void |
setSpecificity(double specificity) |
void |
setTermClass(TermClass termClass) |
void |
setVariations(java.util.SortedSet<TermVariation> variations)
Deprecated.
|
java.lang.String |
toString() |
public void setFrequency(int frequency)
public void setPattern(java.lang.String pattern)
public java.util.Collection<TermOccurrence> getOccurrences()
public void addOccurrence(TermOccurrence e, boolean keepOccurrence)
keepOccurrence
is set to true.e
- the occurrence object to addkeepOccurrence
- set this param to true if you need the occurrence to be stored within the objectgetOccurrences()
public void addOccurrence(TermOccurrence e)
e
- the occurrence objectaddOccurrence(TermOccurrence, boolean)
public void addAll(java.util.Collection<TermOccurrence> c)
public int compareTo(Term o)
compareTo
in interface java.lang.Comparable<Term>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getGroupingKey()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isSingleWord()
public boolean isMultiWord()
public TermVariation addTermVariation(Term variant, VariationType type, java.lang.Object info)
variant
- type
- info
- public void addTermVariation(TermVariation termVariation)
termVariation
- public void removeTermVariation(TermVariation variation)
variations
and
from variant's bases
.variation
- public java.lang.String getPattern()
LemmaStemHolder
where each word of the term
is given as itself if not compound, or as a list of its components if compound.compoundLevel
- set to true
if this method should iterate over
components when words are compound, set it to false
if this method should iterate over plain words even though
they are compounds.compoundLevel
) compounds.public java.util.List<TermWord> getWords()
public int getFrequency()
public TermWord firstWord()
public boolean isCompound()
public int getId()
public java.lang.String getSpottingRule()
public boolean isVariant()
@Deprecated public java.util.Set<java.lang.String> getForms()
TermUtils.formGetter(TermIndex, boolean)
instead.@Deprecated public java.lang.String getPilot()
TermUtils.formGetter(TermIndex, boolean)
instead.public java.lang.String getLemma()
public java.util.List<VariationPath> getVariationPaths(int depth)
public ContextVector getContextVector()
#computeContextVector(contextSize)
method.ContextVector
of this termjava.lang.IllegalStateException
- if the inner context vector does not exist (invoke #computeContextVector(contextSize)
)
to generate this vector if missing.isContextVectorComputed()
public boolean isContextVectorComputed()
getContextVector()
public ContextVector computeContextVector(OccurrenceType coTermsType, int contextSize, int cooccFrequencyThreshhold, boolean useTermClasses)
coTermsType
- contextSize
- cooccFrequencyThreshhold
- useTermClasses
- ContextVector
objectpublic java.util.Iterator<java.util.Iterator<TermOccurrence>> contextIterator(OccurrenceType coTermsType, int contextSize)
public int getDocumentFrequency()
public void normalize(CrossTable crossTable)
public java.lang.Number getValue()
public void setContextVector(ContextVector vector)
public void clearContext()
public void setTermClass(TermClass termClass)
public TermClass getTermClass()
public java.util.Set<TermVariation> getVariations()
public java.util.Set<TermVariation> getBases()
public java.lang.Iterable<TermVariation> getVariations(VariationType... variantTypes)
VariationType
svariantTypes
- public java.lang.Iterable<TermVariation> getBases(VariationType... variantTypes)
VariationType
svariantTypes
- public void setFrequencyNorm(double normalizedTermFrequency)
public void setGeneralFrequencyNorm(double normalizedGeneralTermFrequency)
public double getGeneralFrequencyNorm()
public double getFrequencyNorm()
public void addExtension(Term t)
public java.util.Set<Term> getExtensions()
public java.util.Set<Term> getExtensionBases()
@Deprecated public void setVariations(java.util.SortedSet<TermVariation> variations)
variations
- @Deprecated public void setBases(java.util.SortedSet<TermVariation> bases)
variations
- public int getRank()
public void setRank(int rank)
public double getSpecificity()
public void setSpecificity(double specificity)
public void setFixedExpression(boolean fixedExpression)
public boolean isFixedExpression()