Skip to content

Commit

Permalink
Score limit
Browse files Browse the repository at this point in the history
  • Loading branch information
high-moctane committed Dec 30, 2021
1 parent bf026fb commit 56feebd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions download.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ func Save(ctx context.Context, conn *gorm.DB, r io.Reader, query Query, cache Ca

switch len(words) {
case 1:
if score < 1000 {
continue
}
val := OneGramRecord{Word: words[0], Score: score}
res := conn.Create(&val)
if res.Error != nil {
Expand Down

0 comments on commit 56feebd

Please sign in to comment.