From d1c75bd2749baadf9c8747ed218d1bee85e454a6 Mon Sep 17 00:00:00 2001 From: OneNewDev Date: Sat, 28 May 2022 14:52:25 +0200 Subject: [PATCH] set minimum score to 20 --- tagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tagger.py b/tagger.py index cd7bd94..41ddb26 100644 --- a/tagger.py +++ b/tagger.py @@ -68,7 +68,7 @@ class FileScanner(HTMLParser): self.texte.append(data) -def display_tags(tags, min_score=10): +def display_tags(tags, min_score): for tag in tags: if tag.score <= min_score: continue @@ -101,7 +101,7 @@ def main(): continue scanner = FileScanner(file) tags = scanner.scan_file() - display_tags(tags) + display_tags(tags, min_score=20) final_tags[title] = tags[:TAGS_PER_ARTICLE] if len(tags) > TAGS_PER_ARTICLE else tags # write_tags(final_tags)