NLP复习(Lecture 9-15)

Lecture 9 Language Model

语言模型分两类——概率语言模型结构语言模型

1. N-Gram Models
  • Estimate probability of each word given prior context.
  • Number of parameters required grows exponentially with the number of words of prior context
  • An N-gram model uses only N-1 words of prior context
    — unigram: P(phone)
    — Bigram: P(phone | cell)
    — Trigram: P(phone | your cell)
2. Smoothing/Back-off
3. Linear Interpolation
  • Linearly combine estimates of N-gram models of increasing order.


Lecture 11 Part of Speech Tagging

1. Hidden Markov Model
  • Sometimes it is not possible to know precisely which states the model passes through
  • We may observe some phenomena that occurs corresponding to state with probability distribution.
  • the state transition is hidden
  • the stochastic process of obervation is stochastic function of hidden state transition process
  • HMM Example
    — Two observations: 'Rain' and 'Dry'
    — Two hideen states: "Low' and 'High' 高气压和低气压
    — 转移概率(Transition probabilities 隐藏状态之间)



    — Observation probabilities



    — Initial probabilities: P('Low')=0.4 P('High')=0.6
2. HMM 三种问题
  • Elvalution: Give the observation sequence and HMM model(A,B,π), how do we compute the probability of O given the model;给定观测序列和模型,计算观测序列的生成概率。(Forward-Backward algorithm)


  • Decoding:Given the observation sequence and an HMM model, how do we find the state sequence that best explains the observations;给定观测序列和模型,输出最有可能的隐藏序列。(Viterbi algorithm)
    — find the global optimal results through find stage optimal
    — if the best path ending in q_k = s_j goes through q_{k-1} = s_i then it should coincide with the best path ending in q_{k-1}=s_i
  • Learning:How do we adjust the model parameters to maximize P(O|model)
  • N-best algorithm is similar to HMM, and it keeps the N best paths.

Lecture 12 Parsing

1. Parsing Approaches for Context-Free Grammar(CFG)

— Top-down Approach
— Bottom-up Approach

2. Regular Grammar
  • A regular is denoted as G=(V,T,P,S)
    — V are finite set of non-terminal variables
    — T are finite set of terminal variables
    — S are start symbol
    — P is a finite set of productions. Consist of productions like V->B
  • Left hand side: one non-terminal symbol
  • Right hand side: empty string / a terminal symbol/ a non-terminal sysbol following a terminal symbol
3. Top-down Parsing
  • Begin with the start symbol S and produce the right hand side of the rule
  • Match the left-hand side of CFG rules to non-terminals in the string, replacing them with the right-hand side of the rule.
  • Continue untill all the non-terminals are replaced by terminals, such that they correspond to the symbols in the sentence.
  • The parse succeeds when all words in the sentence are generated.

Lecture 14 Text Categorization

1. Term Selection
  • Examples
    — Chi Square
    — Mutual Information
    — Information Gain
    — Information Ratio
    — Odd Ratio
2. Feature Generation
  • Latent Semantic Indexing(LSI)
  • Explicit Semantic Indexing(ESI)
3. Nearest-Neighbor Learning Algorithm
  • Compute similarity between x and all examples in D.
  • Assign x the category of the most similar example in D.
4. Category Scoring for weighted-sum
  • The score for a category is the sum of the similarity scores between the point to be classified and all of its k-neighbors that belong to the given category.


©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,187评论 0 10
  • 我自己也是很喜欢这期的规则玩法,5-7人的小群让每个人都不孤单,晒晨效更是能促进早起,每天早起拍拍拍,大群小群尽情...
    田心远阅读 2,615评论 3 5
  • 家乡一入冬,家家户户就开始做猪血丸子。准备豆腐、鸡蛋、猪肉、猪血、盐、辣椒粉。首先把豆腐放筐里滤水,把猪肉切碎...
    灿绕白指阅读 3,012评论 0 0
  • 上周,老罗和王自如在优酷长达三个小时的直播激辩引发全网吐槽。这种直播辩论的形式也许会逐渐增多。无论是说服(忽悠)消...
    LawrenceSun阅读 11,707评论 0 5
  • 环境就是 ssm+Shiro web.xml Shiro过滤器总结 spring-Shiro.xml 在 spri...
    我相信你爱过gg阅读 2,994评论 0 0

友情链接更多精彩内容