sentenceDelimiter = "\n";
}
final TokenizerFactory<? extends HasWord> tokenizerFactory = chooseTokenizerFactory();
//Now we do everything through the doc preprocessor
final DocumentPreprocessor docProcessor;
if (tagInside.length() > 0) {
docProcessor = new DocumentPreprocessor(reader, DocumentPreprocessor.DocType.XML);
docProcessor.setElementDelimiter(tagInside);
if (config.keepEmptySentences()) {
docProcessor.setKeepEmptySentences(true);
}
} else {
docProcessor = new DocumentPreprocessor(reader);
docProcessor.setSentenceDelimiter(sentenceDelimiter);
if (config.keepEmptySentences()) {
docProcessor.setKeepEmptySentences(true);
}
}
docProcessor.setTokenizerFactory(tokenizerFactory);
runTagger(docProcessor, writer, outputStyle);
}