Contextual Spell Correction

I want to create a spell checker that corrects the spelling mistakes contextually.

For example,

Erroneous sentence: I want to apply for credit cart

Corrected sentence: I want to apply for credit card

Here, the respective spellings of cart and card are correct but the cart is contextually incorrect.

So what methods we can apply for contextual errors like this?

Topic rnn neural-network machine-learning

Category Data Science


Here's an approach which we can try and probably work for less complex problems.

A large corpus of data: We will require a very large corpus of textual data. It should contain as much as words possible. Natural language phrases and collocations are also required.

Now, we encode all the sentences in the corpus using Word2Vec.

After that, we will train a text generation model which given a word predicts the next word.

If we take in consideration the above example, the word "card" is colloquial with the word "credit". This relation will be learnt my the model.

The model will behave like, Which is the most frequent word after "credit"? It isn't "cart".

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.