dlarochelle/Mallet-CrfWrapper — pull request #1 by pypt (2014-06-02 21:49:55+00:00)
Title: InlineJava speed up, fixed WebService, new + fixed + updated unit tests, etc.

Hi David,

I've made many further fixes to the CRF model runner infrastructure, fixed the CRF web service, added unit tests (!), sped up the "InlineJava" method and done some other things.

From the changelog:

* Fix "WebService" method (make it work, remove mentions of Media Cloud).
* Add unit tests for both the "InlineJava" and "WebService" CRF model runner methods.
* "InlineJava": instead of fetching an array with Java objects, fetch a single string from Java class and parse it on Perl's side. This is needed in order to reduce Inline::Java usage to the minimum and thus speed up the model runner by 4x.
* "WebService": instead of JSON, return a newline-and-space-separated plain text as a CRF model runner result. This is how it's being used in Inline::Java's case, so we can reuse the same helper subroutines and avoid encoding / decoding JSON.
* Round probabilities to up to 8 digits after decimal point in order to make it comparable (thus testable in unit tests).
* Fixed JUnit unit tests.
* Some repository cleanup.

For a more detailed list of changes, see the commits and / or ask!

If you decide to accept this pull request, also:

1. Make sure that tags (`0.01` and `0.02`) also got merged. I find that putting tags on commits is the easiest way to do versioning in Git.
2. In the Media Cloud repository, merge branch `mallet_crfwrapper` back into `master`. The branch installs the `0.02` version of this module and also has a fixed CRF web service wrapper script to start the web service.

As always, please let me know if you have any questions or comments!