Question: Build a C++ program that will read a .txt file using command line argument, and create a binary search tree of (key, value) pairs. Key:
Build a C++ program that will read a .txt file using command line argument, and create a binary search tree of (key, value) pairs.
Key: Each single word in the text (excluding stop-words);
Value: the 3 neighboring words (before and after the key). You will use this tree to collect the context information for each non-stop-word in the corpus. Each tree node should have a linked list of 3 neighboring words. Stop words will be read from another .txt file (one word per line) and will include words such as a, the, or, etc.
Final output for each keyword should be ordered by occurrence in the input text
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
