MCPcopy Create free account
hub / github.com/Qinbf/groundmap / fmt_relation_balance

Function fmt_relation_balance

scripts/k.py:2107–2117  ·  view source on GitHub ↗
(items: list[dict])

Source from the content-addressed store, hash-verified

2105
2106
2107def fmt_relation_balance(items: list[dict]):
2108 if not items:
2109 print("✅ 关系词频次均衡(无单一关系词占比 > 30%)")
2110 return
2111 print(f"⚠️ 发现 {len(items)} 个关系词占比过高(> 30% 阈值):\n")
2112 print(f" (标准关系白名单:{sorted(RELATION_TYPES)})\n")
2113 for it in items:
2114 pct = it["ratio"] * 100
2115 print(f" {it['relation']}: {it['count']}/{it['total_relations']} = {pct:.0f}% (阈值 {it['threshold']:.0%})")
2116 print(f" 建议: {it['suggestion']}")
2117 print()
2118
2119
2120def fmt_implicit_relations(items: list[dict]):

Callers 1

_main_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected