A Rule-Based Approach for Automatic Generation of Class Diagram from Functional Requirements Using Natural Language Processing and Machine Learning

Authors

  • Muhammad Ramzan Department of Software Engineering, University of Sargodha, Sargodha, Pakistan.
  • Ghunwa Saeed Sadiqi Department of Computer Science and Information Technology, Virtual University of Pakistan.
  • Muhammad Salman Bashir Department of Computer Science and Information Technology, Virtual University of Pakistan.
  • Summair Raza Department of Software Engineering, University of Sargodha, Sargodha, Pakistan.
  • Asma Batool Department of Computer Science and Information Technology, Virtual University of Pakistan.

Keywords:

UML Class Diagram, Machine Learning, Dataset, Class Relationships, Aggregation, Association, Composition, Inheritance

Abstract

Requirement analysis is the initial and most crucial phase of the software development life cycle (SDLC). In this phase, the requirements after gathering from the user and different stakeholders are evaluated and abstraction is created in terms of a model. The generation of UML class diagrams from requirements is a very time-consuming task and hence demands the automation of the process. The researchers have proposed a number of tools and methods for the transformation of natural language requirements to UML class diagrams in the last few years. Different approaches like Natural Language Processing (NLP) and Rule based approaches were used for this purpose, but they have certain limitations. Moreover, these approaches do not extract all the relationship types of class diagrams. To resolve this issue machine learning based approaches have been used for a few years. Machine learning requires large and precise datasets to train models. In this research, a new model is proposed to generate class diagrams from requirements written in natural language more accurately using Natural Language Processing as well as the machine learning approach. NLP has helped to extract the classes, attributes, and methods while machine learning is used to extract the class relationships. To implement machine learning models we have created a dataset containing class names and relationship types i.e. aggregation, association, composition, and inheritance. The effectiveness of models is analyzed by comparing the results using accuracy metrics.

 

Downloads

Published

2024-09-01

How to Cite

Muhammad Ramzan, Ghunwa Saeed Sadiqi, Muhammad Salman Bashir, Summair Raza, & Asma Batool. (2024). A Rule-Based Approach for Automatic Generation of Class Diagram from Functional Requirements Using Natural Language Processing and Machine Learning. Journal of Computing & Biomedical Informatics, 7(02). Retrieved from https://jcbi.org/index.php/Main/article/view/546