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

PerceptronTrainer should call super.isValid() in its isValid()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None

      Description

      The current implementation of PerceptronTrainer#isValid() is:

        public boolean isValid() {
          String algorithmName = getAlgorithm();
          return !(algorithmName != null && !(PERCEPTRON_VALUE.equals(algorithmName)));
        }
      

      but it should call super.isValid() to check iterations and cutoff parameters because PerceptronTrainer uses them.

      And if possible, I'd like to rewrite the last line (return statement) because I needed a few minutes to understand it as it has three exclamation points in one line.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                koji Koji Sekiguchi
                Reporter:
                koji Koji Sekiguchi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: