You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Bruno P. Kinoshita (Jira)" <ji...@apache.org> on 2023/02/13 14:15:00 UTC
[jira] [Assigned] (OPENNLP-985) A condition that is always true.
[ https://issues.apache.org/jira/browse/OPENNLP-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bruno P. Kinoshita reassigned OPENNLP-985:
------------------------------------------
Assignee: Bruno P. Kinoshita
> A condition that is always true.
> --------------------------------
>
> Key: OPENNLP-985
> URL: https://issues.apache.org/jira/browse/OPENNLP-985
> Project: OpenNLP
> Issue Type: Bug
> Components: wsd
> Reporter: JC
> Assignee: Bruno P. Kinoshita
> Priority: Trivial
>
> I've found a code smell or typo in a recent github snapshot. (opennlp-snadbox)
> Path: opennlp-wsd/src/main/java/opennlp/tools/disambiguator/datareader/Paragraph.java
> {code:java}
> 85 public boolean contains(String wordTag) {
> 86
> 87 for (Sentence isentence : this.getSsentences()) {
> 88 for (Word iword : isentence.getIwords()) {
> 89 if (iword.equals(iword))
> 90 return true;
> 91 }
> 92 }
> 93
> 94 return false;
> 95 }
> {code}
> Line 89 is always true. This might be a trivial issue but wanted to report just in case. Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)