Skip to content

Commit

Permalink
fix: posts with less repeated words should have more weight
Browse files Browse the repository at this point in the history
  • Loading branch information
double-beep authored Aug 21, 2024
1 parent 3566e09 commit b62daa2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public RepeatedWordFilter(int chatroomId, Post post) {
@Override
public boolean isHit() {
if (post.getBody() != null) {
repeatedWords = CheckUtils.checkRepeatedWords(this.post.getBody());
repeatedWords = CheckUtils.checkRepeatedWords(post.getBody());
}

double score = getScore();
Expand All @@ -40,7 +40,7 @@ public double getScore() {

@Override
public double getTotalScore() {
return getScore();
return 6 - getScore();
}

@Override
Expand Down

0 comments on commit b62daa2

Please sign in to comment.