You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by "kinow (via GitHub)" <gi...@apache.org> on 2023/02/20 19:25:37 UTC

[GitHub] [opennlp-sandbox] kinow commented on a diff in pull request #85: Modernize classes of sandbox components

kinow commented on code in PR #85:
URL: https://github.com/apache/opennlp-sandbox/pull/85#discussion_r1112166160


##########
opennlp-coref/src/main/java/opennlp/tools/coref/mention/DefaultParse.java:
##########
@@ -36,12 +36,12 @@
  */
 public class DefaultParse extends AbstractParse {
 
-  public static String[] NAME_TYPES = {"person", "organization", "location", "date",
+  public static final String[] NAME_TYPES = {"person", "organization", "location", "date",
       "time", "percentage", "money"};
   
-  private Parse parse;
-  private int sentenceNumber;
-  private static Set<String> entitySet = new HashSet<String>(Arrays.asList(NAME_TYPES));
+  private final Parse parse;
+  private final int sentenceNumber;
+  private static final Set<String> entitySet = new HashSet<>(Arrays.asList(NAME_TYPES));

Review Comment:
   Might be worth doing that here or in a follow-up, +1



-- 
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