Explainable Natural Language to Bash Translation using Abstract Syntax Tree

Shikhar Bharadwaj, Shirish Shevade


Abstract
Natural language processing for program synthesis has been widely researched. In this work, we focus on generating Bash commands from natural language invocations with explanations. We propose a novel transformer based solution by utilizing Bash Abstract Syntax Trees and manual pages. Our method incorporates tree structure information in the transformer architecture and provides explanations for its predictions via alignment matrices between user invocation and manual page text. Our method performs on par with the state of the art performance on Natural Language Context to Command task and performs better than fine-tuned T5 and Seq2Seq models.
Anthology ID:
2021.conll-1.20
Volume:
Proceedings of the 25th Conference on Computational Natural Language Learning
Month:
November
Year:
2021
Address:
Online
Editors:
Arianna Bisazza, Omri Abend
Venue:
CoNLL
SIG:
SIGNLL
Publisher:
Association for Computational Linguistics
Note:
Pages:
258–267
Language:
URL:
https://aclanthology.org/2021.conll-1.20
DOI:
10.18653/v1/2021.conll-1.20
Bibkey:
Cite (ACL):
Shikhar Bharadwaj and Shirish Shevade. 2021. Explainable Natural Language to Bash Translation using Abstract Syntax Tree. In Proceedings of the 25th Conference on Computational Natural Language Learning, pages 258–267, Online. Association for Computational Linguistics.
Cite (Informal):
Explainable Natural Language to Bash Translation using Abstract Syntax Tree (Bharadwaj & Shevade, CoNLL 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.conll-1.20.pdf
Video:
 https://aclanthology.org/2021.conll-1.20.mp4
Code
 shikhar-s/explainable-nl-to-bash-ast
Data
NLC2CMD