arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.14609cs.SEcs.IR
收藏

Nirjas:一个用于从源代码中提取元数据的开源框架

Nirjas: An open source framework for extracting metadata from the source code

Ayush Bhardwaj, Sahil, Kaushlendra Pratap, Gaurav Mishra

AI总结:

本文提出了基于Python的开源框架Nirjas,利用Regex准确提取并结构化分离源代码中的元数据与各类注释,解决边缘情况噪声问题。

摘要:

元数据和注释是任何软件开发过程中的关键元素。在本文中,我们解释了源代码中的元数据和注释如何在理解软件方面发挥重要作用。我们引入了一个基于 Python 的开源框架 Nirjas,它有助于以结构化的方式提取这些元数据。对于不同编程语言的源文件中的注释,存在各种语法、类型和广泛接受的约定。边缘情况可能会在提取过程中产生噪声,为此我们使用 Regex 来准确地检索元数据。非 Regex 方法可以给出结果,但通常会缺乏准确性和噪声分离能力。Nirjas 还能分离不同类型的注释和源代码,并提供有关这些注释的详细信息,例如行号、文件名、使用的语言、总 SLOC 等。Nirjas 是一个独立的 Python 框架/库,可以通过源代码或 pip(Python 包安装程序)轻松安装。Nirjas 最初作为 Google Summer of Code 项目的一部分创建,目前在 FOSSology 组织下进行开发和维护。

英文摘要:

Metadata and comments are critical elements of any software development process. In this paper, we explain how metadata and comments in source code can play an essential role in comprehending software. We introduce a Python-based open-source framework, Nirjas, which helps in extracting this metadata in a structured manner. Various syntaxes, types, and widely accepted conventions exist for adding comments in source files of different programming languages. Edge cases can create noise in extraction, for which we use Regex to accurately retrieve metadata. Non-Regex methods can give results but often miss accuracy and noise separation. Nirjas also separates different types of comments, source code, and provides details about those comments, such as line number, file name, language used, total SLOC, etc. Nirjas is a standalone Python framework/library and can be easily installed via source or pip (the Python package installer). Nirjas was initially created as part of a Google Summer of Code project and is currently developed and maintained under the FOSSology organization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑