下面介绍很多重要的与语言识别相关的术语。

语言(Language)

  • A language is a set of valid sentences

    一门语言是一个有效语句的集合。

  • Sentences are composed of phrases, which are composed of subphrases, and so on

    语句由词组组成,词组由子词组组成,子词组又由更小的子词组组成,依此类推。

语法(Grammar)

  • A grammar formally defines the syntax rules of a language

    语法定义了语言的语义规则。

  • Each rule in a grammar expresses the structure of a subphrase

    语法中的每条规则定义了一种词组结构。

语义树或语法分析树(Syntax tree/parse tree)

  • This represents the structure of the sentence where each subtree root gives an abstract name to the elements beneath it.

    代表了语句的结构,其中每个子树的根节点都使用一个抽象的名字给其包含的元素命名。

  • The subtree roots correspond to grammar rule names.

    子树的根节点对应了语法规则的名字。

  • The leaves of the tree are symbols or tokenss of the sentence.

    树的叶子节点是语句中的符号或者词汇。

词法符号(Token)

  • A token is a vocabulary symbol in a language;

    词法符号就是一门语言的基本词汇符号

  • these can represent a category of symbols such as "identifier" or can represent s single operator or keyword.

    它们可以代表像是“标识符”这样的一类符号,也可以代表一个单一的运算符,或者代表一个关键字。

词法分析器或者分词器(Lexer or tokenizer)

  • This breaks up an input character stream into tokens;

    分词器将输入的字符序列分解成一系列词汇。

  • A lexer performs lexical analysis.

    词法分析器执行词法分析。

语法分析器(Parser)

  • A parser checks sentences for membership in a specific language by checking the sentence's structure against the rules of a grammar.

    语法分析器通过检查语句的结构是否符合语法规则的定义来验证该语句在特定语言中是否合法。

  • ANTLR generates top-down parsers called ALL(*) that can use all remaining input symbols to make decisions.

    ANTLR能够生成被称为ALL(*)的自顶向下的语法分析器,ALL(*)是指它可以利用剩余的所有输入文本来进行决策。

  • Top-down parser are goal-oriented and start matching at the rule associated with the coarsest, such as program or inputFile.

    自顶向下的语法分析器以结果为导向,首先匹配最粗粒度的规则,这样的规则通常命名为program或者inputFile

递归下降的语法分析器(Recursive-descent parser)

  • This is a specific kind of top-down parser implemented with a function for each rule in the grammar.

    这是自顶向下的语法分析器的一种实现,每条规则都对应语法分析器中的一个函数。

前向预测(Lookahead)

  • Parsers use lookahead to make decisions by comparing the symbols that begin each alternatives.

    语法分析器使用前向预测来进行决策,具体方法是将输入的符号与每个备选分支的起始符号进行比较。

ANTLR 相关术语的更多相关文章

  1. NUI相关术语

    分享一下微软资深企业架构师.应用开发专家余涛先生书中所谈到的相关术语,以便查阅,部分术语根据个人理解加入了细化内容: 1.波束形成算法(BeamformingAlgorithm) 基于现行阵列的阵列信 ...

  2. 3.数据库操作相关术语,Oracle认证,insert into,批量插入,update tablename set,delete和truncate的差别,sql文件导入

     1相关术语 语句 含义 操作 DML语句 (Data Manipulation Language) 数据库操作语言 insert update delete select DDL语言 (Date ...

  3. 前端入门7-JavaScript语法之相关术语

    声明 本系列文章内容全部梳理自以下几个来源: <JavaScript权威指南> MDN web docs Github:smyhvae/web Github:goddyZhao/Trans ...

  4. Spring的AOP开发的相关术语

    转载自 https://www.cnblogs.com/ltfxy/p/9873618.html SpringAOP简介: AOP思想最早是由AOP联盟组织提出的.Spring使用这种思想最好的框架. ...

  5. IdentityServer4 中文文档 -2- (简介)相关术语

    IdentityServer4 中文文档 -2- (简介)相关术语 原文:http://docs.identityserver.io/en/release/intro/terminology.html ...

  6. Spring框架学习05——AOP相关术语详解

    1.Spring AOP 的基本概述 AOP(Aspect Oriented Programing)面向切面编程,AOP采取横向抽取机制,取代了传统纵向继承体系重复性代码(性能监视.事务管理.安全检查 ...

  7. Spring AOP相关术语

    ---------------------siwuxie095                                 Spring AOP 相关术语         (1)Joinpoint ...

  8. Java 并发,相关术语

    Java 并发,相关术语: 术语 作用 synchronize 可修饰方法.代码块.类:介绍:https://www.cnblogs.com/zyxiaohuihui/p/9096882.html L ...

  9. 【AOP】操作相关术语---【Spring】的【AOP】操作(基于aspectj的xml方式)

    [AOP]操作相关术语 Joinpoint(连接点):类里面哪些方法可以被增强,这些方法称为连接点. Pointcut(切入点):在类里面可以有很多的方法被增强,比如实际操作中,只是增强了类里面add ...

随机推荐

  1. 在Vs code中使用sftp插件以及连接windows远程sftp协议部署指导(解决vscode的sftp插件中文目录乱码问题)

    一.启动SFtp 二.上手vs code SFTP插件 2.1 初始配置 2.2解决乱码问题 三.SFTP配置 3.1常用配置 3.2示例配置 四.SFTP使用 五.扩展阅读 一.启动SFtp 话说小 ...

  2. Nginx通过ngx_http_limit_req_module实现限制请求数、限速、白名单

    /etc/nginx/limit/white_list:白名单,key-value形式,支持掩码网段 #test 192.168.50.42 0; 192.168.50.0/24 0; /etc/ng ...

  3. 使用 docker + verdaccio 搭建npm私有仓库

    本文介绍如何使用 verdaccio 搭建私有npm仓库,以及使用 docker 时如何映射到本地目录,方便简单对仓库进行各种操作.系统环境是 Linux. verdaccio verdaccio 是 ...

  4. 0-pyqt介绍

    1.QT 的特点 2.QT的历史 3.搭建pyQT的开发环境 python  pyqt包  pycharm 4.搭建pyQT第一个应用 必须使用两个类:QApplication和QWidget.都在P ...

  5. Git操作: git commit代码后,如何撤回且保留commit的代码

    git commit代码后,但是没有push之前,如果发现提交的代码有一个部分是有问题的,或者commit message写的太随便了想改一下,以下命令会帮到你 git reset HEAD^ 敲击该 ...

  6. P7416 [USACO21FEB] No Time to Dry P

    题目传送门 题意简述:给出颜色序列 \(a\),多次询问给出 \(l,r\),求涂成 \(a_l,a_{l+1},\cdots,a_r\) 的最小操作次数.每次涂色只能用一段数值更大的颜色覆盖原有的颜 ...

  7. IDEA 配置背景颜色(豆沙绿)

    1. 定义方案名字(my color) Ctrl + Shift + a --> Color Scheme // 快捷定位配置 // 路径:File --> Settings --> ...

  8. vector初始化的几种方式-STL

     vector<int>::iterator int_ite;  vector<string>::iterator string_ite;  //vector<T> ...

  9. cp -拷贝文件出现错误

    对于cp -a最主要的用法是在保留原文件属性的前提下复制文件. 如果出现了拷贝文件错误,在文件前面加上-a 即可

  10. DOTA数据集

    航拍图像面临的问题 正常图像受重力作用相对固定,航拍图像的物体受拍摄角度影响 航拍图像的物体比例变化很大 某些航拍图像中小物体很密集 传统的数据集面临数据偏差的问题严重 好的数据集必备的几个特征 大量 ...