{"id":25735786,"url":"https://github.com/muavia1/notepad-with-auto-suggestion-using-huffman-coding-c-","last_synced_at":"2026-05-15T17:05:16.512Z","repository":{"id":250596930,"uuid":"834897388","full_name":"Muavia1/Notepad-with-auto-suggestion-using-Huffman-Coding-C-","owner":"Muavia1","description":"This project implements a simple text editor with auto-suggestion functionality using Huffman Coding in C++. The program provides real-time word suggestions based on the text entered, enhancing typing efficiency and user experience.","archived":false,"fork":false,"pushed_at":"2025-02-16T18:34:10.000Z","size":1277,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T05:35:35.027Z","etag":null,"topics":[],"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/Muavia1.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-28T17:22:20.000Z","updated_at":"2025-02-16T18:34:13.000Z","dependencies_parsed_at":"2024-07-28T18:44:23.751Z","dependency_job_id":"bac6581b-10df-48ce-a34c-a6d38a402752","html_url":"https://github.com/Muavia1/Notepad-with-auto-suggestion-using-Huffman-Coding-C-","commit_stats":null,"previous_names":["muavia1/notepad-with-auto-suggestion-using-huffman-coding-c-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Muavia1/Notepad-with-auto-suggestion-using-Huffman-Coding-C-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2FNotepad-with-auto-suggestion-using-Huffman-Coding-C-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2FNotepad-with-auto-suggestion-using-Huffman-Coding-C-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2FNotepad-with-auto-suggestion-using-Huffman-Coding-C-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2FNotepad-with-auto-suggestion-using-Huffman-Coding-C-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muavia1","download_url":"https://codeload.github.com/Muavia1/Notepad-with-auto-suggestion-using-Huffman-Coding-C-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muavia1%2FNotepad-with-auto-suggestion-using-Huffman-Coding-C-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33072974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-02-26T05:32:05.401Z","updated_at":"2026-05-15T17:05:16.475Z","avatar_url":"https://github.com/Muavia1.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notepad-with-auto-suggestion-using-Huffman-Coding-C++-\n\n\nThis project implements a text editor that supports real-time word suggestions and efficient text compression using Huffman encoding. The editor is designed to assist users by predicting words and saving text in a compressed format.\n\n## Features\n- **Huffman Encoding**: Compresses text by encoding characters based on their frequency.\n- **Trie-based Word Suggestions**: Predicts and suggests words as the user types.\n- **File Persistence**: Saves and loads text with the corresponding Huffman tree.\n- **Interactive Editing**: Supports word selection, navigation, and text saving.\n\n## How It Works\n1. **Calculate Frequency**: The frequency of each character is computed.\n2. **Build Huffman Tree**: Characters are encoded using a Huffman tree.\n3. **Trie Tree for Suggestions**: A dictionary is loaded into a trie to provide suggestions.\n4. **Text Input**: Users can type text, select suggestions, and save their work.\n\n## Usage\n- **Alphabetic Characters**: Type letters to get word suggestions.\n- **Space (` `)**: Finalizes a word and adds a space.\n- **Period (`.`)**: Finalizes a sentence, capitalizing the next word.\n- **Slash (`/`)**: Navigate through word suggestions.\n- **Semicolon (`;`)**: Select a suggested word.\n- **Equal Sign (`=`)**: Save the current text.\n- **Enter (`Enter`)**: Exit the editor.\n\n## File Structure\n- **dictionary.txt**: Contains the words for the trie tree.\n- **userText.txt**: Stores the compressed user text.\n- **HuffTree.txt**: Stores the structure of the Huffman tree.\n\n## Code Overview\n- **calculate_freq**: Counts the frequency of characters.\n- **Huffman Tree**: Encodes text efficiently.\n- **Trie Tree**: Predicts words based on prefixes.\n- **Main Loop**: Handles user input and manages suggestions.\n\n## Compilation Instructions\nUse a C++ compiler (e.g., g++) to compile the code:\n```bash\ng++ -o text_editor text_editor.cpp\n./text_editor\n```\n\n## Example\n```plaintext\nWelcome to Text Editor\n1. Enter new text\n2. Load a saved text\n\nInput text while getting live word suggestions. Press `=` to save and `Enter` to exit.\n```\n\nThis editor provides a combination of predictive text functionality and text compression, making it suitable for basic text entry tasks.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuavia1%2Fnotepad-with-auto-suggestion-using-huffman-coding-c-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuavia1%2Fnotepad-with-auto-suggestion-using-huffman-coding-c-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuavia1%2Fnotepad-with-auto-suggestion-using-huffman-coding-c-/lists"}