@Test public void testParameters() { try { final AnalysisEngine analysisEngine = AnalysisEngineFactory.createEngine( CompoundPartTokenizer.class, CompoundPartTokenizer.PARAM_COMPOUND_SPLIT_LEVEL, CompoundSplitLevel.ALL); analysisEngine.process(analysisEngine.newJCas()); } catch (Exception exception) { LOGGER.log(Level.SEVERE, exception.getMessage(), exception); Assert.fail("No exception should be thrown"); } }
@Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { Token token; for (Compound compound : JCasUtil.select(aJCas, Compound.class)) { final Token compoundToken = JCasUtil.selectCovered(aJCas, Token.class, compound.getBegin(), compound.getEnd()).get(0); for (Split compoundPart : compound.getSplitsWithoutMorpheme(compoundSplitLevel)) { token = new Token(aJCas); token.setBegin(compoundPart.getBegin()); token.setEnd(compoundPart.getEnd()); token.setPos(compoundToken.getPos()); token.addToIndexes(); } } }
CompoundPartTokenizer extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { Token token; for (Compound compound : JCasUtil.select(aJCas, Compound.class)) { final Token compoundToken = JCasUtil.selectCovered(aJCas, Token.class, compound.getBegin(), compound.getEnd()).get(0); for (Split compoundPart : compound.getSplitsWithoutMorpheme(compoundSplitLevel)) { token = new Token(aJCas); token.setBegin(compoundPart.getBegin()); token.setEnd(compoundPart.getEnd()); token.setPos(compoundToken.getPos()); token.addToIndexes(); } } } }
CompoundPartTokenizer extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { Token token; for (Compound compound : JCasUtil.select(aJCas, Compound.class)) { final Token compoundToken = JCasUtil.selectCovered(aJCas, Token.class, compound.getBegin(), compound.getEnd()).get(0); for (Split compoundPart : compound.getSplitsWithoutMorpheme(compoundSplitLevel)) { token = new Token(aJCas); token.setBegin(compoundPart.getBegin()); token.setEnd(compoundPart.getEnd()); token.setPos(compoundToken.getPos()); token.addToIndexes(); } } }  }
CompoundPartTokenizer extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { Token token; for (Compound compound : JCasUtil.select(aJCas, Compound.class)) { final Token compoundToken = JCasUtil.selectCovered(aJCas, Token.class, compound.getBegin(), compound.getEnd()).get(0); for (Split compoundPart : compound.getSplitsWithoutMorpheme(compoundSplitLevel)) { token = new Token(aJCas); token.setBegin(compoundPart.getBegin()); token.setEnd(compoundPart.getEnd()); token.setPos(compoundToken.getPos()); token.addToIndexes(); } } }  @Override void process(final JCas aJCas); }
CompoundPartTokenizer extends JCasAnnotator_ImplBase { @Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { Token token; for (Compound compound : JCasUtil.select(aJCas, Compound.class)) { final Token compoundToken = JCasUtil.selectCovered(aJCas, Token.class, compound.getBegin(), compound.getEnd()).get(0); for (Split compoundPart : compound.getSplitsWithoutMorpheme(compoundSplitLevel)) { token = new Token(aJCas); token.setBegin(compoundPart.getBegin()); token.setEnd(compoundPart.getEnd()); token.setPos(compoundToken.getPos()); token.addToIndexes(); } } }  @Override void process(final JCas aJCas); static final String PARAM_COMPOUND_SPLIT_LEVEL; }