= new BagOfWordsFeatureGenerator();
InputStream modelStream = //<co id="tmx.modelreader"/>
new FileInputStream(modelFile);
DoccatModel model = new DoccatModel(modelStream);
DocumentCategorizer categorizer //<co id="tmx.categorizer"/>
= new DocumentCategorizerME(model, nffg, bowfg);
Tokenizer tokenizer = SimpleTokenizer.INSTANCE;
int catCount = categorizer.getNumberOfCategories();
Collection<String> categories
= new ArrayList<String>(catCount);
for (int i=0; i < catCount; i++) {
categories.add(categorizer.getCategory(i));
}
ResultAnalyzer resultAnalyzer = //<co id="tmx.results"/>
new ResultAnalyzer(categories, "unknown");
runTest(inputFiles, categorizer, tokenizer, resultAnalyzer); //<co id="tmx.run"/>
/*<calloutlist>