[ 
https://issues.apache.org/jira/browse/OPENNLP-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17864309#comment-17864309
 ] 

ASF GitHub Bot commented on OPENNLP-1592:
-----------------------------------------

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


##########
summarizer/src/main/java/opennlp/summarization/Sentence.java:
##########
@@ -135,20 +131,25 @@ public int getWordCnt()
        }
 
        // Should add an article id to the sentence class. For now returns true 
if the ids are the same.
+
        @Override
-       public boolean equals(Object o) {
+       public final boolean equals(Object o) {
                if (this == o) return true;
-               if (o == null || getClass() != o.getClass()) return false;
-               Sentence sentence = (Sentence) o;
-               return sentId == sentence.sentId;
+               if (!(o instanceof Sentence sentence)) return false;
+
+    return sentId == sentence.sentId;

Review Comment:
   On GH UI it's showing the indentation a bit messed up. But maybe it's just 
GH's UI...





> Provide tests for MetaSummarizer
> --------------------------------
>
>                 Key: OPENNLP-1592
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1592
>             Project: OpenNLP
>          Issue Type: Test
>          Components: Summarizer
>    Affects Versions: 2.3.3
>            Reporter: Martin Wiesner
>            Assignee: Martin Wiesner
>            Priority: Major
>             Fix For: 2.4.0
>
>
> The summarizer (sandbox) component lacks Tests for MetaSummarizer.java.
> Currently, only an orphaned main method exists in the corresponding class. 
> Therefore, it is much desirable to have a fix set of tests that demonstrate 
> this class actually works (Note: it doesn't as is).
> Aims:
>  * Provide a minimal set of tests for MetaSummarizer
>  * Improve the existing code so that summarization works (again)
>  * Improve the code quality
>  * Add JavaDoc where possible.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to