NALABS: NAtural LAnguage Bad Smells detector
Reference
NALABS: Detecting Bad Smells in Natural Language Requirements and Test Specifications, Kostadin Rajkovic, Eduard Paul Enoiu Report - MRTC, Mälardalen Real-Time Research Centre, Mälardalen University ISRN: MDH-MRTC-340/2022-1-SE
[ArXiv] (https://arxiv.org/abs/2202.05641)
NALABSpy: Natural Language Analysis of Bad Smells in Software Requirements
NALABS is a Python script designed to analyze software requirements and identify potential bad smells that may indicate issues in the requirement's quality or clarity. The script reads requirements from an Excel file, processes them using various linguistic techniques, and outputs an Excel file containing the detected bad smells for each requirement.
You can find it in the NALABSpy directory.
NALABSpy: Features
NALABS performs the following analysis on each requirement:
- Detects ambiguous words
- Measures readability using the Flesch Reading Ease score
- Calculates subjectivity to identify potential weaknesses in the requirement
- Ensures that the requirement contains specific keywords
- Checks if the requirement is security-related
NALABSpy: Dependencies
- pandas
- openpyxl
- spacy
- textstat
- textblob
Install the dependencies using the following command:
pip3 install pandas openpyxl spacy textstat textblob
NALABSpy: Usage
Run the script using the following command:
python3 NALABS.py <input_file> <id_column> <text_column> <output_file>
NALABSpy: GUI
To run NALABSpy through a GUI, the following command should be run to install the web frontend:
pip install streamlit st-annotated-text
Once the packages have been installed, the web server can be started using
streamlit run web_gui.py
Summary of Measures Used in NALABS C# version
- Number of words (NW)
- Number of vague phrases (NV)
- Number of conjunctions (NC)
- Number of reference documents (NRD1 and NRD2)
- Optionality (OP)
- Subjectivity (NS)
- Weakness (WK)
- Automated Readability Index
- Imperatives (NI1 and NI2)
- Continuances (CT) and others...
NALABS C# version - Documentation, Download and Install -
More details about NALABS can be found in http://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1332337&dswid=9711
NALABS is composed of two main components: the GUI as the main program executable and the metrics used as proxy for bad smells.
The latest release of the NALABS executable can be downloaded from GitHub on the releases page. Alternatively, it can be built from source code. You can use different methods to build an application: the Visual Studio IDE and the MSBuild command-line tools.
Add the package Microsoft.Office.Interop.Excel using the NuGet Package Manager.
NALABS C# version - Using NALABS
First change some settings. Choose Edit/Settings menu tab. In the Excel view you should choose the REQ ID and Text column in the requirement excel document.
To open a requirement excel file choose the File/Open menu tab
Known bug: When opening a new excel document, please remove the Settings.xml in the Settings folder located in the same place as the executable. This needs to be done since the program might crash.
Funding
NALABS has been funded by the European Union’s Horizon 2020 research and innovation program under grant agreement No. 957212 and by the Swedish Innovation Agency (Vinnova) through the SmartDelta project.
License
NALABS's source code is released under the MIT license