if(args == null || args.length < 4) {
System.out.println ("Usage: JasenTrainer <spam corpus path> <ham corpus path> <store path> <command> (one of 'new' or 'load')");
}
else
{
JasenTrainer trainer = new JasenTrainer();
String spamPath = args[0];
String hamPath = args[1];
String mapPath = args[2];
String command = args[3];
trainer.setSpamCorpusPath(spamPath);
trainer.setHamCorpusPath(hamPath);
trainer.setStorePath(mapPath);
if(command.toLowerCase().trim().startsWith("load")) {
trainer.setLoad(true);
}
trainer.init();
trainer.train();
}
}
catch (Exception e)
{
e.printStackTrace ();