{"id":13413552,"url":"https://github.com/jorelosorio/spellingcorrector","last_synced_at":"2026-04-29T01:02:52.111Z","repository":{"id":43012400,"uuid":"469819858","full_name":"jorelosorio/spellingcorrector","owner":"jorelosorio","description":"Spelling corrector for Spanish language ","archived":false,"fork":false,"pushed_at":"2022-03-23T10:33:20.000Z","size":398,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T08:52:47.964Z","etag":null,"topics":["containers","docker","go","http","spelling-correction"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jorelosorio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-14T16:38:32.000Z","updated_at":"2022-11-27T12:27:45.000Z","dependencies_parsed_at":"2022-08-27T12:40:57.736Z","dependency_job_id":null,"html_url":"https://github.com/jorelosorio/spellingcorrector","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jorelosorio/spellingcorrector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fspellingcorrector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fspellingcorrector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fspellingcorrector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fspellingcorrector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorelosorio","download_url":"https://codeload.github.com/jorelosorio/spellingcorrector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fspellingcorrector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: 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":["containers","docker","go","http","spelling-correction"],"created_at":"2024-07-30T20:01:43.018Z","updated_at":"2026-04-29T01:02:52.092Z","avatar_url":"https://github.com/jorelosorio.png","language":"Go","funding_links":[],"categories":["Microsoft Office","Natural Language Processing","Bot Building","自然语言处理"],"sub_categories":["Morphological Analyzers","形态分析"],"readme":"# Spelling Corrector\n\n[![Tests](https://github.com/jorelosorio/spellingcorrector/actions/workflows/tests.yml/badge.svg)](https://github.com/jorelosorio/spellingcorrector/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/jorelosorio/spellingcorrector/badge.svg?branch=main)](https://coveralls.io/github/jorelosorio/spellingcorrector?branch=main)\n[![Go Reference](https://pkg.go.dev/badge/github.com/jorelosorio/spellingcorrector.svg)](https://pkg.go.dev/github.com/jorelosorio/spellingcorrector)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jorelosorio/spellingcorrector)](https://goreportcard.com/report/github.com/jorelosorio/spellingcorrector)\n\nA spelling corrector for the Spanish language or create your own.\n\nThe solution for this project was based on the proposal made on the following website: http://norvig.com/spell-correct.html and some ideas from https://cxwangyi.wordpress.com/2012/02/15/peter-norvigs-spelling-corrector-in-go/ as well.\n\n\u003e The built-in data was trained using the `Spanish` language.\n\n## Try it\n\nUse it now with a Docker instance. It will open the `8080` port to access the service.\n\n    docker pull jorelosorio/spellingcorrector:latest\n\n    docker run --name spellingcorrector -d -p 8080:80 -t jorelosorio/spellingcorrector:latest\n\nTry it using the following example:\n\n    http://localhost:8080/spelling?word=espanol\n\n## Tools\n\n- GoLang `1.17.x`\n- Docker\n- Visual Studio Code `Optional!`\n    \u003e It requires a `Remote - Containers` extension. for more information please refers to: https://code.visualstudio.com/docs/remote/containers#_getting-started\n\n## Development\n\nThis project contains a `Dockerfile` file with all required dependencies to run it using `Visual Studio Code` + `Remote - Containers` extension.\nHowever, if you want to make it run locally in your development machine, please follow the instructions below.\n\n### Install Go\n\nInstall it from https://go.dev/dl/\n\n### Build the `Example/Service`\n\n\u003e Make sure the port `80` is currently free. **Optionally could be changed in the code!**\n\n    go build -o ./bin/ ./examples/service.go\n\nThen run the service\n\n    ./bin/service ./dictionaries/es.dic\n\n### Example of correction\n\nSimple usage example of the `Corrector` function.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\tsc \"github.com/jorelosorio/spellingcorrector\"\n)\n\nfunc main() {\n\tspelling, _ := sc.NewSpelling(\"{YOUR_PATH_TO_DICTIONARY}\")\n\tcorrectedWord := spelling.Correction(\"espanol\")\n\tfmt.Println(correctedWord)\n}\n```\n\n\u003e `NewSpelling` functions returns (`Spelling`, `error`), make sure to handle errors when creating a new object.\n\n### Training\n\nMost of the training was made using free versions of books in `Spanish`. However, if you like to train for a new language you can use the following functions\n\n```go\npackage main\n\nimport (\n    sc \"github.com/jorelosorio/spellingcorrector\"\n)\n\nfunc main() {\n    dic, _ := sc.NewDictionary(\"{YOUR_PATH_TO_DICTIONARY}\", sc.ESAlphabet) // Or ENAlphabet\n    dic.TrainFromTextFile(\"{YOUR_INPUT_TEXT}\")\n}\n```\n\n\u003e Call `TrainFromTextFile` function as many times you wish with different inputs.\n\n\u003e `NewDictionary` functions returns (`Dictionary`, `error`), make sure to handle errors when creating a new dictionary.\n\n### Build Docker\n\nTo build the docker image use `.dockers/Dockerfile.deploy` and the command\n\n    docker build -f Dockerfile.deploy -t jorelosorio/spellingcorrector:latest .\n\nTo run the docker image\n\n    docker run --name spellingcorrector -d -p 8080:80 -t jorelosorio/spellingcorrector:latest\n\nTest the `spelling corrector` from the docker image\n\n    http://localhost:8080/spelling?word=espanol\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorelosorio%2Fspellingcorrector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorelosorio%2Fspellingcorrector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorelosorio%2Fspellingcorrector/lists"}