Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 731 Bytes

File metadata and controls

20 lines (17 loc) · 731 Bytes

A programming exercise based on Zipf's law

A common word sorter written in python

Note

I wrote this a while ago, but have now realized that it is very similar to this.

Instalation

Linux and macOS

-git clone https://github.com/KazMalhotra/zipf.git
-cd zipf
-pip install str

Windows

Download the zip file and extract. Install python and pip.

Usage

-python main.py inputfile.txt sortedwords.csv

Example

-python main.py juliuscaesar.txt sorted.csv

Simple explanation of Zipf's law

Zipf's law is based on the premise that common words are used far more than uncommon words.