-
Notifications
You must be signed in to change notification settings - Fork 106
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
[UnitaryHack] Intial commit unknown words rewrite rule #94
Conversation
Hi @WingCode, thanks for your submission, this PR looks really good, and certainly solves the problem of replacing unknown words in a single diagram. While not explicitly mentioned in the task (apologies!), it would be really useful to have a
I appreciate that this is asking you to do extra work, but if you think you could add that it would be really great! |
@le-big-mac Thank you for going through the PR and describing the functionalities of |
lambeq/rewrite/base.py
Outdated
not have one of these words, it will not be rewritten with | ||
UNK. | ||
""" | ||
self.template = template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think your RewriteRule
requires a template.
tests/test_rewrite.py
Outdated
|
||
unknown_words = ['unknown'] | ||
rule = UnknownWordsRewriteRule( | ||
template=diagram, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diagram that we are rewriting should not be being passed as a template, but this has no effect as template
is never used in the RewriteRule
.
Hi @WingCode, I have taken another look and left a couple of small comments that need to be resolved in this PR. I agree with you that Considering the initial framing of the question, I feel that once the comments in this PR are addressed we can assign you the issue, and then once the |
@WingCode We have fixed an error in main which makes a test to fail, please merge and see if the tests are now passing for your PR. |
@WingCode Please address any remaining comments by tomorrow 13/6, last day of the hackathon. |
Superseded by #105. |
closes #84