Class SvmDoccatModel

java.lang.Object
opennlp.tools.ml.libsvm.doccat.SvmDoccatModel
All Implemented Interfaces:
Serializable

public class SvmDoccatModel extends Object implements Serializable
A model for SVM-based document categorization. This model wraps a zlibsvm SvmModel together with the feature vocabulary, category label mappings, corpus statistics, and configuration required for classification.

Persistence uses Java object serialization via serialize(OutputStream) and deserialize(InputStream). Reads are guarded by an ObjectInputFilter that allow-lists only the classes reachable from a legitimate SvmDoccatModel graph and bounds graph depth, references, and array length. Foreign payloads are rejected with InvalidClassException before being materialised.

Treat the filter as defense-in-depth, not as a license to deserialize from untrusted sources: callers should still ensure the input stream originates from a location they trust.

See Also: