public class Trainer
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
Trainer(java.lang.String[] dictionary)
Construct a Trainer from a given dictionary of words.
|
Trainer(Trainer trainer)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
ACMClass |
classify(Document doc)
Classify a document using the learning machine.
|
Trainer |
clone() |
weka.classifiers.functions.SMO |
loadState(java.lang.String filePath)
Load the learning machine's state from a file.
|
void |
saveState(java.lang.String filePath)
Save the learning machine's state to a file.
|
weka.classifiers.functions.SMO |
svm()
Get a reference to the learning machine.
|
java.lang.String |
toString() |
void |
train(Document[] docs)
Train the learning machine with a set of documents.
|
public Trainer(java.lang.String[] dictionary)
dictionary
- the dictionarypublic Trainer(Trainer trainer)
public Trainer clone()
clone
in class java.lang.Object
public weka.classifiers.functions.SMO svm()
public ACMClass classify(Document doc)
doc
- the document to classifypublic void train(Document[] docs)
docs
- the set of documents to train onpublic weka.classifiers.functions.SMO loadState(java.lang.String filePath)
filePath
- the file to read frompublic void saveState(java.lang.String filePath) throws java.io.IOException
filePath
- the file to write tojava.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object