Skip to main content

Package for generating Wordle words

Project description

wordle-words

App to generate an array of 5-letter words all with unique letters, to propose efficient narrowing of qualifying words for Wordle game.

Main Word Generator

The core functionality is in src/main.py - it generates sets of 5-letter words where no letter appears in multiple words. This is perfect for Wordle strategy as it maximizes letter coverage.

Usage

Run from the project root directory:

# Generate default number of words (attempts 3, but may find fewer)
ww

# Generate specific number of words
ww 2
ww 4
ww 5

# Generate words with no repeating letters
ww 3 -u
ww -u

Examples

$ ww 3
Selected words: ['clack', 'biter', 'found']
Used letters: ABCDEF__I_KL_NO__R_TU_____

$ ww 4
Selected words: ['squad', 'glory', 'mimic', 'theft']
Used letters: A_CDEFGHI__LM_O_QRSTU___Y_

$ ww
Selected words: ['regal', 'couch', 'ditty']
Used letters: A_CDE_GHI__L__O__R_TU___Y_

$ ww 4 -u
Selected words: ['frail', 'wench', 'judgy', 'stomp']
Used letters: A_CDEFGHIJ_LMNOP_RSTU_W_Y_

$ ww 2 -u
Selected words: ['mango', 'build']
Used letters: AB_D__G_I__LMNO_____U_____

$ ww -u
Selected words: ['clean', 'ivory', 'thump']
Used letters: A_C_E__HI__LMNOP_R_TUV__Y_

How It Works

  1. Samples the word list randomly for variety
  2. Selects words with no overlapping letters
  3. Stops when the requested number is reached or no more qualifying words exist
  4. Displays the selected words and all unique letters used (sorted a-z)

Wordle Strategy Benefits

  • Maximum letter coverage - Each word introduces different letters
  • Efficient elimination - Quickly narrow down possible answers
  • Alphabet scanning - Sorted letter output shows coverage gaps

Word List Management

This project includes command-line utilities to examine and modify the word list in words.py.

Usage

Run the utility from the project root directory:

ww [command] [options]

Available Commands

stats - Show Word List Statistics

Display comprehensive statistics about the current word list:

ww stats

Output includes:

  • Total word count
  • Number of unique words
  • Number of duplicates
  • Whether the list is alphabetically sorted

find-scarce - Find Least Common Letters

Identify the least frequently used letters in the word list:

# Find 3 least common letters (default)
ww find-scarce

# Find 5 least common letters
ww find-scarce --num 5

Use case: Helpful for Wordle strategy - these letters appear less frequently in the word list.

dedup - Clean Duplicate Words

Remove duplicate entries from the word list and update words.py:

ww dedup

⚠️ Note: This modifies the words.py file in place.

sort - Alphabetically Sort Word List

Sort the word list alphabetically and update words.py:

ww sort

⚠️ Note: This modifies the words.py file in place.

Examples

# Check current status
ww stats

# Clean up the word list
ww clean
ww dedup
ww sort

# Analyze letter frequency for Wordle strategy
ww find-scarce --num 10

Help

For detailed command options:

ww --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wordle_words-0.2.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wordle_words-0.2.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file wordle_words-0.2.0.tar.gz.

File metadata

  • Download URL: wordle_words-0.2.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.25

File hashes

Hashes for wordle_words-0.2.0.tar.gz
Algorithm Hash digest
SHA256 afefa1a8553ed6f26681e285944f9f0b81be2d13e9f416c0d04d6fcc2160c75b
MD5 f07fdcf8551276bd68e6f6e9e3f4482f
BLAKE2b-256 1a9dd375be9cd0518ec1a9519c215ba5b6647d9ec1bf0942558425cc0c83b3ae

See more details on using hashes here.

File details

Details for the file wordle_words-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wordle_words-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6ff1d258d1694636c1b400ac675f9071a82d49954fdd0b9b061745594e2b1f5
MD5 790f9096940597b9f3d76aed7763d452
BLAKE2b-256 862be20af36e9f6be09c6f600101e4c6e5432d61fc819e7bf1eb4041327c13b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page