public static void main(String[] args) {
String folder = "/home/wesley/var/pln/textcat/";
System.out.println("Lendo arquivos...");
Corpus corpus = new Corpus();
// corpus.readFile(new File(folder + "fazido9horas.csv"));
corpus.readFile(new File(folder + "base-10-07-12.csv"));
// corpus.readFile(new File(folder + "projetos9horas.csv"));
ClassifierNBToFile engine = new ClassifierNBToFile();
System.out.println("Treinando...");
List<Document> docsToTrain = corpus.getCategories("ambiente",
"aumento", "cultura", "data", "dev", "direito", "edu",
"espaco_pub", "habita", "lixo", "muda_nome", "outros",
"regulamentacao", "saude", "seguranca", "transito");
engine.train(docsToTrain);
System.out.println("Etiquetando...");
List<Document> docsToTagger = corpus.getCategories("TBD");
engine.tagger(docsToTagger);
for (Document d : docsToTrain) {
System.out.print(d.getCategory() + " \t");
System.out.println(d);