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

Correctly add terms to posts generated by Watson content classifiers #462

Merged
merged 13 commits into from
May 26, 2023

Conversation

ravinderk
Copy link
Contributor

@ravinderk ravinderk commented May 23, 2023

Description of the Change

I found that we overwrite terms when adding new terms to a post. Admin can set same or different WordPress taxonomy for Watson Category, Keyword , Entity & Concept. When the admin sets the same category for two or more Watson content classifiers, the term does not add correctly to the post. I update the logic to handle this use case.

Closes #340

How to test the Change

  • Add the same taxonomy to all Watson content classifiers in ClassifAI > Language Processing and the new post. The post should have the correct terms.
  • Add the different or same taxonomy to all Watson content classifiers in ClassifAI > Language Processing and the new post. The post should have the correct terms.

Changelog Entry

Fixed - Correctly add terms to posts generated by Watson content classifiers

Credits

Props @iamdharmesh , @ravinderk

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@ravinderk ravinderk self-assigned this May 23, 2023
@ravinderk ravinderk added this to the 2.3.0 milestone May 23, 2023
@ravinderk ravinderk changed the title Correctly add Term Tags to page/posts Correctly add terms to posts generated by Watson content classifiers May 23, 2023
@ravinderk ravinderk marked this pull request as ready for review May 23, 2023 10:57
@ravinderk ravinderk requested review from a team, dkotter and jeffpaul as code owners May 23, 2023 10:57
includes/Classifai/Watson/Linker.php Outdated Show resolved Hide resolved
includes/Classifai/Watson/Linker.php Outdated Show resolved Hide resolved
includes/Classifai/Watson/Linker.php Show resolved Hide resolved
includes/Classifai/Watson/Linker.php Outdated Show resolved Hide resolved
includes/Classifai/Watson/Linker.php Outdated Show resolved Hide resolved
@ravinderk ravinderk requested a review from dkotter May 25, 2023 06:07
@ravinderk
Copy link
Contributor Author

@dkotter Pull request is ready for code review.

includes/Classifai/Watson/Linker.php Outdated Show resolved Hide resolved
@ravinderk ravinderk requested a review from dkotter May 26, 2023 12:18
@dkotter dkotter merged commit 1c062c7 into develop May 26, 2023
@dkotter dkotter deleted the fix/correctely-add-term-tags-340 branch May 26, 2023 16:11
@dkotter dkotter modified the milestones: 2.3.0, 2.2.1 May 26, 2023
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.

Terms/Tags are not getting created correctly when we select common taxonomy between enabled features.
2 participants