|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.classify.TermDatabase
public class TermDatabase
PUBLIC: A collection of terms representing the result of classifying a piece of content. The terms have scores indicating their importance within the content, and variants, indicating different spellings for the same term within the content.
Use SimpleClassifier to create TermDatabase objects.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,Token> |
delimiter_terms
|
protected java.util.Map<java.lang.String,Term> |
terms
|
protected java.util.Map<java.lang.String,Variant> |
variants
|
Method Summary | |
---|---|
protected Token |
createDelimiter(java.lang.String delimiter)
|
protected Term |
createTerm(java.lang.String stem)
|
protected Variant |
createVariant(java.lang.String variant)
|
void |
dump()
INTERNAL: Writes the contents of the term database out to System.out for debugging purposes. |
void |
dump(int firstN)
INTERNAL: Writes the contents of the term database out to System.out for debugging purposes. |
protected double |
getMaxScore()
|
Term |
getTerm(java.lang.String stem)
PUBLIC: Looks up a particular term by its stem. |
int |
getTermCount()
PUBLIC: Returns the number of terms in the database. |
java.util.Collection<Term> |
getTerms()
PUBLIC: Returns all terms found in the classified content. |
Term[] |
getTermsByRank()
PUBLIC: Returns all terms found in the classified content sorted by score. |
Variant |
getVariant(java.lang.String variant)
PUBLIC: Looks up a particular variant by its string representation. |
protected void |
mergeTerms(Term t1,
Term t2)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,Term> terms
protected java.util.Map<java.lang.String,Variant> variants
protected java.util.Map<java.lang.String,Token> delimiter_terms
Method Detail |
---|
public java.util.Collection<Term> getTerms()
public Term[] getTermsByRank()
public int getTermCount()
public Term getTerm(java.lang.String stem)
public Variant getVariant(java.lang.String variant)
protected Token createDelimiter(java.lang.String delimiter)
protected void mergeTerms(Term t1, Term t2)
protected Term createTerm(java.lang.String stem)
protected double getMaxScore()
protected Variant createVariant(java.lang.String variant)
public void dump()
public void dump(int firstN)
firstN
- how many terms to output
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |