You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by GitBox <gi...@apache.org> on 2022/12/16 11:18:35 UTC

[GitHub] [opennlp] rzo1 commented on a diff in pull request #459: OPENNLP-1413 Enhance JavaDoc in opennlp.tools.util package

rzo1 commented on code in PR #459:
URL: https://github.com/apache/opennlp/pull/459#discussion_r1050621640


##########
opennlp-tools/src/main/java/opennlp/tools/util/ext/ExtensionLoader.java:
##########
@@ -41,20 +42,23 @@ static void setOSGiAvailable() {
 
   // Pass in the type (interface) of the class to load
   /**
-   * Instantiates an user provided extension to OpenNLP.
+   * Instantiates a user provided extension to OpenNLP.
    * <p>
    * The extension is either loaded from the class path or if running
    * inside an OSGi environment via an OSGi service.
    * <p>
-   * Initially it tries using the public default
-   * constructor. If it is not found, it will check if the class follows the singleton
-   * pattern: a static field named <code>INSTANCE</code> that returns an object of the type
-   * <code>T</code>.
+   * Initially, the load is conducted using the public no-arg constructor.
+   * If no such constructor is not found, it is checked if the class follows the
+   * {@code Singleton} pattern: a static field named {@code INSTANCE} that
+   * returns an object of the type {@link T}.
    *
-   * @param clazz
-   * @param extensionClassName
+   * @param clazz A reference to {@link Class<T>}.
+   * @param extensionClassName The (fully-qualified) name of the class
+   *                           by which the extension shall be loaded.
    *
    * @return the instance of the extension class
+   *
+   * @throws ExtensionNotLoadedException Thrown if the load operation failed.
    */
   // TODO: Throw custom exception if loading fails ...

Review Comment:
   Wonder, if `ExtensionNotLoadedException` isn't the custom exception mentioned in this TODO? The Javadoc states: 
   
   >  Exception indicates that an OpenNLP extension could not be loaded.



##########
opennlp-tools/src/main/java/opennlp/tools/util/featuregen/BrownCluster.java:
##########
@@ -36,34 +36,40 @@
 /**
  *
  * Class to load a Brown cluster document: word\tword_class\tprob
- * http://metaoptimize.com/projects/wordreprs/
- *
+ * <p>
+ * See: <a href="http://metaoptimize.com/projects/wordreprs/">

Review Comment:
   Link seems dead (at least for me). Getting a "Origin is unreachable Error code 523" from cloudflare.
   It isn't archived in the InternetArchive either. I was only able to find a copy via `archive.ph`: https://archive.ph/p82oc
   
   I think the related research paper is: https://dl.acm.org/doi/10.5555/1858681.1858721
   
   Maybe we can add a reference and mark the link as "broken" ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org