This is a command-line Python application that allows users to read, edit, analyze, and save changes to a text file. It serves as a full-featured text editor with word analysis capabilities.
- Load and display text from a
.txt
file - Count all words and show the top 5 most common
- Count occurrences of a specific word
- Replace one word with another
- Highlight words in the text
- Add or delete custom lines
- Save edits to file
- Fully interactive CLI interface
text_editor/
├── text_editor.py
├── my_text_file.txt
└── README.md
- Make sure you have Python 3 installed.
- Place a
.txt
file namedmy_text_file.txt
in the same folder. - Run the script:
python text_editor.py
Follow the prompts to navigate the menu and apply changes to the file.
- Python 3.x
- No third-party libraries needed
1) Count All Words
2) Count Specific Word
3) Replace Word
4) Add Text
5) Delete Text
6) Highlight Word
7) Reverse Word
8) Save Changes
9) Quit
James Bilis — Master's in Computer Science (Merrimack College)
This project fulfills the “Text Parser” milestone in the CSC 6003 course roadmap. It demonstrates file handling, string processing, word frequency analysis, and interactive CLI development in Python.