On Wed, May 13, 2015 at 7:21 PM, <
pa...@ucw.cz> wrote:
> Hi! I'd like to ask if there is any straightforward way I could use the
> cleartk's CRFsuite wrapper to not just get chunks but also confidence values
> generated by the crfsuite when passed -p.
> It seems to me that I'd have to create my own fork of cleartk and modify *a
> lot* of pieces (the wrapper, the generic sequence tagging interface to carry
> something more complicated than a string as an outcome, the chunker, plus
> all the abstractions)
I don't think you need to modify any interfaces. Basically what's
missing is that `CrfSuiteStringOutcomeClassifier` only implements
`classify` from the `SequenceClassifier` interface, and does not
implement the `score` method:
https://github.com/ClearTK/cleartk/blob/master/cleartk-ml/src/main/java/org/cleartk/ml/SequenceClassifier.java#L56
So "all" you need to do is implement the `score` method on
`CrfSuiteStringOutcomeClassifier`. Looking at the implementation, I'd
guess you probably want to add a `scoreFeatures` method to
`CrfSuiteWrapper` and then delegate to that (as is done for the
`classify` method).
I'm not so familiar with the `CrfSuiteWrapper` class, but if you can
see how to add a `scoreFeatures` method to that class, you should be
95% of the way to your solution, I'd think.
Steve