You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by Ade Miller <ad...@getconga.com> on 2017/06/20 14:53:04 UTC

Implementing custom report listeners

I'd like to use the API to generate model evaluation reports after training new models. I worked out how to
Do this using the report listeners included in the command line tools.

However I would like to generate reports with different formats, notably JSON. This would allow me to feed
the results into a post processing step that generates visualizations using  D3.

The code includes a comment suggesting this is possible, however the Stats class seems to only have private
properties on it. Is this intentional?

Ideally I would like to build a  TokenNameFinderFineGrainedJSONReportListener without having to copy all the code
in FineGrainedReportListener.

Thanks,

Ade


/**
* Generates a detailed report for the NameFinder.
* <p>
* It is possible to use it from an API and access the statistics using the
* provided getters
*/
public class TokenNameFinderFineGrainedReportListener
    extends FineGrainedReportListener implements TokenNameFinderEvaluationMonitor {