-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for variable amount of class and object diagrams #594
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
Conversation
Dynamic generation of the task description, depending on the number of object and class diagrams in the `MatchCdOdInstance`.
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.
Pull request overview
Updates the MatchCdOd task wording so that task descriptions can reflect the actual number of provided class and object diagrams (using small built-in number-word tables, avoiding new dependencies), addressing #550.
Changes:
- Add English/German number-word maps (2–10) and a shared lookup helper.
- Make
defaultMatchCdOdTaskTextdepend on(diagramCount, instanceCount)and update callers accordingly. - Adjust MatchCdOd wording to avoid “neither/either/both” and to better handle 1 vs multiple class diagrams.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
src/Modelling/CdOd/Phrasing/English.hs |
Adds English numberWords map for small integers. |
src/Modelling/CdOd/Phrasing/German.hs |
Adds German numberWords map for small integers. |
src/Modelling/CdOd/Phrasing.hs |
Adds num2word helper to select number words by language. |
src/Modelling/CdOd/MatchCdOd.hs |
Makes default task text depend on counts; updates generated/default instances to pass sizes. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@jvoigtlaender I've opened a new pull request, #595, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@jvoigtlaender I've opened a new pull request, #596, to work on those changes. Once the pull request is ready, I'll request review from you. |
--------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jvoigtlaender <5853832+jvoigtlaender@users.noreply.github.com>
…ort (#595) * Format numberWords as multi-line list with proper spacing --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jvoigtlaender <5853832+jvoigtlaender@users.noreply.github.com>
|
@jvoigtlaender I've opened a new pull request, #597, to work on those changes. Once the pull request is ready, I'll request review from you. |
…#597) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jvoigtlaender <5853832+jvoigtlaender@users.noreply.github.com>
|
@jvoigtlaender I've opened a new pull request, #598, to work on those changes. Once the pull request is ready, I'll request review from you. |
--------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jvoigtlaender <5853832+jvoigtlaender@users.noreply.github.com> Co-authored-by: Janis Voigtländer <jvoigtlaender@users.noreply.github.com>
Closes #550.
This would be a suggestion without introducing an new external package. It includes the number words up to ten, so if, in the future, there is any necessity for higher number words, we would need to add them manually to the list.
Regarding the wording "neither, either, or both class diagrams", I think replacing it with "none, one, or multiple" should be okay.
I've also looked into whether there are any other tasks that would profit from variable number words but wasn't able to find any.