Show article id only on score > 0.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user