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

Add additional attributes to CRF object for better compatibility with sklearn interface #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SethPoulsen
Copy link

Fixes #60

@MeMartijn
Copy link

Hi there!
Because I ran into this same issue I decided to install sklearn-crfsuite using your branch as a source (via pip install --upgrade git+https://github.com/SethPoulsen/sklearn-crfsuite.git#egg=sklearn_crfsuite). However, it does not seem to solve the issue for me, I still get the AttributeError from #60. Would you be able to share your scikit-learn version that made this fix work for you?

@SethPoulsen
Copy link
Author

Your command looks like you installed from the default branch of my fork, can you try installing from the add-missing-attributes branch, which is where I made the changes?

@MeMartijn
Copy link

MeMartijn commented Jun 27, 2022

Whoops, my bad, from the specific branch it works, thanks for the fix!

For anyone that doesn't want to wait before this is merged, you can install a fixed version like this:
pip install git+https://github.com/SethPoulsen/sklearn-crfsuite.git@add-missing-attributes#egg=sklearn_crfsuite

@MeMartijn
Copy link

I needed this change and the change from #67 for my code to work, so, seeing that the package is not updated anymore, I created a new fork with your fix and the fix from #67.

If anyone needs both, you can start using an updated version of this package by running this:
pip install git+https://github.com/MeMartijn/updated-sklearn-crfsuite.git#egg=sklearn_crfsuite. Any updates are welcome, I'll accept all pull requests for bug fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

repr CRF causes AttributeError in scikit-learn 0.24.0 (or later)
2 participants