【目的/意义】为了明晰科学实体在学术文本中承担的语义角色,进而建立特定领域的术语的知识结构,本文提出一种以科学实体词间关系为特征工程的术语分类方法,从学术研究的语义属性角度,将学术文本中出现的科学实体分为“研究领域”“研...【目的/意义】为了明晰科学实体在学术文本中承担的语义角色,进而建立特定领域的术语的知识结构,本文提出一种以科学实体词间关系为特征工程的术语分类方法,从学术研究的语义属性角度,将学术文本中出现的科学实体分为“研究领域”“研究问题”“研究方法”“研究工具”“其他”五类。【方法/过程】采用依存句法分析的方法,对于学术文本中存在两个及两个以上科学实体的句子,挖掘它们之间的最短依存路径,将最短依存路径上的谓词成分作为实体之间的关系进行提取,构造2D矩阵作为卷积神经网络的输入,完成实体的分类研究。【结果/结论】该模型在Web of Science上获取的“人工智能”领域的学术文献进行验证,精确率为89.38%,召回率为92.46%,F1值为0.9089。【创新/局限】由科学实体关系构成的矩阵是稀疏矩阵,在计算过程中会对计算速度产生不利影响;在关系抽取的环节比较依赖依存句法分析分析工具的处理效果。展开更多
Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional s...Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.展开更多
文摘【目的/意义】为了明晰科学实体在学术文本中承担的语义角色,进而建立特定领域的术语的知识结构,本文提出一种以科学实体词间关系为特征工程的术语分类方法,从学术研究的语义属性角度,将学术文本中出现的科学实体分为“研究领域”“研究问题”“研究方法”“研究工具”“其他”五类。【方法/过程】采用依存句法分析的方法,对于学术文本中存在两个及两个以上科学实体的句子,挖掘它们之间的最短依存路径,将最短依存路径上的谓词成分作为实体之间的关系进行提取,构造2D矩阵作为卷积神经网络的输入,完成实体的分类研究。【结果/结论】该模型在Web of Science上获取的“人工智能”领域的学术文献进行验证,精确率为89.38%,召回率为92.46%,F1值为0.9089。【创新/局限】由科学实体关系构成的矩阵是稀疏矩阵,在计算过程中会对计算速度产生不利影响;在关系抽取的环节比较依赖依存句法分析分析工具的处理效果。
文摘Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.