GitHub user danielruss opened a pull request:
https://github.com/apache/opennlp/pull/14
Refactor data indexer
Added a patch that changes multiple items (Sorry That I did not fix 1 item
at a time-I am a scientist not a software engineer):
1.) Added method to EventTrainer â train(DataIndexer indexer) âThen I
added the method to AbstractEventTrainer. No other code needed to be changed.
2.) Created a new class â PluggableParmeters: Only AbstractTrainers had
access to getXXXParam(Value,Default). So I pulled out this functionality into a
separate class. Now both AbstractTrainers and AbstractDataIndexers can hold
parameters.
3.) Refactored DataIndexer. This touched a lot of code. Added init(Map,Map)
method and index(ObjectStream<Event>) method. Changed 1-Pass and 2-Pass
DataIndexers. Everywhere 1-pass/2-pass indexers where created, I changed the
constructor, and added the init and index methods.
4.) Changed GIS.doTrain(indexer) to use the parameters passed in the init
method.
5.) QNTrainer â created a working init method. Changed the isValid method
so it is not the init method.
#4 Make the GIS class work within the new training API
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/danielruss/opennlp refactorDataIndexer
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/opennlp/pull/14.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14
----
commit d281c7406faa5a4062bfc843377de9d37a2c6b50
Author: Daniel Russ <[email protected]>
Date: 2016-12-21T20:18:08Z
see JIRA OPENNLP-880: Updated GIS/DataIndexer/QNTrainer
commit 78264f94f97804b3110f5c53da75b68c22b694b4
Author: Daniel Russ <[email protected]>
Date: 2016-12-21T20:23:35Z
See OPENNLP-880: Changed GIS, EventTrainer, QNTrainer, DataIndexer
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---