Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Help you guess drawsomething words by brute force all permutations

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 drawsomething
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

Drawsomething

Help you guess drawsomething words by brute force all permutations.

Depends

  • pyenchant
  • google-translate

Install Guide

Take OS X for example.

Drawsomething depends on enchant to do spell checking.

As pyenchant is only a python binding for enchant, we need to install enchant first. And we also need to install aspell with en dict because enchant use aspell as backend.

$ brew install aspell --lang=en
$ brew install enchant
$ pip install pyenchant google-translate

Usage

One line script to generate all possible words:

>>> import drawsomething
>>> drawsomething.get_words('esttxyz', 4)
['ttys', 'sexy', 'yest', 'text', 'sett', 'zest', 'stet', 'test']

To list words with translations:

>>> import drawsomething
>>> words = drawsomething.get_words('esttxyz', 4)
>>> for w in words:
>>>     trans = drawsomething.translate(w, 'zh_cn').lower()
>>>     print w, trans

The drawsth is a cli script to list all possible words:

$ drawsth -l 4 -c esttxyz
ttys
sexy
yest
text
sett
zest
stet
test
Something went wrong with that request. Please try again.