How do I go for NLP based on phrases instead of sentences?

I have a list of words in this format:

chem, chemistry
chemi, chemistry
chm, chemistry
chmstry, chemistry

Here, the first column represents the actual word which is in the second column. I need to apply NLP (in python3) so that when the model is trained using this dataset and I give 'chmty' as input, it will give 'chemistry' as output. I don't want string similarity techniques, I want to build an NLP model.

Topic machine-learning-model stanford-nlp nlp python machine-learning

Category Data Science


In NLP parlance what you ask for can be framed as a case of Lemmatisation

There are NLP tools like spaCy for Python which support such tasks.

Beware that a very simple NLP algorithm for Lemmatisation which can be applied directly to your case is Dictionary Lookup (which is equivalent to a trivial rule-based system). Yes this is an NLP algorithm.


1- use LSTM with character n-gram x = chem, chemi, chmstry y = chemistry

  1. use fuzzy match with ratio to match the word with base word.

3- use regex, matach the list and get the result

About

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