Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MalletCrfStringOutcomeClassifier drops the last feature when classifying #410

Open
bethard opened this issue Apr 15, 2015 · 3 comments
Open

Comments

@bethard
Copy link
Contributor

bethard commented Apr 15, 2015

Original issue 412 created by ClearTK on 2014-12-19T03:30:24.000Z:

What steps will reproduce the problem?
Run MalletCrfStringOutcomeClassifier.classify method on a list of list of features and observe the output instance after it is processed by the transducer's pipe.

What is the expected output?
All the list of features processed by the pipe are passed to the transducer.

What do you see instead?
The last feature in each list of features is interpreted as a class/target because the pipe.targetProcessing field is set to true (default) as for training. The end results is that this last feature is dropped and never sent to the transducer.

What version of the product are you using? On what operating system?
This is affecting the version 2.0 of cleartk-ml.

The main function in cc.mallet.fst.SimpleTagger

@bethard
Copy link
Contributor Author

bethard commented Apr 15, 2015

Comment #1 originally posted by ClearTK on 2014-12-19T03:33:25.000Z:

I sent to fast...

The main function in cc.mallet.fst.SimpleTagger is a good place to see how the pipe is used when classifying.

@bethard
Copy link
Contributor Author

bethard commented Apr 15, 2015

Comment #2 originally posted by ClearTK on 2014-12-22T15:11:26.000Z:

<empty>

@bethard bethard modified the milestone: 2.1 Apr 16, 2015
@tmills
Copy link
Contributor

tmills commented Sep 16, 2018

My workaround, which could turn into a fix, is by adding:
this.transducer.getInputPipe().setTargetProcessing(false);
right after reading the transducer in the classifier builder.

@reckart reckart added 🐛 Bug Something isn't working and removed Type-Defect labels Nov 4, 2022
@reckart reckart modified the milestones: 2.1.0, 🐛 Bug backlog Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants