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

fix: check for correct 'emotionally_laden' doc extension when creating emotion classifier #286

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

KasperFyhn
Copy link
Contributor

In src/dacy/sentiment/wrapped_models.py lines 142 and 165, a check is made for the Doc extension dacy/emotionally_laden which should just have been emotionally_laden.

The change fixes:

  1. The warning in line 143 is no longer triggered incorrectly.
  2. If a document is classified as "no emotion" by emotionally_laden, doc._.emotion will correctly return "no emotion". See the change in tests (which can also be its own test to verify that behavior if you want).

Cheers!

@KasperFyhn KasperFyhn added the bug Something isn't working label Jan 17, 2024
Copy link
Collaborator

@KennethEnevoldsen KennethEnevoldsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Looks great

@KennethEnevoldsen KennethEnevoldsen merged commit 7fe60a4 into main Jan 17, 2024
9 checks passed
@KennethEnevoldsen KennethEnevoldsen deleted the fix-emotionally-laden-extension-bug branch January 17, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants