Enjoy colorful word representation!!
- Theano 8.0
- A recent version of NumPy and SciPy
- Beautiful Soup, Requests (for Web demo)
If you use virtualenv
cd ~/
virtualenv color-test
source ~/color-test/bin/activate
cd /path/to/color_turing_test
pip install -r requirements.txt
Provide text file which contains list of words (-f). To visualize color, use html output with -ht = 1.
python run.py -f example_data/example.txt -ht 1 > example.html
If you want to see what's going on in character base model, try to look colors character by character.
python run.py -f example_data/example.txt -ht 1 -c 1 > example.html
The code download an article and replace Title and paragraphs with colorful string. Since the crawler is not carefully written, it will fail for some websites.
If you want to have some examples, please check example_result folder.
python web.py -f http://greatist.com/health/super-berry-quinoa-salad > example_result/recipe.html
The code produce color even your input have characters which are not in training data. It replace unknown character with '-' and predict color for it.
The model will be updated later.