diff --git a/tagger.py b/tagger.py index b478680..78586a7 100644 --- a/tagger.py +++ b/tagger.py @@ -11,7 +11,7 @@ OUTPUT_FILE = 'tags.json' TAGS_PER_ARTICLE = 5 JSON_INDENT = 2 -upper_check = re.compile(r'[A-Z]') +UPPER_CHECK = re.compile(r'[A-Z]') @dataclass @@ -48,7 +48,7 @@ class FileScanner(HTMLParser): score *= 4 if len(word) <= 3: score //= 2 - upper_letters_count = len(upper_check.findall(tag_name)) + upper_letters_count = len(UPPER_CHECK.findall(tag_name)) score += upper_letters_count * 5 if word not in words_with_usage: words_with_usage[word] = Tag(name=tag_name, score=score)