知识卡片
阈值建图应保留节点筛选语义
用句子作节点、相似度超过阈值作无向边,可观察局部联系。np.triu(k=1)只留严格上三角,排除对角及重复边;若只在有边时添加节点,孤立句会消失,不能把图当全文全部句子的完整结构。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 用词嵌入推理
原书出处 · 1 处
- · 查看原书依据
With the similarity matrix, you can now create an undirected graph, using the similarities between sentence vectors to create graph edges between similar sentences. The code in listing 6.19 uses a library called NetworkX64 to create the undirected graph data structure. Internally, the data is stored in nested dictionaries—dictionaries of dictionaries of dictionaries … and so on.65 Like a linked list, the nested dictionaries allow
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第06章《用词嵌入推理》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-6.html)
- 结论依据:摘录中关于阈值建图应保留节点筛选语义的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:With the similarity matrix, you can now create an undirected graph, using the similarities between sentence vectors to create graph edges between similar sentences. The code in listing 6.19 uses a library called NetworkX64 to create the undirected graph data structure. Internally, the data is stored in nested dictionaries—dictionaries of dictionaries of dictionaries … and so on.65 Like a linked list, the nested dictionaries allow