A Flask app to analyze writing samples, powered by NLTK for analysis and Bootstrap for UI.
It has the following features:
- Show adjectives and adverbs
- Show all parts of speech
- Count words and characters
Visit WriteBetter on Google Cloud to try it yourself.
- Clone or download the code.
- Run the following commands from a terminal:
cd WriteBetter
tox -e py37
source .tox/py37/bin/activate
FLASK_APP=./write_better/write_better.py flask run
- Open http://127.0.0.1:5000/ in a browser.
NOTE: I wrote this using Python v3.7.x, but I suspect it will work fine for any Python that can install the requirements with trivial changes.
- To style the analyzed text, the Flask template uses a "|safe" filter, assuming that the generated text is safe to be interpreted as is. This assumption may be false under certain unusual circumstances that I cannot elaborate on (due to my ignorance). If the writing sample is plain English, I wouldn't worry about it. Otherwise, I hope you know what you are doing.
- The secret key of this Flask app has been hard-coded to "not_really_secret". This is safe if you are both running the app and using it. If someone else is running it (like, online), I would think twice about submitting my novel that I hope to profit from some day.