Reputational risk in textual narratives is a vital aspect of understanding stakeholder perceptions of megaprojects; however, formal computational methods for measuring it remain underdeveloped. This study introduces a computational model for senti-ment-based reputational risk, defined as a feature-based supervised classification task. The proposed model combines sentiment polarity, polarity intensity, topic distribu-tions, content length, and structural textual features into a structured mathematical model, enabling systematic evaluation and reproducible predictions. Data were col-lected from online news and social media, then processed through cleaning, tokenisa-tion, lemmatisation, and sentiment annotation. An ensemble model, merging Random Forests, Gradient Boosting, Logistic Regression, and Support Vector Machines via soft voting, was trained and assessed using accuracy, precision, recall, F1-score, and Co-hen’s Kappa. Results suggest that reputational risk can be reliably inferred from the interaction between sentiment, topics, and textual structure. Analyses of feature im-portance highlight polarity intensity, risk scoring, content length, and topic distribu-tion as key predictors. These findings demonstrate the potential of formal computa-tional models to quantify and predict risk within textual data. Future research could expand this model with transformer models and multilingual datasets to improve context-aware insights, explainability, and scalability, thereby laying a foundation for generalised computational approaches to reputational risk modelling.