Joern,

Regarding the deprecation of GIS, I noticed that OpenNLP had been
refactored between 1.5.2 and 1.6.0 to move the constant *MAXENT_VALUE
<https://opennlp.apache.org/documentation/1.6.0/apidocs/opennlp-tools/opennlp/tools/ml/maxent/GIS.html#MAXENT_VALUE>*
(that
is used to select a MaxEnt classifier) to the GIS class from TrainUtil (
*opennlp.model.TrainUtil*).

Since MAXENT_VALUE had been moved to GIS, I put the corresponding constant
for the Naive Bayes classifier (*NAIVE_BAYES_VALUE*) into the
NaiveBayesTrainer class.

So, if you're moving constants back to something like the TrainUtil, you
may want to move the NAIVE_BAYES_VALUE over too.

Cohan Sujay Carlos

On Mon, Nov 7, 2016 at 2:44 PM, Joern Kottmann <kottm...@gmail.com> wrote:

> I also opened a Jira now for the refactoring effort:
> https://issues.apache.org/jira/browse/OPENNLP-880
>
> Jörn
>
> On Sun, Nov 6, 2016 at 4:41 PM, Joern Kottmann <kottm...@gmail.com> wrote:
>
> > On Fri, 2016-11-04 at 12:58 +0000, Russ, Daniel (NIH/CIT) [E] wrote:
> > > Hi Jörn,
> > >    Currently, GIS is a wrapper for the GISTrainer, which ironically
> > > is NOT an EventTrainer.  There are several ways to handle this.
> > >
> > > First, don’t touch GIS.  This is the class that people know best.  It
> > > is easy to use if you use the parameter hard coded in the class.  We
> > > can make GISTrainer an Event trainer and refactor it appropriately to
> > > handle parameters in the map.
> > >
> > > Second, refactor GIS, but keep the static methods in the code. This
> > > allows user to keep their code working.
> > >
> > > Third, refactor GIS and deprecate the static methods.
> > >
> > > I don’t see any value to the GIS class other than an Adapter.  My
> > > vote would be the fix the original problem of GISTrainer NOT being an
> > > event trainer.
> >
> >
> > I think we are lucky that GISTrainer is not a public class, so that
> > allows us to modify it as we need. I agree with you, we should make it
> > an EventTrainer.
> >
> > The GIS class should probably just be deprecated and then removed
> > later.
> >
> > Regards,
> > Jörn
> >
>

Reply via email to