Extracting Synonyms (Similar Words) From Text Using BERT & NMSLIB 🔥

An approach to extracting words that are similar/synonyms from within multiple rows of text using BERT & NMSLIB.

Karan Kaul | カラン
Towards AI
Published in
5 min readOct 18, 2022

--

Extracting synonyms from text using bert and nmslib in python
Illustration by Kamil Sypień

We will begin by tokenizing the text into words as we want single-word outputs. Then, we will use BERT (sentence transformers) to embed the most common words, and…

--

--

✨ Machine Learning Consultant. Writes about Programming/Machine Learning! Instagram? @_krnk97