Git Product home page Git Product logo

spelling_bee's Introduction

This Python script solves the New York Times Spelling Bee puzzle. It provides more words than are accepted, but will usually generate a list of words containing all the words accepted by the puzzle.

How to run

  1. Ensure you have Python 3 installed.
  2. Run python3 spelling_bee.py '{middle letter}' '{other letters}' file. e.g. python3 spelling_bee.py 'a' 'qwerty'. The script will generate a JS file called consoleSolver.js that can be posted into the console on https://www.nytimes.com/puzzles/spelling-bee to solve the puzzle.

words_prunner.py utility

words_prunner.py allows users to solve custom versions of the Spelling Bee, or use their own dictionary.

The list of words is prunned on:

  • Minimum word length
  • Maximum number of unique characters
  • Remove words with non-alphabetic characters

Usage

words_prunner --input_file words.txt --output_file words_prunned.txt --min_length 4 --max_unique_characters 7

Arguments

  • --input_file: Input file containing words
  • --output_file: Output file to write pruned words
  • --min_length: Minimum length of words to keep (default: 4)
  • --max_unique_characters: Maximum number of unique characters in words to keep (default: 7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.