Util
Class KnownDoc
java.lang.Object
Util.TestDoc
Util.KnownDoc
- All Implemented Interfaces:
- ClusterDoc, java.lang.Comparable<ClusterDoc>, SVMTestable, SVMTrainable, DocIdentifiable
public class KnownDoc
- extends TestDoc
- implements SVMTrainable
Repsents documents that are from the training set
- Author:
- davidc
|
Constructor Summary |
KnownDoc(java.lang.String wbid)
Careful! The doc is not initialized in this contrusctor |
KnownDoc(TestDoc t)
|
| Methods inherited from class Util.TestDoc |
addTermSetCount, checkSourceExists, compareTo, compareTo, destroyLocalDoc, getAbstract, getDocId, getExactMembership, getFixedWordSentences, getIdxSentences, getNumInstancesOfTermSet, getSentences, getTermSetsSupported, getTitle, getWbid, getWindows, getXMLDoc, isJunkPhrase, isMemberOf, loadWindowedDoc, readyTitleOnly, registerMembership, setWbid |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KnownDoc
public KnownDoc(java.lang.String wbid)
- Careful! The doc is not initialized in this contrusctor
KnownDoc
public KnownDoc(TestDoc t)
readyDoc
public void readyDoc(VectorManager titlevm,
VectorManager vm,
java.lang.String src)
- Description copied from interface:
SVMTrainable
- The document needs to update the VectorManager with the feature counts
- Specified by:
readyDoc in interface SVMTrainable- Overrides:
readyDoc in class TestDoc
src - art or abs
readyDocLocally
public void readyDocLocally(VectorManager titleVM,
VectorManager articleVm,
java.lang.String src)
- Specified by:
readyDocLocally in interface SVMTestable- Overrides:
readyDocLocally in class TestDoc
artXMLExists
public boolean artXMLExists()
- Looks in tdb/art/xml/WBID
Added this function to make sure all files in the training set exist.
- Returns:
- true if the file exists
titXMLExists
public boolean titXMLExists()
getMembershiplevel
public int getMembershiplevel(int currentCat)
isKnownMemberOf
public boolean isKnownMemberOf(int i)
- Specified by:
isKnownMemberOf in interface SVMTrainable
isKnownPrimaryMemberOf
public boolean isKnownPrimaryMemberOf(int i)
setMemberOf
public void setMemberOf(int i,
int j)