SeedVault / rhizome

conversational bot engine created by Botanic/SEED team
https://seedtoken.io
Other
7 stars 2 forks source link

Add spell checking #12

Open nicolasbotanic opened 6 years ago

nicolasbotanic commented 6 years ago

This process should be binded to .Flow v2 instruction $spellcheck inside /engine/dotflow2/extensions/preprocess.py file

It will expect one mandatory argument with a string with the text to be spell-checked and an optional second argument with a list of expected words to narrow the spell correction.

Expected response:

$ BBOT_ENV=development python -m channels.console.app joe testbot 1 nodebug

You: :df2 spellcheck("I'm asd")
Testbot: I'm sad

You :df2 spellcheck("I'm asd", ["asd", "etc"])
Testbot: I'm asd

Note in the second example "asd" was not corrected to "sad" because "asd" is an expected string