|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcluster.Phrase
public class Phrase
A key component of the unsupervised clustering. The phrases hold the primary phrase that labels the cluster and alternative phrases. In addition, the phrases hold the document that belong to the cluster. Finally, each of these Phrases acts like a tree node by pointing to a parent node (null if doesn't exist) and to all children.
| Constructor Summary | |
|---|---|
Phrase()
|
|
Phrase(java.util.List<Term> combinedOverlap)
Constructor based on just the terms of the primary phrase |
|
Phrase(Phrase t)
Copy constructor |
|
Phrase(java.lang.String terms)
|
|
| Method Summary | |
|---|---|
boolean |
add(Term arg0)
|
void |
addAlternativePhrase(java.util.List<Term> ts)
Add an alternative phrase, which is sufficient to containing all phrases held by this Phrase |
void |
addChild(Phrase t)
|
void |
addCoveredDoc(ClusterDoc d)
cover is a Set anyways, so don't worry about checking before calling this method |
void |
addCoveredDocs(java.util.Set<ClusterDoc> cover2)
|
void |
assignId(int i)
|
void |
clear()
|
void |
clearChildren()
|
void |
clearCover()
|
static Phrase |
CombinedFactory(Phrase a,
Phrase b)
|
int |
coverSize()
|
void |
deleteSelf()
Has no effect if this termset has no parent |
Term |
get(int arg0)
|
java.util.List<Term> |
getCombinedOverlap(Phrase set2)
Assuming this set is in front |
java.lang.String |
getCondensedString()
Get all fixed forms of the primary phrase concatenated together |
java.util.Set<ClusterDoc> |
getCover()
Returns those documents that belong to this phrase by themself If a paper contains a child phrase but not this phrase, then this method will not return the paper although getNestedCover() will |
int |
getCoverSize()
|
java.util.Set<ClusterDoc> |
getCoverUnion(Phrase s)
|
int |
getId()
|
java.lang.String |
getLabel()
|
int |
getMaxIndex()
|
java.util.Set<ClusterDoc> |
getNestedCover()
All documents that support/contain this term or child terms |
java.lang.Integer |
getNumChildren()
Recursively computes number of child nodes |
int |
getNumTermsShared(Phrase t)
|
Phrase |
getParent()
|
java.util.List<java.util.List<Term>> |
getPhrases()
Gets all list of terms that describe this cluster Containing any of the list of terms is equivalent to containing this Phrase (ie. |
Term |
getTerm(int j)
|
java.util.List<Term> |
getTerms()
|
java.util.List<Phrase> |
getTermSetChildren()
|
java.util.Iterator<Term> |
iterator()
|
int |
numAlternativePhrases()
|
boolean |
overLapTerms(Phrase set)
|
void |
removeChild(Phrase toMove)
toMove's parent is set to null, so assign a new parent after calling this function |
void |
removeCoveredDoc(TestDoc d)
|
void |
setParent(Phrase parent)
|
void |
setTerms(java.util.List<Term> terms)
|
int |
size()
|
java.lang.String |
toString()
Returns the primary phrase (the label to describe this cluster) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Phrase()
public Phrase(Phrase t)
t - public Phrase(java.util.List<Term> combinedOverlap)
combinedOverlap - public Phrase(java.lang.String terms)
| Method Detail |
|---|
public java.lang.String getCondensedString()
public java.util.List<java.util.List<Term>> getPhrases()
public void addAlternativePhrase(java.util.List<Term> ts)
ts - public void addChild(Phrase t)
public java.util.List<Phrase> getTermSetChildren()
public boolean add(Term arg0)
public Term get(int arg0)
public int size()
public java.util.Iterator<Term> iterator()
iterator in interface java.lang.Iterable<Term>public java.lang.String toString()
toString in class java.lang.Objectpublic int getMaxIndex()
public void addCoveredDoc(ClusterDoc d)
d - public java.util.Set<ClusterDoc> getNestedCover()
public java.util.List<Term> getTerms()
public static Phrase CombinedFactory(Phrase a,
Phrase b)
public void setTerms(java.util.List<Term> terms)
public int coverSize()
public int getNumTermsShared(Phrase t)
public java.util.Set<ClusterDoc> getCoverUnion(Phrase s)
public boolean overLapTerms(Phrase set)
public java.util.List<Term> getCombinedOverlap(Phrase set2)
set2 -
public Term getTerm(int j)
public void addCoveredDocs(java.util.Set<ClusterDoc> cover2)
public void clear()
public void assignId(int i)
public int getId()
public Phrase getParent()
public void setParent(Phrase parent)
public void clearChildren()
public void removeChild(Phrase toMove)
toMove - public void removeCoveredDoc(TestDoc d)
public void clearCover()
public java.util.Set<ClusterDoc> getCover()
public void deleteSelf()
public int numAlternativePhrases()
public int getCoverSize()
public java.lang.String getLabel()
public java.lang.Integer getNumChildren()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||