|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasen.core.engine.JasenTrainer
Trains the Jasen Engine and builds the JasenMap from a ham corpus and a spam corpus.
Training (and/or re-training) should be done regularly as new types of spam messages begin to appear
Constructor Summary | |
JasenTrainer()
|
Method Summary | |
String |
getHamCorpusPath()
Gets the local path to the folder containing the HAM corpus. |
JasenMap |
getMap()
Gets the JasenMap object produced as a result of a training run |
MimeMessageParser |
getMimeParser()
Gets the MIME parser to be used during training. |
String |
getSpamCorpusPath()
Gets the local path to the folder containind the SPAM corpus. |
JasenMapStore |
getStore()
Gets the store into which the map produced by the training run will be stored. |
String |
getStorePath()
Gets the path to the local file system into which the final JasenMapStore will be saved. |
MimeMessageTokenizer |
getTokenizer()
Gets the tokenizer that will be used during training. |
void |
init()
Initialises the trainer |
boolean |
isLoad()
Returns the value of the load option |
void |
setHamCorpusPath(String hamCorpusPath)
Sets the local path to the folder containind the HAM corpus. |
void |
setLoad(boolean load)
Sets the load value for the trainer. |
void |
setMimeParser(MimeMessageParser mimeParser)
Sets the MIME parser to be used during training. |
void |
setSpamCorpusPath(String spamCorpusPath)
Sets the local path to the folder containind the SPAM corpus. |
void |
setStore(JasenMapStore store)
Sets the store into which the map produced by the training run will be stored. |
void |
setStorePath(String storePath)
Sets the path to the local file system into which the final JasenMapStore will be saved. |
void |
setTokenizer(MimeMessageTokenizer tokenizer)
Sets the tokenizer that will be used during training. |
void |
train()
Trains the engine to produce the JasenMap |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JasenTrainer()
Method Detail |
public void init() throws JasenException
JasenException
public void train() throws JasenException
JasenException
JasenMap
public String getHamCorpusPath()
public void setHamCorpusPath(String hamCorpusPath)
hamCorpusPath
- Either an absolute or classpath-relative path to the folder as a String.public JasenMap getMap()
JasenMap
public MimeMessageParser getMimeParser()
public void setMimeParser(MimeMessageParser mimeParser)
mimeParser
- The mimeParser to set.public String getSpamCorpusPath()
public void setSpamCorpusPath(String spamCorpusPath)
spamCorpusPath
- Either an absolute or classpath-relative path to the folder as a String.public JasenMapStore getStore()
public void setStore(JasenMapStore store)
store
- The store to set.public MimeMessageTokenizer getTokenizer()
public void setTokenizer(MimeMessageTokenizer tokenizer)
tokenizer
- The tokenizer to set.public boolean isLoad()
public void setLoad(boolean load)
load
- If true, the trainer will append data to an existing map. Otherwise a new map will be createdpublic String getStorePath()
This is only relevant to the DiskMapStore class, however the trainer assumes this anyway.
public void setStorePath(String storePath)
This is only relevant to the DiskMapStore class, however the trainer assumes this anyway.
storePath
- Either an absolute or classpath-relative path to the file as a String.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |