The goal of Sentiment Analysis (SA), especially in social media, is to identify useful information in large amounts of unstructured data from many different sources. Text mining involves extracting revision texts and categorizing them by positive and negative attitudes. However, the value of the extracted features also lies in those that contribute most to the classification process. That's where dimensional reduction comes into play to remove noise and reduce the high area of the feature while maintaining the required accuracy. As part of this work, we propose a new approach for extracting words from a specific text and then classifying them. Thanks to a phase of pre-processing and extraction of words depending on the frequency. For this purpose, we considered a test group database of 50,000 film reviews, of which 25,000 were rated positive and 25,000 negatives. We have selected 4,000 words that have an impact on the feelings of the documents, To predict the rating which is based on a textual customer review. We evaluated the algorithms we proposed, as part of this approach, and compared the effectiveness of the following machine learning techniques as classifiers for SA: extreme gradient boosting (XGBoost), artificial neurons (ANN), and stochastic gradient descent (SGD). with a vectorial construction by applying the techniques of ”Term Frequency” (TF) and that of the ”Term frequency-Inverse Document Frequency” (TF-IDF). We noticed that our approach based on the SGD algorithm recorded the best performance. Indeed, we recorded an accuracy of 88.093\%, a precision of 89\%, a recall of 86\%, and an F1-score of 88\%.
\textbf{Keywords :} Sentiment analysis; Opinion mining; movie review; classification; Machine learning; XGBoost; Artificial neural network; stochastic gradient descent.