refactor pluralize/singularize inflection logics#62
Merged
Conversation
Member
Author
|
Hi @paganotoni , Happy New Year! I had a "hard" time with this PR to fix the internal structure of this package. There were basically two issues:
My direction for this PR was to make Flect has some rules for adding inflection rules, hard-coded words and exceptions, and test cases with an organized structure. Please take a look at this PR. FYI, I tried to make it simple to review by isolating each change and each rule update within a single commit. I would like to release it as v1.0.0 when you review and I fix all review comments if any. |
Member
Author
|
References:
#!/bin/bash
end=$1
[ "$end" = "" ] && {
echo "usage: $0 end"
exit
}
curl https://www.wordmom.com/nouns/that-end-with-$end 2>/dev/null \
|grep "[a-z]*$end</li" \
|sed 's,<li [^>]*>,https://en.wiktionary.org/wiki/,g;s,</li>,#English\n,g' \
|grep https |
Member
|
Hey @sio4! Thanks for taking care of this one. Happy new year. It looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is being done in this PR?
What are the main choices made to get to this solution?
What was discovered while working on it? (Optional)
List the manual test cases you've covered before sending this PR:
fixes #61
Note that:
This is not huge but a kind of big change since the logic, data structure, and actual data are changed at the same time in a single PR. However, I tried to keep it simple per each commit to make it easy to track the whole change direction.