Skip to content

OPENNLP-1808: Add SVM-based document categorization via zlibsvm#981

Merged
mawiesne merged 2 commits intomainfrom
OPENNLP-1808
Mar 22, 2026
Merged

OPENNLP-1808: Add SVM-based document categorization via zlibsvm#981
mawiesne merged 2 commits intomainfrom
OPENNLP-1808

Conversation

@rzo1
Copy link
Copy Markdown
Contributor

@rzo1 rzo1 commented Mar 19, 2026

Change

  • Introduces opennlp-ml-libsvm, a new ML module providing SVM-based text-classification through the zlibsvm library.
  • the module implements the DocumentCategorizer interface

Notes

  • Configurable term weighting (binary, TF, TF-IDF, log-normalized TF)
  • Feature selection (information gain, chi-square, TF, DF)
  • Feature scaling with configurable range
  • Full SVM parameter control (kernel, cost, gamma, etc.)
  • Model serialization/deserialization
  • CLI tools (DoccatSVM, DoccatSVMTrainer, DoccatSVMEvaluator)
  • 86 unit tests across 8 test classes
  • Documentation in doccat.xml, project-structure.xml, and README

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn clean install at the root opennlp folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file in opennlp folder?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found in opennlp folder?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

rzo1 added 2 commits March 19, 2026 10:44
  Introduces opennlp-ml-libsvm, a new ML module providing SVM-based text
  classification through the zlibsvm library. The module implements the
  DocumentCategorizer interface and includes:

  - Configurable term weighting (binary, TF, TF-IDF, log-normalized TF)
  - Feature selection (information gain, chi-square, TF, DF)
  - Feature scaling with configurable range
  - Full SVM parameter control (kernel, cost, gamma, etc.)
  - Model serialization/deserialization
  - CLI tools (DoccatSVM, DoccatSVMTrainer, DoccatSVMEvaluator)
  - 86 unit tests across 8 test classes
  - Documentation in doccat.xml, project-structure.xml, and README
  Introduces opennlp-ml-libsvm, a new ML module providing SVM-based text
  classification through the zlibsvm library. The module implements the
  DocumentCategorizer interface and includes:

  - Configurable term weighting (binary, TF, TF-IDF, log-normalized TF)
  - Feature selection (information gain, chi-square, TF, DF)
  - Feature scaling with configurable range
  - Full SVM parameter control (kernel, cost, gamma, etc.)
  - Model serialization/deserialization
  - CLI tools (DoccatSVM, DoccatSVMTrainer, DoccatSVMEvaluator)
  - 86 unit tests across 8 test classes
  - Documentation in doccat.xml, project-structure.xml, and README
@rzo1 rzo1 requested review from atarora, jzonthemtn and mawiesne March 19, 2026 09:49
@rzo1 rzo1 added the java Pull requests that update Java code label Mar 19, 2026
@mawiesne
Copy link
Copy Markdown
Contributor

Coverage

Bildschirmfoto 2026-03-19 um 12 03 43

@mawiesne
Copy link
Copy Markdown
Contributor

Thx @rzo1 for the code drop. I've read the PR's changes and checked the coverage of the tests, see previous screenshot.

@mawiesne
Copy link
Copy Markdown
Contributor

Note: In addition, I've verified the PDF dev manual has sufficient formatting quality and looks fine.

@mawiesne mawiesne merged commit 9bfd807 into main Mar 22, 2026
9 checks passed
@mawiesne mawiesne deleted the OPENNLP-1808 branch March 22, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants