{"id":23224027,"url":"https://github.com/junaidsalim/word_predicter","last_synced_at":"2025-04-05T16:44:29.818Z","repository":{"id":217705561,"uuid":"741333703","full_name":"JunaidSalim/Word_Predicter","owner":"JunaidSalim","description":"Program developed in C++ that will recommend new word to user based on frequency of his previously entered words.","archived":false,"fork":false,"pushed_at":"2024-01-17T16:55:38.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T13:52:23.600Z","etag":null,"topics":["cpp","dsa","word-prediction"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JunaidSalim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-10T07:16:11.000Z","updated_at":"2024-02-11T08:22:31.000Z","dependencies_parsed_at":"2024-01-18T00:43:10.448Z","dependency_job_id":"c6faf0b0-f859-4802-a379-0c0952b5bd25","html_url":"https://github.com/JunaidSalim/Word_Predicter","commit_stats":null,"previous_names":["junaidsalim/word_predicter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Predicter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Predicter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Predicter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FWord_Predicter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JunaidSalim","download_url":"https://codeload.github.com/JunaidSalim/Word_Predicter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369932,"owners_count":20927927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","dsa","word-prediction"],"created_at":"2024-12-18T23:29:56.702Z","updated_at":"2025-04-05T16:44:29.801Z","avatar_url":"https://github.com/JunaidSalim.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word_Predicter_Cpp\n Program developed in C++ that will recommend new word to user based onfrequency of his previously entered words.\n \n**Approach:**\nThis C++ program implements a real-time text input recommendation system based on the frequency of previously entered words. It provides word suggestions as the user types, allowing for efficient and personalized text input.\n\n**Data Structure Usage:**\n1. **Map (std::map):**\n   - A map is employed to store the frequency of each entered word. The word serves as the key, and the associated value represents its occurrence count.\n   - This allows for quick retrieval of word frequencies and efficient tracking of user input history.\n\n2. **Vector (std::vector):**\n   - A vector is utilized to store the entered words, maintaining the order in which they were typed.\n   - Suggestions are generated based on the frequency of words in the map and displayed to the user.\n\n**Intuition:**\n1. **Input Handling:**\n   - The program captures words entered by the user, stored in a vector (`vect`).\n   - As each word is entered, the corresponding map (`map`) is updated to track its frequency.\n\n2. **Suggestion Generation:**\n   - Suggestions are dynamically generated based on the frequency of previously entered words.\n   - The `Suggestions` function sorts words by frequency and provides the top suggestions, excluding repeated entries.\n\n3. **User Interaction:**\n   - The program continuously displays the entered words and offers suggestions.\n   - Users can select suggestions using Ctrl + (A, B, C, D) or choose to skip a suggestion with Enter/Spacebar.\n   - Pressing Esc exits the program.\n\n**Usage:**\n1. **Typing:**\n   - Start typing words, pressing Enter instead of Spacebar when completing a word.\n   - Suggestions will be displayed based on the frequency of previously entered words.\n\n2. **Selection:**\n   - Use Ctrl + (A, B, C, D) to select a suggestion.\n   - Press Enter/Spacebar to skip a suggestion.\n\n3. **Exit:**\n   - Press Esc to exit the program.\n\n**Example:**\n   - The provided example showcases the program's functionality, providing real-time word suggestions based on the user's input history.\n\n**Note:**\n   - Ensure proper terminal support for special key inputs (Ctrl + A, B, C, D, Esc). The program uses the `conio.h` library for getch().\n\n**Execution:**\n   - Compile and run the program, then follow the on-screen instructions. Press Esc to exit when done.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidsalim%2Fword_predicter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaidsalim%2Fword_predicter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidsalim%2Fword_predicter/lists"}