On 03/10/2014 10:59 AM, Rodrigo Agerri wrote:
I have created the issue
https://issues.apache.org/jira/browse/OPENNLP-665
I understand that instead of passing the lang.en.HeadRules directly in
the chunking.Parser.train method we could pass an interface and link
the HeadRules class to load according to the language parameter?
If you give some pointers as to what do you think it should be done
here I would not mind to give a hand.
Thanks for creating the issue. Exactly, one way to solve it could be to
define the interface
(there is one already, maybe extend it) and pass in a Head Rules object
to the train method.
Internally the class name of the object could stored and re-created
during model loading.
For that we probably need to work a bit on the serialization, but maybe
it is already in a good
state.
With that mechanism in place we could define defaults which are
sensitive to the language within
the train method.
I will have a look at the code and then comment on the issue about the
details.
Jörn