A small desktop app built with Python that counts repeated words in text you enter. It uses Tkinter and CustomTkinter to create a graphical interface.
- Enter words separated by spaces.
- Counts words without distinguishing uppercase and lowercase (for example,
Helloandhellocount as the same word). - Displays only words that appear more than once.
- Simple desktop interface.
- Python 3
- Tk support for Python
- CustomTkinter
Tkinter is included with many Python installations, but some Linux distributions package it separately. On Arch Linux, install it with:
sudo pacman -S tkIt’s recommended to use a virtual environment so the project’s Python packages stay separate from your system Python.
From the project folder, create and activate a virtual environment:
python -m venv env
source env/bin/activateInstall the project’s Python dependencies:
python -m pip install -r requirements.txtIf you don’t have a requirements.txt file yet, create one containing:
customtkinter
You can install the dependency directly instead with:
python -m pip install customtkinterWith the virtual environment activated, run:
python main.pyReplace main.py with the name of your Python file if needed.
- Launch the app.
- Type words separated by spaces into the input field.
- Click Count repeated words.
- The result displays each repeated word and its count.
For example, this input:
pp hard hi subscribe pp hard subscribe pp
produces:
{'pp': 3, 'hard': 2, 'subscribe': 2}