Skip to content

I used python to take a input file name and count the number of times each words have been repeated in the file while also storing those words and their word count in a new .txt file and a .txt file that has a set of words that were only repeated once

Notifications You must be signed in to change notification settings

Shashwat-SWAT/Word-Counter-for-File---Python

Repository files navigation

You can use Word-Counter.py file for data analysis. While entering the name please consider adding name_of_file.txt (.txt) so that the interpreter doesn't wrongly assume that the file you entered the name of doesn't exit.

*Word-Counter.py: Main python file that has the code in it.

  1. sample.txt: A small sample file that i used to check the correctness of my program as i was writing it. It was used for a small data entry, which made the debugging easy when i noticed anything funky.

  2. us_constitution.txt: This a file with a lot of different words. I used this file at last when i was sure that i had no errors in my code -- to see the final result.

  3. Cleanfile_wordsonly.txt: This .txt file is a copy of the file you put the name of. The only difference is that this file has replaced all the special character into blank spaces ' ' and all the alphabets are lower cased.

  4. word_count.txt: This .txt file will have all of the words present in the file you wanted to scan. It stores the words and the number of times each of the words being repeated in a format given below. Word ===> Count

  5. unique_words.txt: This .txt file consist of the word that were only seen once in the whole file. It is stored as:

  • The_word

About

I used python to take a input file name and count the number of times each words have been repeated in the file while also storing those words and their word count in a new .txt file and a .txt file that has a set of words that were only repeated once

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages