Skip to content

Wrote a custom API to help determine if a word is spelled according to provided words. If not, the API should return some suggestions based on them.

Notifications You must be signed in to change notification settings

plasx/sanicspellchecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sanic SpellChecker

This is a spellchecker which compares to a preloaded list of word from a file into redis in Sanic which is checked by the application when a word is passed. Runs on port 31337. Return 404 if the word is not found. Return 200 if the word is found.

Setup

docker-compose -f docker-compose.yml build web -t web
docker-compose -f docker-compose.yml run --service-ports web
docker exec -it <xxxspellcheckerxxx_web_run_....> python loaddata.py 

Usage

curl -X GET "http://localhost:31337/spelling/<WORD>/" -H "accept: application/xml"

Unit Tests

After you build and run the application, to run unit tests, simply run:

docker exec -it <xxxspellcheckerxxx_web_run_....> python -m unittest tests.py` 

About

Wrote a custom API to help determine if a word is spelled according to provided words. If not, the API should return some suggestions based on them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published