typo
This commit is contained in:
parent
fba3f789bb
commit
f09d42433f
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue