当前位置: 首页 > news >正文

隆尧网站建设苏州微网站建设

隆尧网站建设,苏州微网站建设,济南cms建站,建设网站运营收入自然语言处理基础(Natural Language Processing Basics, NLP Basics) 自然语言处理( Natural Language Processing, NLP)是计算机科学领域与人工智能领域中的一个重要方向。它研究能实现人与计算机之间用自然语言进行有效通信的各种理论和方法。自然语言…

自然语言处理基础(Natural Language Processing Basics, NLP Basics)

自然语言处理( Natural Language Processing, NLP)是计算机科学领域与人工智能领域中的一个重要方向。它研究能实现人与计算机之间用自然语言进行有效通信的各种理论和方法。自然语言处理是一门融语言学、计算机科学、数学于一体的科学。因此,这一领域的研究将涉及自然语言,即人们日常使用的语言,所以它与语言学的研究有着密切的联系,但又有重要的区别。自然语言处理并不是一般地研究自然语言,而在于研制能有效地实现自然语言通信的计算机系统,特别是其中的软件系统。因而它是计算机科学的一部分。

为什么NLP重要(Why is NLP Important?)

  • Turing Test:A test of machine ability to exhibit intelligent behavior indistinguishable from a human
  • Language is the communication tool in the test

在这里插入图片描述

艾伦图灵的最早版本:Imitation Game。
卷福也拍过这部电影Imitation Game,为了破解德军的军情信息,图灵和一群才华横溢的人研究如何破译密码,如果纯粹人工破解则几乎不可能,但是他们发明了最早的人工智能机器,通过大模型破译出原始信息,一开始该模型一直无法收敛,直到他们发现传递的信息中总会有“希特勒万岁”这句话之后,发现了大模型的初始条件,一举攻破该难题。
在这里插入图片描述

词的表达(Distributed Word Representation)

Word Representation

  • Word representation: a process that transform the symbols to the machine understandable meanings
  • Definition of meaning(Webster Dictionary)
    1. The thing one intends to convey especially by language
    1. The logical extension of a word
  • How to represent the meaning so that the machine can understand?

Goal of Word Representation

  • Compute word similarity,计算词的相似度
  • Infer word relation,发现词的语义关系

Synonym and Hypernym

  • Use a set of related words, such as synonyms and hypernyms to represent a word

用一组相关词(同义词/上位词)集合来表示它
在这里插入图片描述

Problems of Synonym/Hypernym Representation

  • Missing nuance,有一些细微差异无法完成,比如proficient和good
  • Missing new meanings of words,同义词/上位词出现新的词义会缺失实际含义,比如Apple(fruit —> IT company)
  • Subjective,主观性问题
  • Data sparsity,数据稀疏问题
  • Requires human labor to create and adapt,需要大量人工构建和维护这个字典

One-Hot Representation

  • Regard words as discrete symbols,把它看作独立的符号
  • Word ID or one-hot representation,可以比较好的完成两个文档之间的相似的计算

在这里插入图片描述

Problems of One-Hot Representation

  • similarity(star, sun) = (Vstar, Vsun) = 0,它的问题是假设词和词之间互相之间都是正交的,那么从而导致任意两个词进行相似度的计算都是零
  • All the vectors are orthogonal.No natural notion of similarity for one-hot vectors.

Represent Word by Context

  • The meaning of a word is given by the words that frequently appear close-by,一个词的词义经常跟这个词的上下文有密切关系。
  • Use context words to represent stars,比如下图用上下文中的词表示stars这个词。

在这里插入图片描述

Co-Occurrence Counts

  • Count-based distributional representation
    在这里插入图片描述
  • Term-Term matrix: How often a word occurs with another
  • Term-Document matrix: How often a word occurs in a document
    可以通过这个词出现次数得到的稠密向量算出两个词之间的相似度

Problems of Count-Based Representation

  • Increase in size with vocabulary
  • Require a lot of storage
  • sparsity issues for those less frequent words

它的问题是当词表变得越来越大的时候,存储的需求就会越来越大。
而频次出现较少的词,它的上下文或者词的语境就会变得很稀疏。

Word Embedding,词嵌入

  • Distributed Representation,分布式的表示
    • Build a dense vector for each word learned from large-scale text corpora,建立起一个低维的一个稠密的向量空间,用这个空间里面的某一个位置所对应的那个向量来表示这个词。
    • Learning method: Word2Vec(We will learn it in the next class)

在这里插入图片描述

Language Modeling

  • Language Modeling is the task of predicting the upcoming word
    语言模型的能力其实就是根据前面的词预测下面即将要出现的词
    • Compute conditional probability of an upcoming word Wn:
      在这里插入图片描述
  • A language model is a probability distribution over a sequence of words
    • Compute joint probability of a sequence of words:P(W) = P(w1,w2,…,wn) 它称为合法的一句话的概率,也即所有词的序列的联合概率
    • Compute conditional probability of an upcoming words Wn:P(wn | w1,w2,…,wn-1),根据前面已经说过的词预测下一个词
  • How to compute the sentence probability?
  • Assumption:the probability of an upcoming word is only determined by all its previous words,未来的词它只会受到它前面的词的影响

联合概率拆解成条件概率乘积

  • Language Model

在这里插入图片描述

N-gram Model

  • Collect statistics about how frequent different n-grams are, and use these to predict next word.
  • E.g., 4-gram,比如4-gram,表达式如下,它会统计too late to wj的频次和too late to出现的频次的关系

在这里插入图片描述

  • Problem:

    • Need to store count for all possible n-grams. So model size is O(exp(n))
  • Markov assumption,马尔可夫假设

在这里插入图片描述

  • Simplifying Language Model
    • Bigram(N-Gram,N=2)
    • Trigram(N-Gram,N=3)

Problems of N-gram

  • Not considering contexts farther than 1 or 2 words,很少考虑更多的历史,一般就用bigram或trigram,没有办法考虑较长的词的上下文。
  • Not capturing the similarity between words,N-gram它的背后其实是一个典型的one-hot representation,它会假设所有的词都是相互独立的,它做统计的时候上下文其实都是基于符号来做统计的,它是没有办法理解这些词互相之间的相似度。

Neural Language Model

  • A neural language model is a language model based on neural networks to learn distributed representations of words
    分布式的表示建构前文和当前词的预测条件概率
    • Associate words with distributed vectors
    • Compute the joint probability of word sequences in terms of the feature vectors
    • Optimize the word feature vectors(embedding matrix E)and the parameters of the loss function(map matrix W)

在这里插入图片描述

http://www.yayakq.cn/news/484257/

相关文章:

  • 嘉兴网站系统总部天元建设集团有限公司财报
  • 企业网站建设的本质及特点达州seo排名
  • 网站在互联网营销中的作用网页制作总结报告
  • 360网站seo网络推广渠道
  • 网站开发技术要求微信开放平台如何注销
  • 邓州市建设局网站做分销微商城网站
  • 那里做网站本地搭建的wordpress怎么外网访问
  • 深圳网站建设公司报价wordpress如何使用
  • 网站建设佛山网站制作自己接单
  • 公司网站建设的普遍性东莞网站制作模板
  • 个人能建设网站吗定西网站建设
  • 网站首屏高度微信分销网站建设
  • 聚美优品一个专注于做特价的网站网站互动营销
  • 免费的会计做账系统山东网络优化
  • 网站域名后缀有哪些上海徐汇区网站建设公司
  • 网站模拟课堂模式应该怎么做国家允许哪几个网站做顺风车
  • 网站内容优化方法有哪些内容wordpress无法添加小工具
  • 旅游电子商务网站建设规划方案网络设备管理系统
  • 企业网站建设费未付款怎样挂账网站建设搭建
  • 交易类网站建设功能表学seo如何入门
  • 企业网站备案注销永康网站推广
  • 安徽动漫公司 网站制作 安徽网新济宁网站建设只要500元
  • 南阳网站推广招聘求有题目做的学习网站
  • 网站建设 网站优化营销型网站建设专家内江网站制作
  • 做电影网站用什么服务器比较好设计的网站有哪些
  • 做网站可行性分析如何用word做网站地图
  • 戴尔网站建设成功的关键浏览器怎么取消2345网址导航
  • 企业网站怎么形成二维码西宁市网站建设公司推荐
  • 广东省建设安全监督站的网站开发购物网站
  • 新手学做免费网站软件在手机上编写安卓app