# Deprecated API

## Contents

- Terminally Deprecated
- Methods
- Constructors
- Enum Constants

- Terminally Deprecated Elements
  Element
  Description
  opennlp.tools.dictionary.serializer.Entry.getAttributes()
  opennlp.tools.dictionary.serializer.Entry.getTokens()
  opennlp.tools.langdetect.LanguageSample.getContext()
  opennlp.tools.langdetect.LanguageSample.getLanguage()
  opennlp.tools.langdetect.ProbingLanguageDetectionResult.getLanguages()
  opennlp.tools.langdetect.ProbingLanguageDetectionResult.getLength()
  opennlp.tools.util.TokenTag.getAdditionalData()
  opennlp.tools.util.TokenTag.getTag()
  opennlp.tools.util.TokenTag.getToken()

- Deprecated Methods
  Method
  Description
  opennlp.tools.chunker.ChunkerModel.getChunkerModel()
  use `ChunkerModel.getChunkerSequenceModel()` instead. This method will be removed soon.
  opennlp.tools.dictionary.serializer.DictionaryEntryPersistor.serialize(OutputStream, Iterator<Entry>)
  Use `DictionaryEntryPersistor.serialize(OutputStream, Iterator, boolean)` instead.
  opennlp.tools.dictionary.serializer.Entry.getAttributes()
  opennlp.tools.dictionary.serializer.Entry.getTokens()
  opennlp.tools.langdetect.LanguageSample.getContext()
  opennlp.tools.langdetect.LanguageSample.getLanguage()
  opennlp.tools.langdetect.ProbingLanguageDetectionResult.getLanguages()
  opennlp.tools.langdetect.ProbingLanguageDetectionResult.getLength()
  opennlp.tools.languagemodel.LanguageModel.predictNextTokens(StringList)
  use `LanguageModel.predictNextTokens(String...)`
  opennlp.tools.languagemodel.NGramLanguageModel.predictNextTokens(StringList)
  opennlp.tools.namefind.NameFinderEventStream.generateOutcomes(Span[], String, int)
  use the `BioCodec` implementation of the SequenceValidator instead!
  opennlp.tools.parser.ChunkContextGenerator.getContext(int, String[], String[], Object[])
  Use `ChunkContextGenerator.getContext(int, String[], String[], String[])` instead.
  opennlp.tools.parser.ChunkContextGenerator.getContext(Object)
  Use `ChunkContextGenerator.getContext(int, String[], String[], String[])` instead.
  opennlp.tools.postag.POSModel.getPosModel()
  use `POSModel.getPosSequenceModel()` instead. This method will be removed soon. Only required for Parser 1.5.x backward compatibility. Newer models don't need this anymore.
  opennlp.tools.sentdetect.SentenceDetectorME.train(String, ObjectStream<SentenceSample>, boolean, Dictionary, TrainingParameters)
  Use `SentenceDetectorME.train(String, ObjectStream, SentenceDetectorFactory, TrainingParameters)` and pass in af `SentenceDetectorFactory`.
  opennlp.tools.util.TokenTag.getAdditionalData()
  opennlp.tools.util.TokenTag.getTag()
  opennlp.tools.util.TokenTag.getToken()

- Deprecated Constructors
  Constructor
  Description
  opennlp.tools.formats.ad.ADNameSampleStream(InputStreamFactory, String, boolean)
  opennlp.tools.namefind.DefaultNameContextGenerator()
  use `DefaultNameContextGenerator(AdaptiveFeatureGenerator...)` and always provide one or more `feature generators`.
  opennlp.tools.namefind.RegexNameFinder(Pattern[])
  Use constructor `RegexNameFinder(Pattern[], String)` for single types, and/or constructor `RegexNameFinder(Map)` instead.
  opennlp.tools.parser.lang.en.HeadRules(String)
  Use `HeadRules(Reader)` instead.
  opennlp.tools.sentdetect.SentenceDetectorME(SentenceModel, Factory)
  Use a `SentenceDetectorFactory` to extend SentenceDetector functionality.
  opennlp.tools.sentdetect.SentenceModel(String, MaxentModel, boolean, Dictionary, char[])
  Use `SentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)` instead and pass in a `SentenceDetectorFactory`
  opennlp.tools.sentdetect.SentenceModel(String, MaxentModel, boolean, Dictionary, char[], Map<String, String>)
  Use `SentenceModel(String, MaxentModel, Map, SentenceDetectorFactory)` instead and pass in a `SentenceDetectorFactory`
  opennlp.tools.tokenize.SimpleTokenizer()
  Use `SimpleTokenizer.INSTANCE` field instead to obtain an instance. This constructor will be made private in the future.
  opennlp.tools.tokenize.TokenizerME(TokenizerModel, Factory)
  use `TokenizerFactory` to extend the Tokenizer functionality
  opennlp.tools.util.featuregen.CachedFeatureGenerator(AdaptiveFeatureGenerator...)

- Deprecated Enum Constants
  Enum Constant
  Description
  opennlp.tools.parser.ParserEventTypeEnum.CHUNK
  opennlp.tools.parser.ParserEventTypeEnum.TAG