|
|
@@ -1048,6 +1048,74 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
color: #92400e;
|
|
|
}}
|
|
|
|
|
|
+ /* 路径概率显示 */
|
|
|
+ .path-probability {{
|
|
|
+ margin-top: 6px;
|
|
|
+ padding: 8px;
|
|
|
+ background: #fef3c7;
|
|
|
+ border-left: 3px solid #f59e0b;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 11px;
|
|
|
+ line-height: 1.6;
|
|
|
+ }}
|
|
|
+
|
|
|
+ .path-probability-label {{
|
|
|
+ font-weight: 600;
|
|
|
+ color: #92400e;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }}
|
|
|
+
|
|
|
+ .path-flow {{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ margin-top: 4px;
|
|
|
+ }}
|
|
|
+
|
|
|
+ .path-node {{
|
|
|
+ padding: 4px 8px;
|
|
|
+ background: white;
|
|
|
+ border: 1px solid #fbbf24;
|
|
|
+ border-radius: 4px;
|
|
|
+ color: #78350f;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 10px;
|
|
|
+ }}
|
|
|
+
|
|
|
+ .path-arrow {{
|
|
|
+ position: relative;
|
|
|
+ flex: 1;
|
|
|
+ height: 2px;
|
|
|
+ background: #fbbf24;
|
|
|
+ min-width: 30px;
|
|
|
+ }}
|
|
|
+
|
|
|
+ .path-arrow::after {{
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ right: -6px;
|
|
|
+ top: -3px;
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ border-left: 6px solid #fbbf24;
|
|
|
+ border-top: 4px solid transparent;
|
|
|
+ border-bottom: 4px solid transparent;
|
|
|
+ }}
|
|
|
+
|
|
|
+ .path-score {{
|
|
|
+ position: absolute;
|
|
|
+ top: -16px;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ background: #fbbf24;
|
|
|
+ color: white;
|
|
|
+ padding: 2px 6px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 10px;
|
|
|
+ font-weight: 600;
|
|
|
+ white-space: nowrap;
|
|
|
+ }}
|
|
|
+
|
|
|
/* 搜索词推理区域 */
|
|
|
.search-word-reasoning {{
|
|
|
margin-top: 8px;
|
|
|
@@ -1068,16 +1136,11 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
}}
|
|
|
|
|
|
.reasoning-text {{
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
+ display: none;
|
|
|
}}
|
|
|
|
|
|
.reasoning-text.expanded {{
|
|
|
display: block;
|
|
|
- -webkit-line-clamp: unset;
|
|
|
}}
|
|
|
|
|
|
.reasoning-toggle {{
|
|
|
@@ -3191,13 +3254,13 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
<!-- 左侧栏:原始特征列表 -->
|
|
|
<div class="left-sidebar" id="leftSidebar">
|
|
|
- <div class="sidebar-header">选题点</div>
|
|
|
+ <div class="sidebar-header">帖子-选题点</div>
|
|
|
<div class="sidebar-content" id="leftContent"></div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 中间栏:base_word列表 -->
|
|
|
<div class="middle-sidebar" id="middleSidebar">
|
|
|
- <div class="sidebar-header">匹配的人设特征</div>
|
|
|
+ <div class="sidebar-header">人设-人设分类、标签</div>
|
|
|
<div class="sidebar-content" id="middleContent"></div>
|
|
|
</div>
|
|
|
|
|
|
@@ -3516,7 +3579,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
html += `
|
|
|
<div class="high-similarity-item">
|
|
|
- <div class="high-feature-name">👤 ${{name}}</div>
|
|
|
+ <div class="high-feature-name">📝 ${{name}}</div>
|
|
|
<div class="cascade-item-meta">
|
|
|
<span class="high-feature-score">相似度: ${{similarity.toFixed(2)}}</span>
|
|
|
<span class="high-feature-meta">${{dimension}}</span>
|
|
|
@@ -3582,8 +3645,8 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
id="feature-left-${{featureIdx}}">
|
|
|
<div class="feature-name">🎯 ${{featureName}}${{postIcon}}</div>
|
|
|
<div class="cascade-item-meta">
|
|
|
- <span class="high-feature-score">相似度: ${{similarity.toFixed(2)}}</span>
|
|
|
- <span class="high-feature-meta">${{dimension}}</span>
|
|
|
+ <span class="partial-feature-score">相似度: ${{similarity.toFixed(2)}}</span>
|
|
|
+ <span class="partial-feature-meta">${{dimension}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
`;
|
|
|
@@ -3858,6 +3921,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
const searchWord = sw.search_word || '';
|
|
|
const sourceWord = sw.source_word || '';
|
|
|
const score = sw.score || 0;
|
|
|
+ const originalFeature = sw.original_feature || '';
|
|
|
|
|
|
// 获取综合评分信息
|
|
|
const comprehensiveScore = sw.comprehensive_score || 0;
|
|
|
@@ -3895,9 +3959,21 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
组合词: ${{sourceWord}} → [${{score.toFixed(2)}}]
|
|
|
</div>
|
|
|
${{evalBadges ? `<div style="margin-top:4px;">${{evalBadges}}</div>` : ''}}
|
|
|
+ ${{originalFeature ? `
|
|
|
+ <div class="path-probability">
|
|
|
+ <div class="path-probability-label">🔄 路径概率</div>
|
|
|
+ <div class="path-flow">
|
|
|
+ <div class="path-node">${{sourceWord}}</div>
|
|
|
+ <div class="path-arrow">
|
|
|
+ <div class="path-score">${{comprehensiveScore.toFixed(3)}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="path-node">${{originalFeature}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ ` : ''}}
|
|
|
${{reasoning ? `
|
|
|
<div class="search-word-reasoning">
|
|
|
- <span class="reasoning-label">💭 推理理由:</span>
|
|
|
+ <span class="reasoning-label">💭 推荐理由</span>
|
|
|
<div class="reasoning-text" id="${{reasoningId}}-text">
|
|
|
${{reasoning}}
|
|
|
</div>
|