-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add prefix and suffix truncation to lookup strategy #28
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
"arian": "arn", | ||
"ism": "sm"}} | ||
|
||
assert.Equal(t, "antdsestblshmntarnsm", m.Match("antidisestablishmentarianism")) |
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.
What would happen is the replacements dis
and arian
weren't available? How long would the abbreviation be? Especially since arian
isn't one of the available suffixes above?
My worry here is that this test is a little too specific to this word.
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.
Would you also be able to add a little detail about abbreviation guessing to the README and perhaps the usage text? A little documentation goes a really long way!
Fundamentally, this is a really good PR. It'll only take a little massaging before it's ready.
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.
We've added a test to try to illustrate that abbreviating stops once a prefix/suffix is not found. Let us know if you'd like anything clearer on that. Same for the documentation.
@shirleyleu and @FungusHumungus, do you do Twitter? I think this contribution deserves a shout out. 😁 |
:) https://twitter.com/shirley_leu it's mostly for occasional post-it doodles. |
Description
Relates to #21
@FungusHumungus
How Has This Been Tested?
Checklist:
make lint
)master