Giter Club home page Giter Club logo

licenseplate-game's Introduction

What?

It plays the license plate game!

licenseword.appspot.com

Modern California license plates are in the form #XYZ###. Where XYZ are letters and #'s are numbers.

The Game

Find a word that uses the 3 letters in a given license plate, in order. Bonus points if they are sequential.

Usage

  1. Precomputed:

    • Generation:
    • Usage:
  2. Tries: Do this... eventually...

Word List Format

TODO

The Method

  1. 2 Tries

  2. Precompute a hashmap of all every 3 letter combo => all words that contain that combo in that order. 262626 = 17,576 entries. Each combo is then a constant O(1) lookup.

Resources

  • Dictionary sourced from [http://wordlist.aspell.net/]. They provide a tarball with many more resources then we care about. To generate my test word list, all the files in final/ with the prefix 'american' were concatenated together. There's no reason more couldn't have been used.

To do this, I used this one-liner: find .|grep -v 'proper-names\|abbreviations'|xargs cat |strings|LC_ALL=C tr '[:upper:]' '[:lower:]'|LC_ALL=C sort|LC_ALL=C uniq - > all-nodupes.txt

This cats together all the files whose name doesn't include the two grepped-for strings, lowercasing them, removing any words with unicode, and de-duping. The nasty LC_ALL=c was to get (all those binaries) to parse unicode weirdness.

Using the 2014.11.17 tarball, I got a total of 643,417 words in 6.5MB. I'm sure there are still some dupes, but whatever. Good enough for now.

To Do

  • Sort to show words with letters sequentially at (and alpha)

licenseplate-game's People

Contributors

borgel avatar

Watchers

 avatar James Cloos avatar

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.