hoyt has asked for the wisdom of the Perl Monks concerning the following question:
But I was hoping to add some ranking of the match to present the user with the most likely artist for that text file. I would eventually write the matches back into a MySQL table to present later. I'm thinking an exact full line match = 256, a case insensitive full line match = 128, a partial word match = 64, etc. Then I could add up all of the matches for one artist and rank them for the user. I'm surprised to not find a method to do this without re-inventing the wheel. Am I going about this wrong? Any wisdom to point me in a different direction? Thanks!for (my $i=0;$i<=$#lines;$i++){ if(exists $artists{$lines[$i]})
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash Search Ranking
by Your Mother (Archbishop) on Jan 09, 2016 at 19:45 UTC | |
|
Re: Hash Search Ranking
by GrandFather (Saint) on Jan 09, 2016 at 19:51 UTC | |
|
Re: Hash Search Ranking
by tangent (Parson) on Jan 09, 2016 at 23:46 UTC | |
|
Re: Hash Search Ranking
by hoyt (Acolyte) on Jan 09, 2016 at 19:20 UTC | |
|
Re: Hash Search Ranking
by anonymized user 468275 (Curate) on Jan 14, 2016 at 14:51 UTC |