On 10/06/2014 11:35 PM, Rodrigo Agerri wrote:
Hi,
On Mon, Oct 6, 2014 at 11:19 PM, Jörn Kottmann <[email protected]> wrote:
I see two ways to fix this:
- The way you suggested, by extracting the XMÖ descriptor from the
TokenNameFinderFactory
- Or by returning the XML descriptor as part of the
TokenNameFinder.getResources() method.
The first one is conceptually easier for me as it treats equally the
three components of the factory, the resources, the seqcodec and the
featureGenerator. Also, it takes two lines of code to do.
Having said, that, removing code is always tempting, so the second
option is also good.
The feature generator descriptor is just a resource too. Anyway I think
it is good to leave it
like it is today, and treat it separately. We can still easily change
that in the future if there is
a need.
The second option is probably better, because it gives more control to
the TokenNameFinderFactory. It would be possible to change the format of
the feature generator description with a different factory
implementation. And it might simplify the TokenNameFinderModel
implementation, since most code dealing with the feature generation
could be removed.
Something I do not fully understand is why would not it be possible in
the first option to change the feature generator description with a
different factory implementation.
Yes, your are right. The factory still has full control over parsing the
descriptor.
+1 for the first option.
Sorry, for my late reply, I answered this mail already, but suspect it
didn't get send.
Jörn