List of usage examples for opennlp.tools.namefind DefaultNameContextGenerator DefaultNameContextGenerator
public DefaultNameContextGenerator(AdaptiveFeatureGenerator... featureGenerators)
From source file:com.civis.utils.opennlp.models.address.AddressFinderMe.java
public AddressFinderMe(TokenNameFinderModel model) { super(model.getNameFinderModel()); additionalContextFeatureGenerator = new AdditionalContextFeatureGenerator(); AdaptiveFeatureGenerator featureGenerator = createDefaultFeatureGenerator(); contextGenerator = new DefaultNameContextGenerator(featureGenerator); SequenceValidator<String> sequenceValidator = new AddressFinderSequenceValidator(); beam = new BeamSearch<>(DEFAULT_BEAM_SIZE, contextGenerator, nameFinderModel, sequenceValidator, DEFAULT_BEAM_SIZE);//from w w w . java2 s .co m this.csvAddressDataList = CSVAddressReader.read(); this.countries = CountryReader.read(); }