This project implements a PDF WordCloud Generator that extracts text from a PDF file, processes it by removing stopwords, numbers, and punctuation, and generates a word cloud based on word frequency analysis.
- Stopword Removal: Cleans the extracted text by removing stopwords based on the selected language.
- Word Frequency Analysis: Calculates word occurrences and highlights the most frequently used words.
- Word Cloud Generation: Displays a visually appealing word cloud using the
wordcloudandmatplotliblibraries. - Multi-language Support: Supports stopword removal in multiple languages.
To run this project, ensure you have Python 3.x installed. Additionally, you will need to install the required dependencies.
- Clone the repository:
git clone https://github.com/JeanVerissimo/wordcloud-generator.git
cd wordcloud-generator- Install dependencies:
pip install pymupdf nltk wordcloud matplotlib- Download NLTK stopwords:
import nltk
nltk.download('stopwords')Run the main.py script to start the application. This script provides a GUI interface to select a PDF file, analyze its content, and generate a word cloud.
python main.py- Select Language: Choose a language from the dropdown menu.
- Load PDF: Click the "Load PDF" button to select a file.
- View Word Statistics: The extracted text is analyzed, and key statistics such as total words, unique words, and word frequency are displayed.
- Generate Word Cloud: Click the "Generate WordCloud" button to visualize the most frequent words.