https://github.com/coderefinery/git-archaeology-exercise
https://github.com/coderefinery/git-archaeology-exercise
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/coderefinery/git-archaeology-exercise
- Owner: coderefinery
- License: other
- Created: 2019-10-21T19:18:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T19:44:23.000Z (over 6 years ago)
- Last Synced: 2025-09-10T04:47:39.863Z (9 months ago)
- Language: Python
- Size: 761 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Word count example
These programs will count words in a given text, plot a bar chart of the 10
most common words, and test [Zipf's
law](https://en.wikipedia.org/wiki/Zipf%27s_law) on the two most common words.
- Simplified version of a [full word-count example project](https://github.com/coderefinery/word-count).
- Inspired by and derived from https://hpc-carpentry.github.io/hpc-python/
which is distributed under
[Creative Commons Attribution license (CC-BY 4.0)](https://creativecommons.org/licenses/by/4.0/).
## Usage
Four texts are provided in the `data/` directory:
```shell
$ ls data/
LICENSE_TEXTS.md abyss.txt isles.txt last.txt sierra.txt
```
To calculate the word frequency distribution of a given text file:
```shell
$ python source/wordcount.py data/abyss.txt output.dat
```