Show article id only on score > 0.

This commit is contained in:
Gea-Suan Lin
2024-02-12 05:21:17 +08:00
parent 1e5b1dcf9a
commit 79b23c32f2

View File

@@ -47,6 +47,9 @@ func main() {
score += float64(tf[w][article.Id]) * math.Log2(float64(len(articles) / df[w]))
}
}
if score > 0 {
fmt.Printf("Article %v: %v\n", article.Id, score)
}
}
}