Class DoccatModel

java.lang.Object
opennlp.tools.util.model.BaseModel
opennlp.tools.doccat.DoccatModel
All Implemented Interfaces:
Serializable, ArtifactProvider

public class DoccatModel extends BaseModel
A model for document categorization
See Also:
  • Constructor Details

    • DoccatModel

      public DoccatModel(String languageCode, MaxentModel doccatModel, Map<String,String> manifestInfoEntries, DoccatFactory factory)
      Initializes a DoccatModel instance via given parameters.
      Parameters:
      languageCode - An ISO conform language code.
      doccatModel - A valid MaxentModel to be used.
      manifestInfoEntries - Additional information kept in the manifest.
      factory - The DoccatFactory to be used.
    • DoccatModel

      public DoccatModel(InputStream in) throws IOException
      Initializes a DoccatModel instance via a valid InputStream.
      Parameters:
      in - The InputStream used for loading the model.
      Throws:
      IOException - Thrown if IO errors occurred during initialization.
    • DoccatModel

      public DoccatModel(File modelFile) throws IOException
      Initializes a DoccatModel instance via a valid File.
      Parameters:
      modelFile - The File used for loading the model.
      Throws:
      IOException - Thrown if IO errors occurred during initialization.
    • DoccatModel

      public DoccatModel(Path modelPath) throws IOException
      Initializes a DoccatModel instance via a valid Path.
      Parameters:
      modelPath - The Path used for loading the model.
      Throws:
      IOException - Thrown if IO errors occurred during initialization.
    • DoccatModel

      public DoccatModel(URL modelURL) throws IOException
      Initializes a DoccatModel instance via a valid URL.
      Parameters:
      modelURL - The URL used for loading the model.
      Throws:
      IOException - Thrown if IO errors occurred during initialization.
  • Method Details