{"id":21529111,"url":"https://github.com/abrehan2/autocorrect-nlp","last_synced_at":"2026-05-20T06:03:35.838Z","repository":{"id":210405791,"uuid":"726379168","full_name":"abrehan2/Autocorrect-Nlp","owner":"abrehan2","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-02T15:07:39.000Z","size":657,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T06:12:22.978Z","etag":null,"topics":["googlecolab","nlp","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/abrehan2.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}},"created_at":"2023-12-02T08:02:52.000Z","updated_at":"2023-12-02T14:31:56.000Z","dependencies_parsed_at":"2023-12-02T15:39:29.174Z","dependency_job_id":null,"html_url":"https://github.com/abrehan2/Autocorrect-Nlp","commit_stats":null,"previous_names":["abrehan2/autocorrect-nlp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrehan2%2FAutocorrect-Nlp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrehan2%2FAutocorrect-Nlp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrehan2%2FAutocorrect-Nlp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrehan2%2FAutocorrect-Nlp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abrehan2","download_url":"https://codeload.github.com/abrehan2/Autocorrect-Nlp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244094273,"owners_count":20397020,"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":["googlecolab","nlp","python"],"created_at":"2024-11-24T01:55:50.484Z","updated_at":"2026-05-20T06:03:30.819Z","avatar_url":"https://github.com/abrehan2.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto-Correct and String Manipulation\n\nThis repository contains Python code for text preprocessing and manipulation, including auto-correction functionalities using dynamic programming inspired by minimum edit distance. The implemented tasks are outlined as follows:\n\n---\n\n## Part 1: Data Preprocessing\n\n### Task 1.1: `process_data` function\n- Reads a corpus (text file).\n- Converts the corpus to lowercase.\n- Returns a list of words.\n\n### Task 1.2: `get_count` function\n- Returns a dictionary where keys are words, and values are their frequency in the corpus.\n\n### Task 1.3: Computing Word Probabilities\n- Calculates the probability of each word appearing when randomly selected from the corpus using the formula: P(wi) = C(wi) / M, where C(wi) is the count of word wi and M is the total number of words.\n\n---\n\n## Part 2: String Manipulations\n\n- `delete_letter` function: Returns all possible strings with one character removed from a given word.\n- `replace_letter` function: Returns all possible strings with one character replaced by another different letter.\n- `insert_letter` function: Returns all possible strings with an additional character inserted into a given word.\n\n---\n\n## Part 3: Combining the Edits\n\n- `edit_one_letter` function: Generates all possible edits one edit away from a word using delete, replace, and insert operations.\n- `edit_two_letters` function: Generates a set of words that are two edits away from a given word using combinations of `edit_one_letter` function.\n- `get_corrections` function: Provides spelling suggestions based on minimum edit distance logic, prioritizing words with fewer edits.\n\n---\n\n## Part 4: Minimum Edit Distance\n\n### Dynamic Programming Algorithm\n- Computes the minimum number of edits required to convert one string into another.\n- Utilizes a table to efficiently calculate edit distances for substrings of source and target strings.\n\n---\n\n### Usage\n\nTo effectively use this repository:\n\n1. **Clone the Repository:**\n ```sh\ngit clone https://github.com/abrehan2/Autocorrect-Nlp.git\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrehan2%2Fautocorrect-nlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabrehan2%2Fautocorrect-nlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrehan2%2Fautocorrect-nlp/lists"}