Giter Site home page Giter Site logo

wtdb's Introduction

WTDB (What's the Difference Between?)

WTDB is a word-play game where you guess spoonerism pairs based on a clue beginning with "what's the difference between?"

For example,

"What's the difference between an old locomotive and stress on a group?" -> "steam train" / "team strain"

This is a hacky Python script to produce potential spoonerism pairs based on a list of words.

Usage

Pipe the list of words to python3 wtdb.py, e.g. if you're on Ubuntu you can try:

cat /usr/share/dict/british-english | python3 wtdb.py

However that produces quite a lot of garbage due to weird words, short words, words with spaces or apostrophes, proper nouns etc.

A shorter word list might be better, e.g. from https://github.com/first20hours/google-10000-english

You could also limit to longer words to get more interesting results, e.g.

cat google-10000-english.txt | awk '{ if (length($0) > 4) print }' | python3 wtdb.py

Testing

python3 -m unittest wtdb_test.py

wtdb's People

Contributors

hughgrigg avatar

Watchers

 avatar  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.