Week4-2Parsing

Parsing human language

Rather different from computer languages

  • No types for words(variable, comment, …)
  • No brackets around phrases
  • Ambiguity
    • words
    • parses
  • Implied information

Parsing

  • Parsing means associating tree structures to a sentence, given a grammar(often a CFG)
    • There may be 0, 1, or more than 1 such tree structures for the given sentence
  • Grammars are declarative
    • They don’t specify how the parse tree will be constructed

Syntactic ambiguities

  • PP attachment
  • Gaps
    • Mary likes Physics but hates Chemistry.
      -Coordination scope
    • Small boys and girls are playing.
  • Particles vs. preposition
    • She run up a large hill.
      -Gerund vs. adjective
    • Frightening kids can cause trouble.

Applications of parsing

  • Grammar checking
  • Question answering
  • Machine translation
  • Information extraction
  • Speech generation
  • Speech understanding
  • Interpretation

Context-free grammars

  • A CFG is 4-tuple (N,Σ,R,S)
    • N: non-terminal symbols
    • Σ : terminal symbols(disjoint from N)
    • R: rules( Aβ ), where β is a string from (ΣN) (a string from the union set of Σ and N with 0 to a large number)
    • S: start symbol in N

Phrase structure grammar

  • Sentences are not just bag of words!(AGAIN!)
  • Context view of language
    • A PP looks the same whether it is part of the subject NP or part of VP
  • Constituent order
    • SVO(subject verb object)
    • SOV
  • Auxiliary verbs
  • Imperative sentences
  • Interrogative sentences
  • Negative sentences

Leftmost derivation

  • A leftmost derivation is a sequence of string s1,s2,...,sn
    - s1=S , the start symbol
    - sn includes only terminal symbols
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值