Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Search confusion with shows containing another show name. #56

Closed
aTosser opened this issue Aug 20, 2020 · 2 comments · Fixed by #57
Closed

Search confusion with shows containing another show name. #56

aTosser opened this issue Aug 20, 2020 · 2 comments · Fixed by #57
Labels
bug Something isn't working
Milestone

Comments

@aTosser
Copy link
Contributor

aTosser commented Aug 20, 2020

When searching boku no hero academia - ikinokore! kesshi no survival kunren

The results returned are for "boku no hero academia"

Also affects subscription.
If you subscribe using a shorter term ex. "ikinokore" the config gets updated correctly but on execution results for the main show are returned.

I'll try to beat you to a fix, but I may not have time in the next couple of days.

@mtshrmn
Copy link
Owner

mtshrmn commented Aug 20, 2020

The problem lies in here

from rapidfuzz import process, fuzz
from HorribleDownloader import Parser

p = Parser()
process.extract("boku no hero academia - ikinokore! kesshi no survival kunren", p.shows.keys(), scorer=fuzz.token_set_ratio, limit=2)
# [('Boku no Hero Academia', 100.0), ('Boku no Hero Academia - Ikinokore! Kesshi no Survival Kunren', 100.0)]

For some reason, both Boku no Hero Academia and Boku no Hero Academia - Ikinokore! Kesshi no Survival Kunren have a score of 100. This is a continuation of #52, which was supposed to solve it.

You can search for a better string matching algorithm, but the best solution is by implementing #43 which I don't have too much time to do (I've started the implementation on the api-extend branch)

I'll try to continue working in it, but I'm not sure it'll happen soon.

@mtshrmn mtshrmn added the bug Something isn't working label Aug 20, 2020
@mtshrmn mtshrmn added this to the version 1.2.0 milestone Aug 20, 2020
@aTosser
Copy link
Contributor Author

aTosser commented Aug 20, 2020

I'll take a look this weekend and see what I can work up with api-extend branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants