知识卡片

普通读书笔记卡 · 6661.b · 生成模型:GPT-6

二元词袋与计数词袋保留不同信息

理解等级:中级

将各位置独热向量逐列或运算得到是否出现的二元词袋,逐列求和得到出现次数。两者都丢顺序,但计数词袋还保留重复频率;sorted(set(tokens))本身只是词项集合,不是已经生成了完整数值计数向量。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      You can use this new BOW vector approach to compress the information content for each document into a data structure that is easier to work with. For keyword search, you could OR your one-hot word vectors from the player piano roll representation into a binary BOW vector. In the player piano analogy, this is like playing several notes of a melody all at once to

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第02章《思维的词元》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-2.html) - 结论依据:摘录中关于二元词袋与计数词袋保留不同信息的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:You can use this new BOW vector approach to compress the information content for each document into a data structure that is easier to work with. For keyword search, you could OR your one-hot word vectors from the player piano roll representation into a binary BOW vector. In the player piano analogy, this is like playing several notes of a melody all at once to