Closed vishwas542-ydv closed 4 months ago
Hi Ndleah
I hope this message finds you well.
I wanted to extend my sincere thanks for merging the changes I made to your repository Ndleah/python-mini-project. I appreciate your prompt review and approval.
Regards, Vishwas Yadav
On Sun, 2 Jun 2024, 7:01 am Leah Nguyen, @.***> wrote:
Merged #264 https://github.com/ndleah/python-mini-project/pull/264 into main.
— Reply to this email directly, view it on GitHub https://github.com/ndleah/python-mini-project/pull/264#event-13010867027, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2QXFUUOTWTY4Y3WBR2ZMDZFKYLHAVCNFSM6AAAAABH6XTV5SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGAYTAOBWG4YDENY . You are receiving this because you authored the thread.Message ID: @.***>
Description
These changes collectively enhance the dictionary project by improving error handling, converting it to a user-friendly graphical interface, and adding functionality for handling and suggesting similar words when an exact match is not found.
Fixes #(issue_no)
<insert your issue no here>
Type of change
Choosing one or more options from the following as per the nature of your Pull request.
Project
Your Project Name: Advance-Dictionary
Short Description: Provide a short desctiption of your Python project
Exception Handling: Added exception handling in the load_data function to manage potential errors when reading the JSON file (e.g., file not found, invalid JSON, unexpected errors).
Path Handling: Corrected the file path handling using raw string literals to avoid SyntaxError due to escape sequences.
Improved translate Function: Modified the translate function to handle different cases (lowercase, title case, uppercase) for word lookups. Ensured the translate function consistently returns a tuple (output, suggestion).
User Suggestions: Implemented logic to suggest the closest matching word if the exact word is not found. Added a GUI button to allow users to search for the suggested word if a close match is found.
GUI Enhancements: Converted the console-based application to a graphical user interface (GUI) using tkinter. Added input validation to ensure users enter a word before attempting a search. Displayed results and suggestions in the GUI, with a button to confirm and search for suggested words.
Code Structure: Organized the code into functions for better readability and maintainability. Loaded the dictionary data once at the beginning and reused it for all searches to improve efficiency.
Functionality Testing: Ensured the application correctly handles both exact matches and close matches, providing appropriate feedback to the user.
Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.
README.md
, according to the givenREADME_TEMPLATE.