use of edu.illinois.cs.cogcomp.annotation.TextAnnotationBuilder in project cogcomp-nlp by CogComp.
the class MultilingualEreReaderTest method testSpanish.
public static void testSpanish() {
// String lang = "es"; //spanish
// TextAnnotationBuilder taBldr = MultiLingualTokenizer.getTokenizer(lang);
EREEventReader reader = null;
try {
boolean throwExceptionOnXmlParseFail = true;
TextAnnotationBuilder spanishTaBldr = MultiLingualTokenizer.getTokenizer(Language.Spanish.getCode());
reader = new EREEventReader(EREDocumentReader.EreCorpus.ENR2, spanishTaBldr, spanishPathA, throwExceptionOnXmlParseFail);
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
testReader(reader);
}
use of edu.illinois.cs.cogcomp.annotation.TextAnnotationBuilder in project cogcomp-nlp by CogComp.
the class ClauseAnnotatorFactory method buildPipeline.
/**
* @param rm non-default config options
* @return AnnotatorService with specified NLP components
* @throws IOException
* @throws AnnotatorException
*/
public static BasicAnnotatorService buildPipeline(ResourceManager rm) throws IOException, AnnotatorException {
TextAnnotationBuilder taBldr = new TokenizerTextAnnotationBuilder(new StatefulTokenizer(false, false));
Map<String, Annotator> annotators = buildAnnotators();
return new BasicAnnotatorService(taBldr, annotators, rm);
}
Aggregations