Skip to content

willemhb/py-word-freq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Word Frequency

Directions

In this project, you will use open to read in a text file and calculate the frequency of words in that file.

To calculate the frequency of words, you must:

  • remove punctuation
  • normalize all words to lowercase
  • remove "stop words" -- words used so frequently they are ignored
  • go through the file word by word and keep a count of how often each word is used

When your program is complete, you should be able to run python3 word_frequency.py praise_song_for_the_day.txt and get a printed report like this:

     we | 7 *******
   each | 5 *****
     or | 5 *****
   need | 5 *****
   love | 5 *****
  about | 4 ****
 praise | 4 ****
   song | 4 ****
    day | 3 ***
    our | 3 ***

Starter Files

A starting program is located in word_frequency.py.

Resources

Bibliography

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages