Abstract

Information from online platforms is vast, with health related data remaining largely unexplored for the purpose of developing a sentiment-based recommendation model. Though state-of-the-art models such as transformers are being researched in this domain, the model configuration has not been diligently investigated, particularly for deriving quality input for sentiment classification by inlaying contextual embeddings and significant sequence segments. A topic modeling and transformer-based model ( <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">topicT-AttNN</i> ) with LSTM and attention mechanism is proposed in this study for classifying sentiments from drug reviews on three aspects and overall opinion. The sentiment score thus obtained is used as a measure for identifying user-advocated drugs for a condition. The proposed model outperforms baselines for all the aspects with higher test accuracy and F1-scores, with the highest F1-score recorded as 0.9585. The results indicate the significance of LSTM and attention layers for identifying words in documents based on the dominance and the competence of the transformer unit in extracting specific context of words in reviews. With this work, we propose that the transformer architecture can be further enhanced with deep learning techniques by contriving potent layers to form the most optimal framework.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call