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

Provide equals and hashCode for POSModel

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1
    • POS Tagger
    • None

    Description

      The test opennlp.tools.postag.POSModelTest signals by two TODOs that no actual assertions are made to check whether (de-)serialized POSModel instances are correctly read in again.

      In other words: opennlp.tools.postag.POSModel lacks a valid equals/hashCode implementation by which one could verify a valid state (=equality) after (de-)serialization has occurred.

      In addition, two possible base classes GISModel and PerceptronModel also require valid equals/hashCode implementations, so that POSModel's equals/hashCode will work properly.

      Aim:

      • Provide an improved implementation of the POS-related "Model" classes.
      • Remove both TODOs in POSModelTest
      • Improve both test cases (MaxEnt/GIS and Perceptron) 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: