This project implements a mini text-search engine using core C++ data structures. It supports Word Search, Phrase Search, and Autocomplete across multiple .txt files.
Indexes all words from multiple files
Stores word positions for fast lookup
Word search sorted by highest frequency
Phrase search with exact sequential matching
Trie-based autocomplete for prefixes
Load text files
Normalize: lowercase + remove punctuation
Skip stopwords
Build global index:
unordered_map<string, unordered_map<string, vector>>
Provide search operations via menu
Directly fetch frequency from index and sort files by occurrences.
Check if phrase words appear sequentially using position matching.
Trie returns all words matching a given prefix.
A simple BFS-based bipartite check is included to validate graph-like relationships dynamically built during processing. This ensures stable linking of words/files and prevents invalid structural patterns.
🔹 How to Run g++ main.cpp -o search ./search