-
Notifications
You must be signed in to change notification settings - Fork 72
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
Request - Difference between parts of speech #21
Comments
I use this library to generate dummy data for the automated generated entities like this
It would be awesome if as @nklswbr suggests you can make a call to specify what kind or type of words you need e.g;
|
How to work on this issue
Code suggestions for this issueThis one will take some extra effort and potential code refactoring. The crucial thing to pay attention to is not making any breaking changes that impact backward compatibility (bc). One potential approach might be to refactor the dictionary into various categories (or find a dictionary like this someplace). Then for bc, you could merge each of the individual word dictionaries into a single extensive dictionary for the original functions to obtain words. This is only a suggestion. Maybe there is a better way to classify the words within our current dictionary. Discussion about the approach is welcome in our Discord. One area of difficulty is "making everybody happy". The person who originally opened the issue wanted 'parts of speech', like 'nouns' or 'verbs'. While @marcodali wants much more specific words returned, like 'lastname'. Is this even possible with the existing dictionary? Changing the dictionary is a possibility, but we don't want to make the library smaller or less complex. If changing the dictionary, it might be necessary to first map out the distribution of word sizes to make sure the new dictionary has a similar complexity. The other issue is the fact that right now, there aren't any guardrails in place because the other options can almost always be fulfilled. What if a user asks for an 'insect', but this isn't in any of your dictionaries? What happens if the user asks for ten Finally, please make use of the Discord to ask questions. Try to answer the questions yourself using internet resources, but don't be afraid to ask questions on the Discord about anything. We are here to help! |
I would like to contribute to this issue. |
Hi @ronisarkarexe - Sounds great. As a warning, another Dev has submitted a PR that makes some breaking changes by updating to ES6 and named exports. It shouldn't have a lot of impact, but you will probably have to do a little code refactoring prior to final PR acceptance. I need to talk with our CTO about how we are going to handle the other PR that is still in play. In the meantime, if you have any questions feel free to visit our Discord. We have several channels about open-source contribution where you can ask questions. |
I would suggest retrofitting the library functions to accept external word lists as an option instead of complicating the word list structure or changing the dictionary. That should make everyone happy. |
That isn't a bad thought @UnKnoWn-Consortium. So a user would have to pass a curated dictionary to use the "part of speech" function? |
@BoDonkey That can work. Or easier people can just compose their own "part of speech" function with say the |
Ahh, I see what you mean. A specialized dictionary or the built-in as a fallback. Cool! |
Would love to see an option to differentiate between parts of speech
Something like
The text was updated successfully, but these errors were encountered: