word-game-solver


Nameword-game-solver JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryGenerate valid English word sets based on a specified word length and a set of input characters using anagrams and a file with English words.
upload_time2025-08-07 00:35:03
maintainerSharrrkkk
docs_urlNone
authorSharrrkkk
requires_python>=3.10
licenseNone
keywords anagram anagrams game generate word words solver finder
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **Word Game Solver**

A solver for word-based games.

Currently, only the **Word Finder** solver is implemented.  
It searches for all possible words of a specific length that can be formed using only the letters or letter combinations provided by the user.

---

## **Basic Algorithm Description**

**Summary:**  
An English words file is used to generate a database based on that file; anagram techniques are used to solve the problem.

**Detailed:**  
This is achieved thanks to a file with all the English words, which is read, cleaned, processed, and stored in an in-memory database. This database is a dict where the key is the word sorted alphabetically and its value is a list with the original word. If another word is an anagram, it would be stored under the same key but the original word would be added to the existing list, making each key unique and its value contain all possible anagrams.

User inputs are stored, cleaned, verified, processed, and stored again. In the case of the entered set of letters, it is sorted alphabetically, then all possible combinations of that set of letters with the specified length are generated. Then all those combinations are searched in the database, and the database returns all the words found. These are stored and shown to the user via the console, and a user history file is saved.

---

## **Features**

### Word Finder
- Enter the desired word length (e.g., `5`)
- Input a set of letters (e.g., `"nyogbsfo"`)
- Returns all valid English words (e.g., `bongo`, `bongs`, `boons`, etc.)
- Uses anagram-solving logic
- Based on a plain English word list (`words.txt`)

---

## **Usage**

If installed manually (by cloning from GitHub or downloading the project), it can be started from the project root with the following command:

**For Unix-like systems (Linux, macOS):**
```bash
python3 main.py
```

**For Windows systems (PowerShell or CMD):**
```
py main.py
```

**If installed as a package, you can run the following command on both Unix-like and Windows systems:**

```
wordfinder
```

A simple interactive menu will appear:
```
Options:
Select game:................0
View history:...............1
Delete history:.............2
Help:.......................3
About:......................4
Exit the CLI application:...5
Select an option:
```
Choosing the Select game option opens a submenu where you can select the desired game solver or exit.
Currently, only the Word Finder game is available.
Simply enter the length of the words to search for and a set of letters from which those words can be formed.
The CLI application will display on the console all valid matches from words.txt.
The history stores all word length and letter set inputs, along with the corresponding results.
This data is saved across sessions and can be deleted at any time via the menu.

---

## **Project Structure**

```
.
├── LICENSE
├── README.md
├── main.py
├── pyproject.toml
├── src
│   └── word_game_solver
│       ├── __about__.py
│       ├── __init__.py
│       ├── cli.py
│       ├── info
│       │   ├── LICENSE
│       │   ├── README.md
│       │   ├── about.txt
│       │   ├── help.md
│       │   ├── history.txt
│       │   └── log.txt
│       ├── utils.py
│       ├── word_files
│       │   └── english_words.txt
│       └── wordfinder.py
```

---

## **Example Output (CLI in Action)**

```
Word Game Solver
Welcome: user
Date: 2025-08-04 Time: 10:34:00

Options:
Select game:................0
View history:...............1
Delete history:.............2
Help:.......................3
About:......................4
Exit the CLI application:...5
Select an option: 0

Games:
Word Finder...1
Exit..........2
Select a game: 1

Word Finder
Enter the length of the word to guess: 5
Enter all available letters: nyogbsfo
Number of possible words: 6
Possible words: bongo bongs boons goofs goofy goons
```

---

## **License**
This project is licensed under the MIT License.

---

## **Notes**
You can replace words.txt with any other word list you prefer.
The program filters each line to remove special characters, digits, and whitespace, and converts all text to lowercase.
Only simple alphabetic characters (A–Z, a–z) are currently supported—no accented letters or special symbols.

This project is intended 100% for educational purposes.

It is fully compatible with Unix-like systems (GNU/Linux, macOS, etc.) and Windows.

---

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "word-game-solver",
    "maintainer": "Sharrrkkk",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "anagram, anagrams, game, generate, word, words, solver, finder",
    "author": "Sharrrkkk",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/66/95/30aae0974ec200161c2f08896865fd83bc5208bc2d77824ee6f1b8e6fcef/word_game_solver-1.0.0.tar.gz",
    "platform": null,
    "description": "# **Word Game Solver**\n\nA solver for word-based games.\n\nCurrently, only the **Word Finder** solver is implemented.  \nIt searches for all possible words of a specific length that can be formed using only the letters or letter combinations provided by the user.\n\n---\n\n## **Basic Algorithm Description**\n\n**Summary:**  \nAn English words file is used to generate a database based on that file; anagram techniques are used to solve the problem.\n\n**Detailed:**  \nThis is achieved thanks to a file with all the English words, which is read, cleaned, processed, and stored in an in-memory database. This database is a dict where the key is the word sorted alphabetically and its value is a list with the original word. If another word is an anagram, it would be stored under the same key but the original word would be added to the existing list, making each key unique and its value contain all possible anagrams.\n\nUser inputs are stored, cleaned, verified, processed, and stored again. In the case of the entered set of letters, it is sorted alphabetically, then all possible combinations of that set of letters with the specified length are generated. Then all those combinations are searched in the database, and the database returns all the words found. These are stored and shown to the user via the console, and a user history file is saved.\n\n---\n\n## **Features**\n\n### Word Finder\n- Enter the desired word length (e.g., `5`)\n- Input a set of letters (e.g., `\"nyogbsfo\"`)\n- Returns all valid English words (e.g., `bongo`, `bongs`, `boons`, etc.)\n- Uses anagram-solving logic\n- Based on a plain English word list (`words.txt`)\n\n---\n\n## **Usage**\n\nIf installed manually (by cloning from GitHub or downloading the project), it can be started from the project root with the following command:\n\n**For Unix-like systems (Linux, macOS):**\n```bash\npython3 main.py\n```\n\n**For Windows systems (PowerShell or CMD):**\n```\npy main.py\n```\n\n**If installed as a package, you can run the following command on both Unix-like and Windows systems:**\n\n```\nwordfinder\n```\n\nA simple interactive menu will appear:\n```\nOptions:\nSelect game:................0\nView history:...............1\nDelete history:.............2\nHelp:.......................3\nAbout:......................4\nExit the CLI application:...5\nSelect an option:\n```\nChoosing the Select game option opens a submenu where you can select the desired game solver or exit.\nCurrently, only the Word Finder game is available.\nSimply enter the length of the words to search for and a set of letters from which those words can be formed.\nThe CLI application will display on the console all valid matches from words.txt.\nThe history stores all word length and letter set inputs, along with the corresponding results.\nThis data is saved across sessions and can be deleted at any time via the menu.\n\n---\n\n## **Project Structure**\n\n```\n.\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 main.py\n\u251c\u2500\u2500 pyproject.toml\n\u251c\u2500\u2500 src\n\u2502   \u2514\u2500\u2500 word_game_solver\n\u2502       \u251c\u2500\u2500 __about__.py\n\u2502       \u251c\u2500\u2500 __init__.py\n\u2502       \u251c\u2500\u2500 cli.py\n\u2502       \u251c\u2500\u2500 info\n\u2502       \u2502   \u251c\u2500\u2500 LICENSE\n\u2502       \u2502   \u251c\u2500\u2500 README.md\n\u2502       \u2502   \u251c\u2500\u2500 about.txt\n\u2502       \u2502   \u251c\u2500\u2500 help.md\n\u2502       \u2502   \u251c\u2500\u2500 history.txt\n\u2502       \u2502   \u2514\u2500\u2500 log.txt\n\u2502       \u251c\u2500\u2500 utils.py\n\u2502       \u251c\u2500\u2500 word_files\n\u2502       \u2502   \u2514\u2500\u2500 english_words.txt\n\u2502       \u2514\u2500\u2500 wordfinder.py\n```\n\n---\n\n## **Example Output (CLI in Action)**\n\n```\nWord Game Solver\nWelcome: user\nDate: 2025-08-04 Time: 10:34:00\n\nOptions:\nSelect game:................0\nView history:...............1\nDelete history:.............2\nHelp:.......................3\nAbout:......................4\nExit the CLI application:...5\nSelect an option: 0\n\nGames:\nWord Finder...1\nExit..........2\nSelect a game: 1\n\nWord Finder\nEnter the length of the word to guess: 5\nEnter all available letters: nyogbsfo\nNumber of possible words: 6\nPossible words: bongo bongs boons goofs goofy goons\n```\n\n---\n\n## **License**\nThis project is licensed under the MIT License.\n\n---\n\n## **Notes**\nYou can replace words.txt with any other word list you prefer.\nThe program filters each line to remove special characters, digits, and whitespace, and converts all text to lowercase.\nOnly simple alphabetic characters (A\u2013Z, a\u2013z) are currently supported\u2014no accented letters or special symbols.\n\nThis project is intended 100% for educational purposes.\n\nIt is fully compatible with Unix-like systems (GNU/Linux, macOS, etc.) and Windows.\n\n---\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Generate valid English word sets based on a specified word length and a set of input characters using anagrams and a file with English words.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://github.com/Sharrrkkk/word_game_solver#README.md",
        "Homepage": "https://github.com/Sharrrkkk/word_game_solver",
        "Issues": "https://github.com/Sharrrkkk/word_game_solver/issues",
        "Repository": "https://github.com/Sharrrkkk/word_game_solver"
    },
    "split_keywords": [
        "anagram",
        " anagrams",
        " game",
        " generate",
        " word",
        " words",
        " solver",
        " finder"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f755e565d6baba81fe9979be023469789b0894ed0628cedfc0b4b680de577669",
                "md5": "c06ba9f2e81bba6260a8157dfa9fd4bc",
                "sha256": "65ee27272b31817f491830a14e1990183a5dc6b978e331e5f4e15c53e81c954f"
            },
            "downloads": -1,
            "filename": "word_game_solver-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c06ba9f2e81bba6260a8157dfa9fd4bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 187292,
            "upload_time": "2025-08-07T00:35:02",
            "upload_time_iso_8601": "2025-08-07T00:35:02.382062Z",
            "url": "https://files.pythonhosted.org/packages/f7/55/e565d6baba81fe9979be023469789b0894ed0628cedfc0b4b680de577669/word_game_solver-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "669530aae0974ec200161c2f08896865fd83bc5208bc2d77824ee6f1b8e6fcef",
                "md5": "00e7b4813cdee82fbdeaac8cb98c1225",
                "sha256": "dcfe99fccffd6eb1d62da9695c560e5002ccb3109f74897c2243c820544e5433"
            },
            "downloads": -1,
            "filename": "word_game_solver-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "00e7b4813cdee82fbdeaac8cb98c1225",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 187468,
            "upload_time": "2025-08-07T00:35:03",
            "upload_time_iso_8601": "2025-08-07T00:35:03.876701Z",
            "url": "https://files.pythonhosted.org/packages/66/95/30aae0974ec200161c2f08896865fd83bc5208bc2d77824ee6f1b8e6fcef/word_game_solver-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-07 00:35:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Sharrrkkk",
    "github_project": "word_game_solver#README.md",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "word-game-solver"
}
        
Elapsed time: 2.50030s