Skip to content
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

Add is_valid_english_word function #9

Open
fhightower opened this issue Feb 26, 2021 · 0 comments
Open

Add is_valid_english_word function #9

fhightower opened this issue Feb 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@fhightower
Copy link
Contributor

WHAT I want this project to do (or not do)

Add a function that takes a string and returns a bool representing whether or not the word is an English word.

WHY I want this project to have this feature

This is a common use-case and one that would be helpful to provide a good interface for.

HOW we might implement this feature

There are 3rd party libraries for this we could use. I suggest a function signature that looks like:

def is_valid_english_word(word: str) -> bool:
    ...

Later iterations may specify a dictionary of words to be used:

def is_valid_english_word(word: str, *, dictionary: Optional[Iterable[str]]) -> bool:
    ...

And, perhaps, this function could be generalized to support more languages than english like:

def is_valid_word(word: str, *, dictionary:Iterable[str]) -> bool:
    ...

or

def is_valid_word(word: str, *, language: str, dictionary: Optional[Iterable[str]]) -> bool:
    ...
@fhightower fhightower added the enhancement New feature or request label Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant