刘立冬 3 settimane fa
parent
commit
0e777a4ab0

+ 7 - 0
sug_v6_1_2_121.py

@@ -842,6 +842,13 @@ def generate_domain_combinations(segments: list[Segment], n_domains: int) -> lis
             # word_combination 是一个tuple,每个元素是一个词列表
             # 例如: (["获取"], ["风光", "摄影"])
 
+            # 计算总词数
+            total_words = sum(len(words) for words in word_combination)
+
+            # 如果总词数<=1,跳过(组词必须大于1个词)
+            if total_words <= 1:
+                continue
+
             # 将所有词连接成一个字符串
             combined_text = "".join(["".join(words) for words in word_combination])
 

+ 3 - 1
visualization/sug_v6_1_2_121/convert_v8_to_graph_v3.js

@@ -315,7 +315,9 @@ function convertV8ToGraphV2(runContext, searchResults) {
         const combStepId = `step_comb_r${roundNum}`;
         nodes[combStepId] = {
           type: 'step',
-          query: `步骤2: 跨${roundNum}个域组合 (${domainCombinations.length}个组合)`,
+          query: roundNum === 1
+            ? `步骤2: 域内组合 (${domainCombinations.length}个组合)`
+            : `步骤2: 跨${roundNum}个域组合 (${domainCombinations.length}个组合)`,
           level: roundNum * 10 + 1,
           relevance_score: 0,
           strategy: '域内组词',

+ 6 - 6
visualization/sug_v6_1_2_121/index.js

@@ -899,7 +899,7 @@ function TreeNode({ node, level, children, isCollapsed, onToggle, isSelected, on
             {/* 域标识 - 右侧,挨着分数,优先显示域类型,否则显示域索引或域字符串,但domain_combination节点不显示 */}
             {(node.data.domain_type || node.data.domains_str || (node.data.domain_index !== null && node.data.domain_index !== undefined)) && nodeActualType !== 'domain_combination' && (
               <span style={{
-                fontSize: '9px',
+                fontSize: '12px',
                 color: '#fff',
                 background: '#6366f1',
                 padding: '2px 5px',
@@ -921,9 +921,9 @@ function TreeNode({ node, level, children, isCollapsed, onToggle, isSelected, on
             {/* 类型标签 - 显示在右侧靠近分数,蓝色背景 */}
             {node.data.type_label && (
               <span style={{
-                fontSize: '9px',
+                fontSize: '12px',
                 color: '#fff',
-                background: '#3b82f6',
+                background: '#6366f1',
                 padding: '2px 5px',
                 borderRadius: '3px',
                 flexShrink: 0,
@@ -2000,11 +2000,11 @@ function FlowContent() {
                                 {/* 域标识 - 右侧,挨着分数 */}
                                 {(node.data.domain_type || node.data.domains_str || (node.data.domain_index !== null && node.data.domain_index !== undefined)) && (
                                   <span style={{
-                                    fontSize: '8px',
+                                    fontSize: '12px',
                                     color: '#fff',
                                     background: '#6366f1',
-                                    padding: '1px 4px',
-                                    borderRadius: '2px',
+                                    padding: '2px 5px',
+                                    borderRadius: '3px',
                                     flexShrink: 0,
                                     fontWeight: '600',
                                     marginLeft: '4px',