You are getting an error because you are passing a null in for the AdaptiveFeatureGenerator. Java doesn’t know if you are passing in and AFG or a byte[] (which makes it a different method), hence you get a message about an ambiguous signature.
You are using a depreciated method. Use the train(String,String,ObjectStream<>,TrainingParameters,TokenNameFinderFactory) method. You can create a TokenNameFinderFactory using the default constructor, Assuming you are using BioCodec format. I believe that is <START:person>John Smith<END> Let me know if that works for you. On 12/28/16, 6:13 PM, "mohd saif" <saif1.aans...@gmail.com> wrote: Hi, I am using opennlp-tool-1.6.0. For training my model i m using model = NameFinderME.train("en", "person", sampleStream, TrainingParameters.defaultParams(), null, Collections.<String, Object>emptyMap()); For this i am getting below Error: The method train(String, String, ObjectStream<NameSample>, TrainingParameters, AdaptiveFeatureGenerator, Map<String,Object>) is ambiguous for the type NameFinderME Please help me out. 2. Please tell me how to set cutoff so than i can train my model which have n-gram frequency=1. I mean how to set cutoff with the train API. Thanks alot...!!!