V2EX  ›  英汉词典

Lexical Analysis

定义 Definition

Lexical analysis(词法分析)是计算机科学和语言学中的一个术语,指将输入的字符序列转换为有意义的词素(token)的过程。在编译原理中,词法分析是编译器的第一个阶段,负责识别源代码中的关键字、标识符、运算符等基本单元。在语言学中,它指对词汇层面的系统分析。

发音 Pronunciation

/ˈlɛksɪkəl əˈnælɪsɪs/

例句 Examples

The compiler performs lexical analysis before parsing the source code.
编译器在解析源代码之前会先执行词法分析。

In natural language processing, lexical analysis helps identify the morphological structure of words, enabling more accurate tokenization and part-of-speech tagging.
在自然语言处理中,词法分析有助于识别单词的形态结构,从而实现更准确的分词和词性标注。

词源 Etymology

Lexical 源自希腊语 lexikos,意为"与词语有关的",其词根 lexis 意为"词、言语"。Analysis 同样来自希腊语 analyein,由 **ana-**(向上、分开)和 lyein(松开、解开)组成,原意是"将事物拆解开来加以研究"。两词合在一起,字面意思即为"对词汇的拆解研究"。该术语在20世纪中期随着编译器技术的发展而被广泛使用。

相关词汇 Related Words

文学与学术引用 Literary References

  • 《编译原理》(Compilers: Principles, Techniques, and Tools,Alfred Aho 等著,又称"龙书")中对词法分析阶段有详尽的经典论述。
  • Structure and Interpretation of Computer Programs(Harold Abelson & Gerald Jay Sussman 著)中涉及语言解释器构建时讨论了词法分析的相关概念。
  • Speech and Language Processing(Daniel Jurafsky & James H. Martin 著)从自然语言处理的角度对词法分析进行了系统阐述。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5160 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 8ms · UTC 05:42 · PVG 13:42 · LAX 22:42 · JFK 01:42
♥ Do have faith in what you're doing.