new PlainTextByLineStream(new SystemInputStreamFactory(), SystemInputStreamFactory.encoding()));
String document;
while ((document = documentStream.read()) != null) {
String[] tokens = model.getFactory().getTokenizer().tokenize(document);
double prob[] = doccat.categorize(tokens);
String category = doccat.getBestCategory(prob);
DocumentSample sample = new DocumentSample(category, tokens);
System.out.println(sample.toString());