Uploaded image for project: 'OpenNLP'
  1. OpenNLP
  2. OPENNLP-985

A condition that is always true.

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • wsd
    • None

    Description

      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

      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   }
      

      Line 89 is always true. This might be a trivial issue but wanted to report just in case. Thanks!

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            lifove JC

            Dates

              Created:
              Updated:

              Slack

                Issue deployment