MpAnalyzer extends MpAnalyzer_ImplBase<Token> { public MpAnalyzer() { super(new CleartkTokenOps()); } MpAnalyzer(); static AnalysisEngineDescription getDescription(); static AnalysisEngineDescription getDescription(String langCode); static final String DEFAULT_DICTIONARY_FILE_NAME; }
@Test public void mpAnalyzerTest() throws Exception { this.jCas.reset(); tokenBuilder = new TokenBuilder<Token, Sentence>(Token.class, Sentence.class, "pos", "stem"); this.tokenBuilder.buildTokens(jCas, "jump jumping jumped jumper happy happier happiest", "jump jumping jumped jumper happy happier happiest", "VBP VBG VBP NN JJ JJ JJ" ); mpAnalyzer.process(jCas); List<String> expected = Arrays.asList("jump jump jumped jumper happy happier happiest".split(" ")); List<String> actual = new ArrayList<String>(); for (Token token : JCasUtil.select(this.jCas, Token.class)) { actual.add(token.getLemma()); } Assert.assertEquals(expected, actual); }