Skip to content

Add is_valid_english_word function #9

@fhightower

Description

@fhightower

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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions