This is an automated email from the ASF dual-hosted git repository.

krickert pushed a commit to branch wordnet-expansion
in repository https://gitbox.apache.org/repos/asf/opennlp.git

commit 5220c976b415387aca4918ab3acfc6d8ddd04d51
Author: Kristian Rickert <[email protected]>
AuthorDate: Mon Jul 13 04:09:35 2026 -0400

    OPENNLP-1887: Document the private constructors on LexicalExpander
---
 .../src/main/java/opennlp/wordnet/LexicalExpander.java             | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/opennlp-extensions/opennlp-wordnet/src/main/java/opennlp/wordnet/LexicalExpander.java
 
b/opennlp-extensions/opennlp-wordnet/src/main/java/opennlp/wordnet/LexicalExpander.java
index a0e787bfc..1e6c86442 100644
--- 
a/opennlp-extensions/opennlp-wordnet/src/main/java/opennlp/wordnet/LexicalExpander.java
+++ 
b/opennlp-extensions/opennlp-wordnet/src/main/java/opennlp/wordnet/LexicalExpander.java
@@ -92,6 +92,7 @@ public final class LexicalExpander {
   private final double senseDecay;
   private final double depthDecay;
 
+  /** Creates an expander from a validated {@link Builder}. */
   private LexicalExpander(Builder builder) {
     this.lexicon = builder.lexicon;
     this.lemmatizer = builder.lemmatizer;
@@ -289,6 +290,12 @@ public final class LexicalExpander {
     private double senseDecay = 0.5;
     private double depthDecay = 0.5;
 
+    /**
+     * Creates a builder over the given lexicon; use {@link 
LexicalExpander#builder}.
+     *
+     * @param lexicon The knowledge base to expand against. Must not be {@code 
null}.
+     * @throws IllegalArgumentException Thrown if {@code lexicon} is null.
+     */
     private Builder(LexicalKnowledgeBase lexicon) {
       if (lexicon == null) {
         throw new IllegalArgumentException("The lexicon must not be null.");

Reply via email to