paperbot · PL 论文追踪

全部论文 待读 收藏

P2 POSIT

POSIT
ICSE Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering2020匹配度 2/10 · 该论文用 biLSTM-CRF 对混合代码与自然语言文本做语言识别及 AST/词性标注,属于机器学习用于代码文本处理,但未涉及用户核心关注的静态分析、Agentic/LLM 程序、浮点程序分析或贝叶斯程序分析。其技术栈也偏旧,未建立在当前较强 LLM/Agent 之上。引用 9 inbox
Profir-Petru Pârtachi, Santanu Kumar Dash, Christoph Treude, Earl T. Barr
crossref: 2026-09-12

AI 速览

一句话:提出 POSIT,用 biLSTM-CRF 对混合代码与自然语言文本联合进行语言识别及 AST/词性标注。

开发者交流常混合源代码和自然语言,如 Stack Overflow 与开发者邮件列表;对这类混合文本打标签是可追踪性和精确抽取代码片段以实现复用的关键。本文借鉴自然语言处理中的 code-switching 技术,提出 POSIT:训练带条件随机场(CRF)输出层的 biLSTM,利用 CLANG 编译器产生的抽象语法树(AST)标签和 Stanford 词性标注器的 POS 标签,同时预测混合文本中 token 的源语言、源代码 token 的 AST 标签以及自然语言词的 POS 标签。评估显示,POSIT 将语言识别准确率较当时最优提升 10.6%,将 PoS/AST 标注准确率提升 23.7%。

问题
如何对源代码与自然语言混合文本中的 token 进行语言识别以及 POS/AST 联合标注,以支持可追踪性和代码片段复用。
方法
借鉴 NLP 的 code-switching 技术,用 CLANG AST 标签和 Stanford POS 标签训练 biLSTM-CRF 模型,同时输出语言、POS 和 AST 标签。
评估
在混合文本上评估语言识别与 PoS/AST 标注准确率,并与 state-of-the-art 比较,分别提升 10.6% 和 23.7%。
原文摘要(Abstract)

Software developers use a mix of source code and natural language text to communicate with each other: Stack Overflow and Developer mailing lists abound with this mixed text. Tagging this mixed text is essential for making progress on two seminal software engineering problems --- traceability, and reuse via precise extraction of code snippets from mixed text. In this paper, we borrow code-switching techniques from Natural Language Processing and adapt them to apply to mixed text to solve two problems: language identification and token tagging. Our technique, POSIT, simultaneously provides abstract syntax tree tags for source code tokens, part-of-speech tags for natural language words, and predicts the source language of a token in mixed text. To realize POSIT, we trained a biLSTM network with a Conditional Random Field output layer using abstract syntax tree tags from the CLANG compiler and part-of-speech tags from the Standard Stanford part-of-speech tagger. POSIT improves the state-of-the-art on language identification by 10.6% and PoS/AST tagging by 23.7% in accuracy.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5624,
  title = {POSIT},
  author = {Profir-Petru Pârtachi and Santanu Kumar Dash and Christoph Treude and Earl T. Barr},
  booktitle = {ICSE},
  year = {2020},
  doi = {10.1145/3377811.3380440}
}