This paper introduces a hybrid deep neural network framework for sentiment analysis, which integrates the modified Dispersive Flies Optimization (DFO) algorithm with a Convolutional Neural Network (CNN) and Long Short Term Memory (LSTM). The DFO algorithm is adjusted to avoid local optima and enhance the optimization process. The framework uses a SentiWordNet lexicon-linked fitness function to extract sentiment information from text data, which is then pre-processed and embedded using a deep learning technique. The CNN and LSTM components work together to extract hierarchical representations and capture long-term dependencies, respectively. The hybrid model is evaluated on various datasets, including Amazon, ETSY, Big Basket, Facebook, Finance, Twitter, and Wine, achieving high accuracy rates ranging from 64.6% to 91.3%. The proposed framework demonstrates superior performance compared to existing methods, making it a promising approach for sentiment analysis tasks.This paper introduces a hybrid deep neural network framework for sentiment analysis, which integrates the modified Dispersive Flies Optimization (DFO) algorithm with a Convolutional Neural Network (CNN) and Long Short Term Memory (LSTM). The DFO algorithm is adjusted to avoid local optima and enhance the optimization process. The framework uses a SentiWordNet lexicon-linked fitness function to extract sentiment information from text data, which is then pre-processed and embedded using a deep learning technique. The CNN and LSTM components work together to extract hierarchical representations and capture long-term dependencies, respectively. The hybrid model is evaluated on various datasets, including Amazon, ETSY, Big Basket, Facebook, Finance, Twitter, and Wine, achieving high accuracy rates ranging from 64.6% to 91.3%. The proposed framework demonstrates superior performance compared to existing methods, making it a promising approach for sentiment analysis tasks.