Creating Custom Functions in the OpenNLP Namefinder API

I am trying to use the creation of custom OpenNLP functions for a named search API.

http://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html

I looked through the documentation but couldn't figure out how to specify the various functions.

He just says:

AdaptiveFeatureGenerator featureGenerator = new CachedFeatureGenerator(
     new AdaptiveFeatureGenerator[]{
       new WindowFeatureGenerator(new TokenFeatureGenerator(), 2, 2),
       new WindowFeatureGenerator(new TokenClassFeatureGenerator(true), 2, 2),
       new OutcomePriorFeatureGenerator(),
       new PreviousMapFeatureGenerator(),
       new BigramNameFeatureGenerator(),
       new SentenceFeatureGenerator(true, false)
       });

But how do you actually use each of these different function generators to create my own custom functions. Can anyone post sample code defining these function generators, and how we will use it to create custom functions. Thanks pending.

+5
source share

All Articles