> Thank you that did help. Originally I subclassed DefaultStopWordsProvider instead of IStopWordProvider but I'm gonna trust you on this :)
Actually, you could have either subclassed DefaultStopWordsProvider or implemented the IStopWordProvider interface: jython uses the same syntax for both, i.e inheritance syntax.
The difference being that the latter version inherits the implementations (unless over-ridden) of DefaultStopWordsProvider, whereas the former inherits no implementations, since interfaces are abstract.
> What is still unclear to me is how to tell my summarizer to use those stopwords.
> I'm initializing it like this:
> summariser = SimpleSummariser()
> It does not take any arguments.
Yes, I'm afraid we can't help you there: that is a deficiency of the Classifier4J API.
I note that the one of the constructors to BayesianClassifier takes a IStopWordProvider implementation
But none of the other consructors, of any object, do.
That product seems moribund: it hasn't been updated in over 8 years.
If you're going to use it, I think you're going to have to hack the code.
The SimpleSummariser you want to use does not use a StopWordProvider. Perhaps it is called indirectly?
To find out the call chain, you could change the code to throw an exception inside one of the DefaultStopWordsProvider methods. Then you could see what object is calling DefaultStopWordsProvider methods, and recompile the code to use your own implementation.
Or single-step through the code in an IDE?
Sorry we can't help further, but Classifier4J does seems a rather limited product.