{'fraction_non_alphanumeric': 0.018263377122717077, 'fraction_numerical': 0.0, 'mean_word_length': 5.6995708154506435, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Natural Language Processing for Autonomous Identification of Impactful Changes to Specification Documents

Functional specification documents describe system requirements and component functionality. In avionics this would include Interface Control Documents (ICD) or Interface Design Descriptions (IDD). New and modified requirements drive changes to specifications, resulting in updates to the interface designs. When interface designs are updated, engineers and software developers are required to manually compare the previous and new versions of the documentation to determine the changes. This is a tedious and error-prone process. Natural Language Processing (NLP) can be leveraged to automatically determine and report the changes between two versions of a hardware or software interface specification. To this end, our work demonstrates a novel use of NLP, a branch of artificial intelligence aiding computers in understanding human (natural) languages, to autonomously identify and classify changes in a specification document. Using the identified specification changes, the corresponding source code was tagged with required changes (updates, additions, and deletions), with the goal of automatically modifying the source code based on changes made to the specification. Two versions of an existing specification within the ground vehicle community written in Markdown were parsed into abstract syntax trees (AST) before being saved into OrientDB graph databases, herein described as the specification databases. The source code to be updated was the Extensible Markup Language (XML) schema documents for a ground vehicle data network specification. The source code, too, was parsed into an OrientDB graph database, herein described as the code database. For each node in the specification databases, a direct comparison of text was performed, and a variety of NLP techniques were applied primarily using spaCy, a Python library with previously trained models and word vectors. The parent relationships of the most similar nodes were verified, and a numerical threshold was used to determine the state of the “change” and subsequent update, addition, or deletion to the code database. We provide an example use case for the application of NLP against different versions of specifications using a software architecture paradigm where the code is closely modelled with the corresponding documentation. Pre-written code templates are used for reoccurring patterns in the documentation. While it does require initial development of the templates and the structure of the code, we believe this approach to updating a carefully crafted code base based on NLP-identified specification updates will have more achievable results in the realm of autonomous code generation than other approaches to code generation. Our approach carries potential of supplying a more intelligent and automated solution to generate sophisticated and accurate specification documentation for the fast-paced avionics industry while ensuring relevant protocols and changes in individual component requirements from varying suppliers are met.