As human beings, it is simple for us to understand text messages that contain spelling mistakes. But do you know that sometimes Ebbot can comprehend messages if there are too many misplayled words? Understanding that typos can be one of the reasons why Ebbot cannot give the right response, our NLP team at Hello Ebbot decided to develop a new feature to autocorrect spelling mistakes, specifically for the Swedish language! Our spellcheck corrector not only considers context to provide better correction, but also has fixed performance. In this blog post, we will tell you our little secret to achieve this result 🤖
Introducing Jamspell - a spellcheck library
Furthermore, it is very simple to train a custom model to support the language of your choice. In order to customize Jamspell to a new language, you will need two utf-8 files, one is the alphabet.txt which contains the language's alphabet, and the other one is a corpus of sentences to be trained. Because the purpose of the training process is to "teach" the model how to spell words correctly, it is recommended to use a corpus with minimal spelling mistakes. In our case, we chose OpenSubtitles as our training corpus, but there are other options to choose from as well, such as Wikipedia or literature documents. Detailed steps to accomplish this can be found on Jamspell's Github.
How Jamspell performs spellchecking in Swedish language
In order to integrate this easily into our applications, our NLP team decided to wrap the model into an API using FastAPI. For security purposes, we unfortunately cannot share the access to the API publicly. But here are some extremely challenging examples which our model successfully corrected, that we would like to show you 👇
- Jdg springwr mwd my dog every day
- Vusstw du toll example that there are also 5,000 somethingurrrservat in Svetihe?
- Jqg her still intw gets my ordwr
- I run with my dog every day
- For example, did you know that there are over 5,000 nature reserves in Sweden?
- I still haven't received my order.
Curious about Ebbot?
If you want to know more about how Ebbot – a helpful digital employee – can assist you, let's meet and talk about it! All you need to do is clicking on the button below 👇