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

Refactor AdaptiveFeatureGenerator and FeatureGeneratorAdapter

    XMLWordPrintableJSON

Details

    Description

      Under the package opennlp.tools.util.featuregen there is an interface AdaptiveFeatureGenerator and an abstract class FeatureGeneratorAdapter. The interface defines the createFeatures(), updateAdaptiveData(), and clearAdaptiveData() methods. The abstract class implements this interface to provide default implementations of the updateAdaptiveData() and clearAdaptiveData() functions. Feature generators then either implement the interface or extend the abstract class.

      The purpose of this task is to refactor these classes to remove confusion caused by the similarity between the interface and the abstract class. This task deprecates the AdaptiveFeatureGenerator interface in favor of the abstract class FeatureGeneratorAdapter.

      Default methods will be added to the AdaptiveFeatureGenerator interface to maintain backward compatibility. To support the default methods the version of the Java compiler will be set to 1.8.

      Attachments

        Issue Links

          Activity

            People

              joern Jörn Kottmann
              jzemerick Jeff Zemerick
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: