Package net.ontopia.topicmaps.classify
Class Term
java.lang.Object
net.ontopia.topicmaps.classify.Term
PUBLIC: Represents a concept which occurs in the classified
content. A term can have many variants, all of which can be found
from this object. It also has a score, indicating the importance of
the term within the content.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected static Comparator<Term>protected Stringprotected intprotected gnu.trove.map.hash.TObjectIntHashMap<Variant> -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddVariant(Variant variant) protected voidaddVariant(Variant variant, int occurrences) protected voiddivideScore(double factor, String reason) intPUBLIC: Returns the number of times the term occurred within the classified content.protected intgetOccurrences(Variant variant) PUBLIC: Returns the preferred variant of the term.doublegetScore()PUBLIC: Returns the term's score, a number in the range 0-1, indicating its importance within the content.protected doublegetStem()PUBLIC: Returns the stem common to all variants of the term.Variant[]PUBLIC: Returns all variant spellings of this term within the content.Variant[]PUBLIC: Returns all variant spellings of this term within the content, with the most important first.protected voidprotected voidmultiplyScore(double factor, String reason) protected voidtoString()
-
Field Details
-
stem
-
score
protected double score -
totalOccurrences
protected int totalOccurrences -
variants
-
SCORE_COMPARATOR
-
-
Method Details
-
getStem
PUBLIC: Returns the stem common to all variants of the term. Often, the stem does not actually occur in the content. -
getScore
public double getScore()PUBLIC: Returns the term's score, a number in the range 0-1, indicating its importance within the content. -
getVariants
PUBLIC: Returns all variant spellings of this term within the content. -
getVariantsByRank
PUBLIC: Returns all variant spellings of this term within the content, with the most important first. -
getOccurrences
public int getOccurrences()PUBLIC: Returns the number of times the term occurred within the classified content. -
getPreferredName
PUBLIC: Returns the preferred variant of the term. This is a form of the term which actually occurred in the classified content. -
getScore
-
getOccurrences
-
setScore
-
addScore
-
multiplyScore
-
divideScore
-
addVariant
-
addVariant
-
merge
-
toString
-