NLP-Lecture 5 Context Free Grammar and Parsing

本文介绍了上下文无关语法(CFG)及其在自然语言处理中的应用,强调了结构歧义和句法分析的重要性。CFG是表达句子中词汇之间复杂关系的常用形式系统,并涉及词法、规则和句法结构。文章还探讨了结构歧义的类型,如附属歧义和并列歧义,并提到了解决歧义的句法解析任务,包括CYK解析算法和依赖解析。句法分析是研究如何将单词组合成句子的任务,而依赖解析则关注句子中词汇之间的关系。
摘要由CSDN通过智能技术生成

Learning Objective

  • Context-Free Grammar(上下文无关语法)
  • Structural Ambiguity 结构歧义
  • Constituency Parsing 选取解析
    • CYK Parsing Algorithm
    • Statistical Parsing
  • Dependency Parsing
    • Syntactic Dependency

Syntactic Analysis语法分析

Syntax句法

It is the study of how sentences are put together out of words.
The word “syntax” comes from Greek, meaning “setting out together or arrangement”, and refers to the way words are arranges together.

  • Constitutes: i.e., the group of words that act as a single unit or phrase, e.g., noun phrase, verb phrase and propositional phrase, etc.
  • Grammatical Relationships: i.e., certain kinds of relations between words and phrases, for example, subjects, predicates, and objects.

Context-Free Grammar (CFG)上下文无关语法

Context-Free Grammar is the most widely used formal system for modeling constituent structure in natural languages (aka. Phrase-Structure Grammar).
Context-free grammars are the backbone of many formal models of the syntax of natural language. They are powerful enough to express sophisticated relations among the words in a sentence.
A context-free grammar consists of a set of rules, each of which expresses the ways that symbols of the language can be grouped and ordered to express the ways that symbols of the language can be grouped and ordered together, and a lexicon of words and symbols.

  • Lexicon: Words and Symbols
  • Rules (or Productions): Each expresses the ways that symbols of the language can be grouped and ordered.

For example, the following productions express that an NP (or noun phrase) can be composed of either a ProperNoun or a determiner (Det) followed by a Nominal; a Nominal in turn can consist of one or more Nouns.

在这里插入图片描述

  • A CFG can be thought of in two ways.
    • As a device for generating sentences, and
    • As a device for assigning a structure to a given sentence.
      在这里插入图片描述
  • The term syntax is also used to refer to the structure (e.g., tree structure) of sentences.
    在这里插入图片描述
  • Bracketed Representation: A More Compact Representation
    在这里插入图片描述
  • There are other grammar formulations.
    • Head-Driven Phrase Structure Grammar (HPSG)
    • Lexical-Functional Grammar (LFG)
    • Tree-Adjoining Grammar (TAG)
    • Combinatory Categorial Grammar (CCG)
      在这里插入图片描述

The approach to grammar presented thus far emphasizes phrase-structure rules while minimizing the role of the lexicon. Numerous alternative approaches have been developed that all share the common theme of making better use of the lexicon. These approaches differ with respect to how

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值