-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
refactor pluralize/singularize inflection logics #62
Conversation
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. |
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 |
Hey @sio4! Thanks for taking care of this one. Happy new year. It looks good to me. |
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.