Namespace NOpenNLP.Tools.Util.Ext

Package containing extension loading code.

Classes

ExtensionLoader

The ExtensionLoader is responsible to load extensions to the OpenNLP library.

Only types whose full name starts with a registered namespace prefix are permitted. The default allowed prefixes are NOpenNLP. and opennlp., which cover all built-in factories and serializers, both under their ported names and under the Java names that serialized OpenNLP models record.

To allow custom extension types from other namespaces, either:

  • Call RegisterAllowedPackage(string) programmatically before loading any model that uses the custom type.
  • Set the OPENNLP_EXT_ALLOWED_PACKAGES setting to a comma-separated list of namespace prefixes before the type is first used.

Note: Do not use this class, internal use only!
ExtensionNotLoadedException

Exception indicates that an OpenNLP extension could not be loaded.