-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
Acronym: New test case for apostrophe #1377
Conversation
"description": "apostrophes", | ||
"property": "abbreviate", | ||
"input": { | ||
"phrase": "Haley's Comet" |
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.
If I may -
If this is to be representative of a real-world phrase, then I would suggest using Halley's Comet
here with the extra L.
However, if all resemblances to real-world phenomena are purely coincidental, then as you were.
Thanks for fixing spelling mistake. Good eyes @petertseng. |
Wow, I'm shocked that I missed that. The website I originally looked it up on misspelled Halley's and I never checked any other sources. Thanks @petertseng |
@F3PiX let me know when it is OK to merge this. Recall you originally wanted to hold off due to some organizational changes taking place in the Ruby track. |
I would just like to add that some students like to use regex, like this |
I'm afraid I was confusing the Ruby tests with the canonical data, so the Ruby restructuring has nothing to do with merging this. Sorry for the confusing :-)
That's already taken care of by the test in line 44, with the hyphen as a non-space, non-word character? |
If you apply that regex to With the input of |
What would the acronym be for |
It should be "OMFR", because the glottal stop apostrophe in "O'Malley" is
different from the possessive apostrophe at its end.
That's a bit advanced for this exercise, though; I'd recommend against
adding that test case.
…On Thu, Nov 1, 2018 at 9:26 PM Ryan Potts ***@***.***> wrote:
What would the acronym be for O'Malley's Flux Recombinator? OMFR or OFR?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1377 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHdeTjJPVPyyyMCCoa3n-BTz2afaE8wUks5uq1kEgaJpZM4X15r_>
.
|
I agree. It came to mind while I was thinking about this exercise and I found it interesting. |
As long as there are no objections or is no further discussion I will likely merge this PR tomorrow (Sunday). If someone else decides to merge this in the mean time, please squash while merging. |
Thanks for working on this @alanvardy. 👍 |
Thank you! |
This is a redo of PR #1375, to be held until later review!
The current solution for Acronym doesn't account for apostrophes, it is a more rare case for acronyms but an edge case nonetheless. Is this useful?
I added a single test case and incremented the version number.