opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "william.colen@gmail.com" <william.co...@gmail.com>
Subject Re: svn commit: r1159447 - in /incubator/opennlp/trunk/opennlp-tools/src: main/java/opennlp/tools/chunker/ main/java/opennlp/tools/cmdline/chunker/ main/java/opennlp/tools/cmdline/namefind/ main/java/opennlp/tools/cmdline/postag/ main/java/opennlp/to
Date Fri, 19 Aug 2011 10:38:54 GMT
On Fri, Aug 19, 2011 at 6:11 AM, Jörn Kottmann <kottmann@gmail.com> wrote:

> On 8/19/11 1:40 AM, colen@apache.org wrote:
>
>> ==============================**==============================**
>> ==================
>> --- incubator/opennlp/trunk/**opennlp-tools/src/main/java/**
>> opennlp/tools/util/eval/**Evaluator.java (original)
>> +++ incubator/opennlp/trunk/**opennlp-tools/src/main/java/**
>> opennlp/tools/util/eval/**Evaluator.java Thu Aug 18 23:40:24 2011
>> @@ -19,7 +19,6 @@
>>  package opennlp.tools.util.eval;
>>
>>  import java.io.IOException;
>> -import java.util.LinkedList;
>>  import java.util.List;
>>
>>  import opennlp.tools.util.**ObjectStream;
>> @@ -32,7 +31,15 @@ import opennlp.tools.util.**ObjectStream;
>>   */
>>  public abstract class Evaluator<T>  {
>>
>> -  private List<EvaluationSampleListener<**T>>  listeners = new
>> LinkedList<**EvaluationSampleListener<T>>()**;
>> +  private List<EvaluationSampleListener<**T>>  listeners;
>> +
>> +  public Evaluator() {
>> +    this.listeners = null;
>> +  }
>> +
>> +  public Evaluator(List<**EvaluationSampleListener<T>>  listeners) {
>> +    this.listeners = listeners;
>> +  }
>>
>
> I still believe that the case where you just have one
> EvaluationSampleListener object that
> should be hooked up is the most frequent use case, and its very rare that
> people want to
> hookup multiple.
>
> To make that easy, I suggest that we add a constructor which just takes one
> listener.
>

Should we do it to all XYEvaluators or only with the Evaluator class? It is
a lot of new constructors!


And I now more and more feel like that we picked a bad name with
> EvaluationSampleListener,
> sounds a little confusing. Maybe EvaluationMonitor would be better, any
> opinions?
>

Yes, sounds better. I will change if after the other refactorings.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message