-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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:
...Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request