A simple Python tool to find words associated with a target word in a user-provided text corpus. The program scans sentences, finds the target word, and extracts nearby words (context window), filtering out common English stopwords.
- Accepts multiple sentences as input from the user.
- Finds all words appearing near a specified target word.
- Adjustable context window size (number of words before/after the target).
- Filters out common English stopwords for cleaner results.
- Runs entirely in the terminal.
- The user enters sentences one by one (type
ENDto finish). - The user specifies the target word to search for.
- The user sets the context window size (how many words before/after to include).
- The program scans all sentences, finds the target word, and collects associated words within the window.
- Stopwords are removed from the results.
- The associated words are printed to the console.
- Clone or download this repository.
- Open a terminal in the project directory.
- Run the program:
python word_association_finder.py
- Enter sentences (type
ENDto finish). - Enter the target word and context window size.
- View the associated words.