opennlp-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Piliouras (Commented) (JIRA)" <>
Subject [jira] [Commented] (OPENNLP-466) TokenNameFinderCrossValidator hangs when passed a NameEvaluationErrorListener...
Date Tue, 13 Mar 2012 17:18:55 GMT


Jim Piliouras commented on OPENNLP-466:

Hmmm, the only major thing that i see different from a quick look is 
that you 're passing your own OutputStream (byte[]) instead of using 
System.err which is the default one.

also the first assert statement checks if the size of the stream is > 0. 
now, that is not very helpful i think. It will always be > 0 even if 
only the first character of the maxent "initialisation greeting" gets 

I just noticed that you're also creating your training parameters via 
Model.util which i've never heard!!!
I'm just calling the default constructor of TrainingParameters.

the code is as follows (suspects in 

public String cross-validate(String fname, int kFolds){

FileInputStream sampleDataIn = new FileInputStream(fname);
ObjectStream<NameSample> sampleStream = new NameSampleDataStream(
                                                                               new PlainTextByLineStream(
TokenNameFinderCrossValidator judge =
new TokenNameFinderCrossValidator("en", null, *new 
TrainingParameters()*, null, *new HashMap()*, *new 

judge.evaluate(sampleStream, kFolds);
  FMeasure result = evaluator.getFMeasure();
  return result.toString();


Do you think the TrainingParameters() could be the problem? I'll have a 
look in the Model.util class to see what's what...


> TokenNameFinderCrossValidator hangs when passed a NameEvaluationErrorListener... 
> ---------------------------------------------------------------------------------
>                 Key: OPENNLP-466
>                 URL:
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Name Finder
>    Affects Versions: tools-1.5.3
>         Environment: ubuntu 11.10 x64 Java 1.7 update 3
>            Reporter: Jim Piliouras
>            Assignee: William Colen
>              Labels: cross-validation
>             Fix For: tools-1.5.3
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> TokenNameFinderCrossValidator works fine if passed null or any other listener except
a "NameEvaluationErrorListener", for  the l"listeners" parameter (last vararglist parameter
in the constructor)...I have tested it with DetailedFMeasureListener and null and it works
fine. When trying to pass an array with the 2 listeners i want (DetailedFMeasureListener,
NameEvaluationErrorListener) it just hangs after the processing the last partition of data,
rather than showing the F-score! It is not a show stopper because i can simply pass null and
get my F-score, but it would be nice if could see the misclassifications as well...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message