Skip to content

A word counter program that reads a file and returns the most commonly used words and their word count. Written using linked lists and hash maps in Python.

Notifications You must be signed in to change notification settings

lagunasmel/Word-Counter

Repository files navigation

Word Counter

Word Counter is a terminal-based app that accepts an input file, computes the number of times each word was used in the file, and returns the top 10 words and associated counts for each word as a list of tuples.

In order to count each word, a hash map is created for each word and linked lists are used to iterate through the buckets.

Sample run

python3 word_count.py alice.txt

Sample results

[('the', 1644), ('and', 872), ('to', 729), ('a', 632), ('she', 541), 
('it', 530), ('of', 514), ('said', 462), ('i', 408), ('alice', 386)]

About

A word counter program that reads a file and returns the most commonly used words and their word count. Written using linked lists and hash maps in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages