(源自:http://en.wikipedia.org/wiki/Bag_of_words_model)

The bag-of-words model is a simplifying assumption used in natural language processing and information retrieval. In this model, a text (such as a sentence or a document) is represented as an unordered collection of words, disregarding grammar and even word order.

词袋模型是在自然语言处理和信息检索中的一种简单假设。在这种模型中,文本(段落或者文档)被看作是无序的词汇集合,忽略语法甚至是单词的顺序。

The bag-of-words model is used in some methods of document classification. When a Naive Bayes classifier is applied to text, for example, the conditional independence assumption leads to the bag-of-words model. [1] Other methods of document classification that use this model are latent Dirichlet allocation and latent semantic analysis.[2]

词袋模型被用在文本分类的一些方法当中。当传统的贝叶斯分类被应用到文本当中时,贝叶斯中的条件独立性假设导致词袋模型。另外一些文本分类方法如LDA和LSA也使用了这个模型。

Example: Spam filtering 
   In Bayesian spam filtering, an e-mail message is modeled as an unordered collection of words selected from one of two probability distributions: one representing spam and one representing legitimate e-mail ("ham"). Imagine that there are two literal bags full of words. One bag is filled with words found in spam messages, and the other bag is filled with words found in legitimate e-mail. While any given word is likely to be found somewhere in both bags, the "spam" bag will contain spam-related words such as "stock", "Viagra", and "buy" much more frequently, while the "ham" bag will contain more words related to the user's friends or workplace.

在贝叶斯垃圾邮件过滤中,一封邮件被看作无序的词汇集合,这些词汇从两种概率分布中被选出。一个代表垃圾邮件,一个代表合法的电子邮件。这里假设有两个装满词汇的袋子。一个袋子里面装的是在垃圾邮件中发现的词汇。另一个袋子装的是合法邮件中的词汇。尽管给定的一个词可能出现在两个袋子中,装垃圾邮件的袋子更有可能包含垃圾邮件相关的词汇,如股票,伟哥,“买”,而合法的邮件更可能包含邮件用户的朋友和工作地点的词汇。

To classify an e-mail message, the Bayesian spam filter assumes that the message is a pile of words that has been poured out randomly from one of the two bags, and uses Bayesian probability to determine which bag it is more likely to be.

为了将邮件分类,贝叶斯邮件分类器假设邮件来自于两个词袋中中的一个,并使用贝叶斯概率条件概率来决定那个袋子更可能产生这样的一封邮件。

转载于:https://www.cnblogs.com/kevinGaoblog/archive/2012/05/13/2497938.html

The bag-of-words model相关推荐

  1. 【NLP】词袋模型(bag of words model)和词嵌入模型(word embedding model)

    本文作为入门级教程,介绍了词袋模型(bag of words model)和词向量模型(word embedding model)的基本概念. 目录 1 词袋模型和编码方法 1.1 文本向量化 1.2 ...

  2. 词袋模型(Bag of Words Model)

    词袋模型是将文本转换成向量的一种方式,且容易实现,本文将详细地阐述词袋模型以及如何实现词袋模型. 文本存在的问题 在对文本进行建模的时候存在一个问题,就是"混乱",因为像机器学习算 ...

  3. 计算机视觉——Bag Of features图像检索

    计算机视觉--Bag Of features图像检索 原理 什么是图像检索 什么是Bag Of Word模型 什么是sift特征提取 什么是视觉词典 什么是TF-IDF 基于BOW的图像检索步骤 结果 ...

  4. 李菲菲 bag of words

    Bag-Of-Words中K-Means聚类的效率优化 最初的Bag of words,也叫做"词袋",在信息检索中,Bag of words model假定对于一个文本,忽略其词 ...

  5. [转帖]李菲菲 bag of words

    Bag-Of-Words中K-Means聚类的效率优化 最初的Bag of words,也叫做"词袋",在信息检索中,Bag of words model假定对于一个文本,忽略其词 ...

  6. Bag of Features (BoF) 简介

           最初的Bag of words,也叫做"词袋",在信息检索中,Bag of words model假定对于一个文本,忽略其词序和语法,句法,将其仅仅看做是一个词集合, ...

  7. keras训练完以后怎么预测_使用Keras建立Wide Deep神经网络,通过描述预测葡萄酒价格...

    你能通过"优雅的单宁香"."成熟的黑醋栗香气"或"浓郁的酒香"这样的描述,预测葡萄酒的价格吗?事实证明,机器学习模型可以. 在这篇文章中,我 ...

  8. 第一篇: 词向量之Word2vector原理浅析

    第一篇: 词向量之Word2vector原理浅析 作者 Aroundtheworld 2016.11.05 18:50 字数 1353 阅读 5361评论 1喜欢 9 一.概述 本文主要是从deep ...

  9. Python基础:一起来面向对象 (二) 之搜索引擎

    实例 搜索引擎 一个搜索引擎由搜索器.索引器.检索器和用户接口四个部分组成 搜索器就是爬虫(scrawler),爬出的内容送给索引器生成索引(Index)存储在内部数据库.用户通过用户接口发出询问(q ...

  10. 不是你无法入门自然语言处理(NLP),而是你没找到正确的打开

     不是你无法入门自然语言处理(NLP),而是你没找到正确的打开 小狼 2017-05-24 9:16:08 数据挖掘 评论(0) 作者:Mr.Scofield 〇.序 之前一段时间,在结合深度学习 ...

最新文章

  1. Ubuntu Linux经典著作
  2. 苹果CEO乔布斯如何工作
  3. 多种分布式文件系统简介
  4. ios编译与android编译区别是什么,为iOS和Android编译C ++代码(XCode)。 这是真的吗?...
  5. android gps导航省电,一种GPS导航中省电的系统和方法与流程
  6. 基于JAVA+SpringMVC+Mybatis+MYSQL的图书管理系统
  7. 5年赚50倍的段永平:这几家公司正在长长的坡上滚着厚厚的雪
  8. 在字符串中标红_在C ++中标记字符串
  9. 思维认知-读mindhacks杂记
  10. 使用cocoapods install友盟时报错Error installing UMengAnalytics
  11. 软件压力测试的手段有注入错误吗,JMeter压力测试之环境搭建、脚本调试及报错解决方法(Linux版)...
  12. Feign出现The bean ‘seckill.FeignClientSpecification‘, defined in null, could not be registered. A be
  13. ftp服务器要什么配置文件,ftp服务器要求什么电脑配置
  14. 串口实现PC之间传输文件
  15. 【数据结构】折半查找法
  16. vmware安装centos8网络配置并配置NAT子网(解决Unit network.service not found问题)
  17. 移动硬盘怎么连接服务器,无线路由器加USB硬盘组建属于自己的FTP服务器的方法 隐者黑鹰...
  18. 《小王子》精彩章节——Chapter 21
  19. linux查看端口是否禁用和开启关闭端口
  20. ACTF2020新生赛-upload1

热门文章

  1. firebird 3.0 开发者指南_手机端空间级AR交互设计指南
  2. FPGA之道(44)HDL中的隐患写法
  3. 模6计数器以及模10计数器(Verilog HDL语言设计)(Modelsim仿真与ISE综合)
  4. 运维工具SaltStack
  5. Asp.net Mvc 多级控制器 路由重写 及 多级Views目录 的寻找视图的规则 (多级路由) 如:Admin/Test/Index...
  6. C语言的 32个关键之和9个控制语言之关键字
  7. 如何 提高企业网站大数据量 效率
  8. oracle10G 错误删除数据或者表 闪回功能帮你忙。。。闪回操作例子
  9. c语言 printf右对齐,杨辉三角右对齐
  10. leetcode算法第9题