{"id":23012324,"url":"https://github.com/lmizner/spell-checker","last_synced_at":"2025-04-02T17:12:31.634Z","repository":{"id":140410088,"uuid":"350864183","full_name":"lmizner/spell-checker","owner":"lmizner","description":"A program that implements a spell checker by cross checking words from a dictionary file with the words from a user specified text file. Words matching those in the dictionary will be deemed correctly spelled, while those not matching values found in the dictionary file are flagged as misspelled. ","archived":false,"fork":false,"pushed_at":"2021-03-29T22:03:07.000Z","size":730,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T07:41:40.313Z","etag":null,"topics":["c","data-structures","hash-table","linked-list"],"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/lmizner.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":"2021-03-23T21:36:33.000Z","updated_at":"2021-03-29T22:03:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"200ef419-3607-4d23-9e69-5d0bf6591bd6","html_url":"https://github.com/lmizner/spell-checker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmizner%2Fspell-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmizner%2Fspell-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmizner%2Fspell-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmizner%2Fspell-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmizner","download_url":"https://codeload.github.com/lmizner/spell-checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246856677,"owners_count":20844974,"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":["c","data-structures","hash-table","linked-list"],"created_at":"2024-12-15T10:13:32.905Z","updated_at":"2025-04-02T17:12:31.613Z","avatar_url":"https://github.com/lmizner.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spell-checker\n\nCS50 Problem Set: https://cs50.harvard.edu/x/2021/psets/5/speller/\n\nThis problem set required the implementation of 5 functions (load, hash, size, check, and unload) in the dictionary.c file. \n\nLoad:\nThe load function starts by opening a dictionary file and reading each string, or word, from the file one at a time. For each string a node is created with the \nappropriate amount of allocated memory. The string, or word, is then copied into the node data structure. From there, the hash function is applied to the word to \nobtain the hash value. The hash value is input into the hash table along with the appropriate pointer. With each cycle through the while loop, a counter adds 1 in \norder to track the total number of words in our dictionary. The loop will continue until it has reached the end of the dictionary file.  \n\nHash:\nThe hash function is used to take the word and convert it to obtain the appropriate hash value.\n\nSize:\nThe size function returns the number of words in the dictionary after the dictionary has been fully loaded. The number of words is determined by a counter that has \nbeen implemented within the while loop of the load function. \n\nCheck:\nThe check function will take as input each word from the text file specified by the user. The hash function will be applied to the word to obtain the corresponding \nhash value. The hash value will be used as an index within the hash table to access the correct linked list. Once the linked list has been reached, the program will \nbegin to loop through the contents of the linked list, comparing the string value of the text file to the string value of the dictionary that is sorted within the \nhash table. The while loop will continue to cycle through the linked list until a matching string is found or the end of the list is reached. If the word is not in \nthe dictionary, then the function will return false. \n\nUnload:\nThe unload function is used to unload the dictionary file from memory. With any program, it is important to free any allocated memory once it is done being used \nwithin the program. To implement this, there are nested loops where we cycle through the hash table on the outer loop and cycle through the linked list on the inner \nloop. Within the inner loop, a temporary pointer is set to the value of the current cursor pointer, then the cursor pointer is moved to the next value in the linked \nlist, and the temporary value is freed from memory. This process is used to make sure we do not break the linked list in the process of freeing the memory. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmizner%2Fspell-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmizner%2Fspell-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmizner%2Fspell-checker/lists"}