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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 1.8.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: