private void runTest( String language, String variant, String testDocument, String[] tags, String[] tagClasses) throws Exception { AnalysisEngine engine = createEngine(LbjPosTagger.class); JCas jcas = TestRunner.runTest(engine, language, testDocument); AssertAnnotations.assertPOS(tagClasses, tags, select(jcas, POS.class)); }
private JCas runTest( String language, String variant, String testDocument, String[] tags, String[] tagClasses) throws Exception { AnalysisEngine engine = createEngine( OpenNlpPosTagger.class, OpenNlpPosTagger.PARAM_VARIANT, variant, OpenNlpPosTagger.PARAM_PRINT_TAGSET, true); JCas jcas = TestRunner.runTest(engine, language, testDocument); AssertAnnotations.assertPOS(tagClasses, tags, select(jcas, POS.class)); return jcas; }