The next word prediction model is constructed using a hybrid approach that combines Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) layers within a sequential neural network architecture. The model is trained on text data represented as word sequences, utilizing the TensorFlow library. During the training process, input text is tokenized, n-gram sequences are generated, and sequences are padded to maintain a consistent length. The model is built using the categorical cross-entropy loss function and the Adam optimizer. It includes an embedding layer that transforms words into dense vectors, followed by LSTM and GRU layers to capture sequential relationships in the input data. The final dense layer uses softmax activation to generate a probability distribution across the vocabulary. This hybrid approach achieved enhanced performance, with an accuracy of 97.3%.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

WordAhead: Next Word Prediction Engine

  • Vishal S. Meharwade,
  • Vittal Katwe,
  • Vineet Paithankar,
  • Naveen Pawar,
  • Priyadarshini Patil

摘要

The next word prediction model is constructed using a hybrid approach that combines Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) layers within a sequential neural network architecture. The model is trained on text data represented as word sequences, utilizing the TensorFlow library. During the training process, input text is tokenized, n-gram sequences are generated, and sequences are padded to maintain a consistent length. The model is built using the categorical cross-entropy loss function and the Adam optimizer. It includes an embedding layer that transforms words into dense vectors, followed by LSTM and GRU layers to capture sequential relationships in the input data. The final dense layer uses softmax activation to generate a probability distribution across the vocabulary. This hybrid approach achieved enhanced performance, with an accuracy of 97.3%.