知识卡片

问题卡 · 6272.c

首次出现位置不代表全部出现

理解等级:中级

示例对每个重要词调用一次s.index,只取得它在句中的首个位置;同一个词后续重复出现不会再进入聚类。若评分目标包含所有重要词出现,应遍历词位置并检查成员,而不是遍历词型各找首项。首现采样与全部词次是两种不同口径,会改变片段边界和密度。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 2 处

    • · 查看原书依据

      s.index(w)) exceptValueError, e: # w not in this particular sentence pass word_idx.sort() # It is possible that some sentences may not contain any important words at all. iflen(wor

    • · 查看原书依据

      s.index(w)) except ValueError, e: # w not in this particular sentence pass word_idx.sort() # It is possible that some sentences may not contain any important words if len(word_idx)

    参考来源

    - 位置:《社交网站的数据挖掘与分析(原书第2版)》第5章《5.3.3 文档摘要》(spine94;extracted/OReilly精品图书系列共21册(《Javascript权威指南》、《机器学习:实用案例解析》、《编写可读代码的艺术》、《算法精解》等)/_epub-src/text/part0083.html;u079-ch05-022)。 - 结论依据:原文在“s.index(w)”附近的定义、例子或代码支撑本卡核心说明:示例对每个重要词调用一次s.index,只取得它在句中的首个位置;同一个词后续重复出现不会再进入聚类。边界按已读前提解释;示例未执行。 - 原始内容:s.index(w)) exceptValueError, e: # w not in this particular sentence pass word_idx.sort() # It is possible that some sentences may not contain any important words at all. iflen(wor - 位置:《社交网站的数据挖掘与分析(原书第2版)》第9章《9.24.3 讨论》(spine150;extracted/OReilly精品图书系列共21册(《Javascript权威指南》、《机器学习:实用案例解析》、《编写可读代码的艺术》、《算法精解》等)/_epub-src/text/part0139.html;u233-ch05-022)。 - 结论依据:逐重要词仅取首次出现位置,仍会漏掉同词的后续出现。 - 原始内容:s.index(w)) except ValueError, e: # w not in this particular sentence pass word_idx.sort() # It is possible that some sentences may not contain any important words if len(word_idx)