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

"Shall" is not accounted for in negations #12

Closed
ibrahimgh26 opened this issue May 2, 2024 · 2 comments · Fixed by #13
Closed

"Shall" is not accounted for in negations #12

ibrahimgh26 opened this issue May 2, 2024 · 2 comments · Fixed by #13

Comments

@ibrahimgh26
Copy link

ibrahimgh26 commented May 2, 2024

"Shall" should be added to the rules. As the systems correctly accounts for should, must, and other model verbs. I think this is an easy fix.

Current behavior:
Negating "The system shall be ok." returns "The system shall don't be ok."
Expected behavior:
The negator should return: "The system shall not be ok."
Used code:

from negate import Negator

negator = Negator()

sentence = "The system shall be ok."
negated_sentence = negator.negate_sentence(sentence)

print(negated_sentence)

Python 3.10.12
The issue was recreated on negate 1.1.3 (installed from pypi), and the package built from source (pip install git+https://github.com/dmlls/negate)

dmlls added a commit that referenced this issue May 3, 2024
@dmlls dmlls closed this as completed in #13 May 3, 2024
dmlls added a commit that referenced this issue May 3, 2024
@dmlls
Copy link
Owner

dmlls commented May 3, 2024

Hey @ibrahimgh26, thanks for the catch and the detailed report! Unsure how this went unnoticed until now...

Anyways, the fix is ready and published here and at https://pypi.org/project/negate/. It was, as you said, a rather easy fix. Unfortunately the en_core_web_md model tends to misclassify the (admittedly rare) "shan't", so I had to add a couple of workarounds. Hopefully models are improved soon and then... they shall be removed 😉

@ibrahimgh26
Copy link
Author

Hello,

thanks for the quick response, and the quick fix.

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 a pull request may close this issue.

2 participants