A Machine Learning Approach to predict the Next Word in a Statement

Vishal Rathee, Sakshi Yede · 2023

Next-Word Prediction (NWP), an application of machine learning also known as language modeling, is one the area of natural language processing that could forecast the next word in a sentence. Employing recurrent neural network models some researchers have previously implemented this NWP. In this work, two approaches using long-term memory (LSTM) model and Bidirectional LSTM were tested, running for 50 epochs and their accuracy and loss were compared. Web scraping technique was used for acquiring the data through various channels. Libraries like tensor flow, keras, NumPy and matplotlib were imbibed in the code to obtain the results. Tensor flow was used to download the model in json format and then Google Colab was employed to code the tool. Medium-articles-dataset was used here which after preprocessing, was trained using LSTM (Long short-term memory) and BiLSTM models which were then used to predict the word that comes next in a statement.

Read the paper · More papers on PaperTik