昨天看gensim的LDA Model文档的时候, 看到这样一段:

We find bigrams in the documents. Bigrams are sets of two adjacent words. Using bigrams we can get phrases like “machine_learning” in our output (spaces are replaced with underscores); without bigrams we would only get “machine” and “learning”.

Note that in the code below, we find bigrams and then add them to the original data, because we would like to keep the words “machine” and “learning” as well as the bigram “machine_learning”.


bigram是指两个词组成的词组吗



举报 使用道具
| 回复

共 1 个关于本帖的回复 最后回复于 2021-6-21 09:02

沙发
内容分析应用 金牌会员 发表于 2021-6-21 09:02:20 | 只看该作者
unigram 一元分词,把句子分成一个一个的词
bigram 二元分词,把句子从头到尾每两个字组成一个词语
trigram 三元分词,把句子从头到尾每三个字组成一个词语.
n-gram models就是n元语言模型


举报 使用道具
您需要登录后才可以回帖 登录 | 立即注册

精彩推荐

  • BERTopic做主题合并以后为什么得到的实际主
  • 怎样使用BERTopic做话题检测和主题聚类
  • 什么是SBERT
  • 怎样让GooSeeker分词工具使用宋体画词云图
  • 使用BERTopic时遇到的c-TF-IDF是什么?

热门用户

GMT+8, 2026-6-13 16:32