TextAnalyzer is a command line client, written in Python, capable of reading in and analyzing text from a variety of sources, including strings, local files, and webpages on the Internet.
This project is compatible with both Python 2.x and Python 3.x, so you need to first install one of these versions of the Python interpreter.
To install a Python interpreter for running this code, please visit the Python Downloads page and click on either the button labeled Download Python 2.7.x or the one labeled Download Python 3.6.x.
To check if Python 2.x is installed, open Console (Linux), Terminal (MacOS), or Command Prompt (Windows) and type the following:
python --version
If you see something like python 2.7.9
, then you're ready to go!
To check if Python 3.x is installed, follow the same instructions as above, but type in the following at the prompt:
python3 --version
If you see something like python 3.6.0
, then you're ready to continue with the rest of the installation.
In order to support text analysis on webpages, this project makes use of the the Requests library.
To install the Requests library, type in the following in your console / command prompt:
pip install requests
If you would like to use the included graph.py
as a library, you need to install matplotlib as follows:
pip install matplotlib
After completing the above steps, you should be ready to run the program, as specified below.
python main.py -h
python main.py -s 'Hello, World!' 'Strings are great'
python main.py -f poem.txt speech.txt ../conversation.txt
python main.py -u http://www.example.com
- Python - https://www.python.org
- Requests - http://docs.python-requests.org/en/master/
- Matplotlib - http://www.matplotlib.org
- Syed Peer
- Thanks to Kenneth Reitz for the Requests library