PurposeThe purpose of this research study is to improve sentiment analysis (SA) at the aspect level, which is accomplished through two independent goals of aspect term and opinion extraction and subsequent sentiment classification.Design/methodology/approachThe proposed architecture uses neighborhood and dependency tree-based relations for target opinion extraction, a domain–ontology-based knowledge management system for aspect term extraction, and deep learning techniques for classification.FindingsThe authors use different deep learning architectures to test the proposed approach of both review and aspect levels. It is reported that Vanilla recurrent neural network has an accuracy of 83.22%, long short-term memory (LSTM) is 89.87% accurate, Bi-LSTM is 91.57% accurate, gated recurrent unit is 65.57% accurate and convolutional neural network is 82.33% accurate. For the aspect level analysis, ρaspect comes out to be 0.712 and Δ2aspect is 0.384, indicating a marked improvement over previously reported results.Originality/valueThis study suggests a novel method for aspect-based SA that makes use of deep learning and domain ontologies. The use of domain ontologies allows for enhanced aspect identification, and the use of deep learning algorithms enhances the accuracy of the SA task.