refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure

This commit is contained in:
wizardchen
2025-11-28 16:17:52 +08:00
parent 135e33eca4
commit eb8bfddfd1
89 changed files with 1453 additions and 522 deletions
@@ -198,7 +198,10 @@ func unionLcs(evaluatedSentences []string, referenceSentence string, prevUnion *
return newLcsCount, lcsUnion
}
func rougeLSummaryLevel(evaluatedSentences, referenceSentences []string, rawResults, exclusive bool) map[string]float64 {
func rougeLSummaryLevel(
evaluatedSentences, referenceSentences []string,
rawResults, exclusive bool,
) map[string]float64 {
referenceNgrams := NewNgrams(exclusive)
referenceNgrams.BatchAdd(splitIntoWords(referenceSentences))
m := referenceNgrams.Len()