Design and Implementation of a multilingual social media sentiment analysis web application using Distil Bert and Django

Date
2026
Authors
Nabukenya, Faith
Journal Title
Journal ISSN
Volume Title
Publisher
Makerere University
Abstract
This dissertation details the design, development, and implementation of Sentiment Analysis Web Application, a multilingual social media sentiment analysis web application engineered to analyse public Twitter/X content. The rapid proliferation of social media usage across East Africa, combined with the linguistic diversity of online discourse in the region, presents a significant challenge for existing sentiment analysis tools that are predominantly Englishfocused and inaccessible to non-technical users. Leveraging the Django web framework and Python, Sentiment Analysis Web Application integrates DistilBERT, a distilled variant of the BERT transformer model, to classify tweetlevel text into three sentiment categories: Positive, Neutral, and Negative. The system implements a language detection pipeline using the langdetect library, routing English tweets to the distilbert-base-uncased-finetuned-sst-2-english model and non-English content to the nlptown/bert-base-multilingual-uncased-sentiment model. This multilingual architecture ensures reasonable coverage of major languages present in East African social media, including English, French, Swahili, German, Spanish, Italian, and Dutch. The application supports three tweet input modalities: automated scraping via a public Twitter handle using ntscraper, manual text pasting, and CSV file upload. Aggregated results are transformed into a Reputation Score (0-100) providing an intuitive single-metric summary of overall account sentiment. Validation was conducted on five real Twitter accounts (n=5, total 445 tweets) spanning English-dominant, French-dominant, and multilingual linguistic profiles. The DistilBERT SST-2 model achieved 89.2% accuracy on English content, while the nlptown multilingual model achieved 76.5% on French and 58.3% on Swahili content. All results are persisted in an SQLite3 relational database and rendered through a responsive Django template frontend accessible at http://127.0.0.1:8000/.
Description
A research dissertation submitted to the School of Statistics and Planning in partial fulfillment of the requirements for the award of a degree of Bachelor of Statistics, Makerere University
Keywords
Citation
Nabukenya, F. (2026). Design and Implementation of a multilingual social media sentiment analysis web application using Distil Bert and Django. Unpublished undergraduate dissertation. Makerere University, Kampala, Uganda.