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

Provide equals and hashCode for ParserModel and TokenizerModel

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1
    • Parser, Tokenizer
    • None

    Description

      The tests opennlp.tools.tokenize.TokenizerModelTest, opennlp.tools.parser.chunking.ParserTest, and opennlp.tools.parser.treeinsert.ParserTest signal by TODOs that no actual assertions are made to check whether (de-)serialized Model instances are correctly read in again.
      In other words: Those (Tokenizer/Parser) models lacks a valid equals/hashCode implementation by which one could verify a valid state (=equality) after (de-)serialization has occurred.

      Aim:

      • Provide an improved implementation of the related "Model" classes.
      • Remove existing TODOs in TokenizerModelTest and ParserTest
      • Improve the three test classes with further test assertions.

      Attachments

        Activity

          People

            mawiesne Martin Wiesner
            mawiesne Martin Wiesner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: