A Natural Language Processing (NLP) Model for Metaphor Detection and Interpretation: A Case Study of Use of English Passages in UTME

Authors

  • E. A. Oladejo Department of Computer Science and Artificial Intelligence, University of Ibadan, Ibadan, Oyo
  • O. A. Aboderin Department of Computer Science and Artificial Intelligence, University of Ibadan, Ibadan, Oyo
  • K. S. Amire Department of Computer Science and Artificial Intelligence, University of Ibadan, Ibadan, Oyo
  • B. F. Oladejo Department of Computer Science and Artificial Intelligence, University of Ibadan, Ibadan, Oyo

Keywords:

Metaphors, Natural Language Processing, RoBERTa model, Transformer-based model, Contextual embeddings, Word sense disambiguation

Abstract

Metaphors play a fundamental role in language comprehension. They convey abstract concepts through vivid imagery and analogy, and can help students to understand written texts. In Natural Language Processing (NLP), the accurate detection and interpretation of metaphors pose significant challenges because of their complexity and contextual variability. This study developed an NLP model for metaphor detection and interpretation, using sentences from the ‘Use of English’ passages in Unified Tertiary Matriculation Examination (UTME) past questions as a case study. The approach involved training a transformer-based RoBERTa model on the Vrije Universiteit Amsterdam metaphor corpus (VUA-20), and fine-tuning it on a dataset built from UTME comprehension passages. Contextual embeddings and Word Sense Disambiguation (WSD) were used to interpret metaphorical meanings. The results showed promising performance in metaphor detection, with precision, recall, F1 score and accuracy values that indicated the effectiveness of the model on both datasets. The interpretation step also produced literal meanings for detected metaphors, which can aid language comprehension in an educational context. The study confirmed that transformer-based NLP models can be adapted to specific domains for metaphor detection and analysis.

Downloads

Published

2026-06-13