(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func TestDetectContradictions_Chinese(t *testing.T) { |
| 72 | config := DefaultQualityMetricsConfig() |
| 73 | qm := NewQualityMetrics(config) |
| 74 | qa := NewQualityAnalyzer(qm, nil) |
| 75 | |
| 76 | memories := []MemoryWithScore{ |
| 77 | { |
| 78 | DocID: "mem1", |
| 79 | Text: "用户有权限访问系统", |
| 80 | Provenance: NewProvenance(SourceUserInput, "user-1"), |
| 81 | }, |
| 82 | { |
| 83 | DocID: "mem2", |
| 84 | Text: "用户没有权限访问系统", |
| 85 | Provenance: NewProvenance(SourceUserInput, "user-2"), |
| 86 | }, |
| 87 | } |
| 88 | |
| 89 | contradictions := qa.detectContradictions(memories) |
| 90 | |
| 91 | if len(contradictions) == 0 { |
| 92 | t.Error("should detect contradiction in Chinese text") |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | func TestDetectDuplicates(t *testing.T) { |
| 97 | config := DefaultQualityMetricsConfig() |
nothing calls this directly
no test coverage detected