This program counts the frequency of words and returns a dictionary
For example for the input "olly olly in come free"
Uses the Counter Class to iterate through the list thereby enhancing performance
Some prerequisites are required to have achieved desired output.
This code is written in Python3 and may have unexpected functionality when run with Python 2.x
Install pytest:
$ pip install pytest
Alternatively, Install nose
$ pip install nose
clone the code from git using this limk:
git clone https://github.com/Bryoo/WordCount
Ensure you're in the main directory 'prime_numbers' and then run the code
python3 wordcount.py
## Executing the tests included
if you've got pytest
$ py.test test_word_count.py
If you've got nosetests
$ nosetests test_word_count.py
Alternatively, if you do not have either nosetests or pytest installed, use:
$ python3 test_word_count.py
The test cases present includes some tests for both edge and general cases: