score individual words in sentiment analysisw

This commit is contained in:
Asim Aslam
2021-03-02 09:27:41 +00:00
parent 80ecacdc5d
commit 60a18b8fe6
2 changed files with 16 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ func EnrichPost(ctx context.Context, post *pb.Post) error {
score := model.Analyze(post.Title)
post.Metadata["sentiment"] = fmt.Sprintf("%.1f", score)
logger.Infof("Setting score %.1f for post %v", score, post.Title)
logger.Infof("Setting score %.1f for post '%v'", score, post.Title)
// now save the post
PostsClient.Save(ctx, &pb.SaveRequest{