fix scoring function
This commit is contained in:
parent
8a3a47a8af
commit
18da5d7972
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -264,8 +264,8 @@ async def fight(ctx):
|
|||
|
||||
|
||||
def score(danbooru_tags: Set[str], interrogator_tags: Set[str]) -> decimal.Decimal:
|
||||
tags_in_danbooru = danbooru_tags | interrogator_tags
|
||||
tags_not_in_danbooru = danbooru_tags - interrogator_tags
|
||||
tags_in_danbooru = danbooru_tags.intersection(interrogator_tags)
|
||||
tags_not_in_danbooru = interrogator_tags - danbooru_tags
|
||||
return decimal.Decimal(
|
||||
len(tags_in_danbooru) - len(tags_not_in_danbooru)
|
||||
) / decimal.Decimal(len(danbooru_tags))
|
||||
|
|
Loading…
Reference in a new issue