HOW TO USE MACHINE LEARNING TO IMPROVE YOUR WRITING
Machine Learning in Writing
Amazingly, people can now create writings that are error-free and as such improve their
experiences without stress.
This is made possible by the use of sophisticated Artificial Intelligence (A.I) just as it was
recorded that Microsoft rolled out an Editor in Word that can offer suggestions for rewriting
full sentences rather than just offering spelling or grammar fixes.
The AI-powered writing assistance tools are created with deep learning algorithms and trained
on large and diverse datasets which are the documents written by people, to preserve focus
time and help one find ways to write more clearly.
How to Use
Before, getting started is of the essence to download this code created by Sung Kim. After
which unzip it and copy the folder there into a desktop environment. Open the file input.txt in
the folder through these path: word-rnn-tensorflow-master > data > tinyshakespeare > input.txt
Delete all text in the file and replace with any sample text to be used. The computer algorithm
would understand all the unique words in the sample, then use the mathematical model of deep
learning to group words that appear often together in the text given.
Install tensor flow – a machine learning library for running codes: click command + space and
enter a “terminal” in the Spotlight search bar, then click the enter key. The terminal opens, then
enter the codes below one after another while pressing the enter key after each entry;
sudo easy_install pip
⏎
sudo easy_install --upgrade six
⏎
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow0.12.1-py2-none-any.whl
⏎
sudo pip install --upgrade $TF_BINARY_URL
Train the model with tensorflow i.e. to begin, enter the code below in the terminal consecutively
one after another using the enter key:
source ~/tensorflow/bin/activate
cd ~/desktop/word-rnn-tensorflow-master
python train.py
once training is completed, kindly open the file “sample.py”, that is in the “word-rnntensorflow-master” folder. And search for this line of code:
parser.add_argument(‘-n’, type=int, default=200, help=’number of words to sample’)
Change the above code default value from “200” to any number of words you do like to
generate. Then save the file again and go back to the terminal. Enter this code:
python sample.py
This presents a beautiful piece of writing crafted with deep leaning – machine learning. Carry
out any necessary correction to get it ready for publishing.
The advancement of this technology has made a space for recreating, making corrections and
generating a piece of writing that is relevant and less-stressful.