Ian Campbell wrote:
I did some experiments (with a crappy Perl script) over my mp3
collection (around 200 albums) on Sunday I posted some stuff here but it
was caught by the list filters (too big) and I was on my way out the
door and I never managed to trim it down and post it again.

The script did a depth first search across the possible numeric pad
inputs, and creates a regex by mapping 2-9 to the letters (and numbers)
marked on my remote, 0 to "0" or whitespace and 1 to everything else (so
1 and punctuation basically). It stopped when the list of matching
albums (artist and title) reached <8 (which was my target for fitting on
a TV screen).

Is there any reason to stop it at 8 result? I know what you mean in that the human factor takes over, but would your method physically prevent any further characters being entered? This is relativly arbitrary though when I think about it, as it would have to be the UI use of the underlying search mechanism that does the limit, so you could easily pick and chose to limit the input or simply display "No matches" depending on preference I guess.


Also, how do you think is best to present "search term" box in UI terms? Showing the REGEXP is obviously not on from an non-techie acceptance point of view unless it is a simplified version of the regexp. This could be quite an awkward bit unless you have some bright ideas already?? My brain doesn't seem to be able to think at the moment!!

The maximum key sequence that was required to bring the match list down
to <=8 with my collection was 7 and for the nearly all of the albums the
most sensible things you would enter when looking for them took just 4-5
keys to produce a useful shortlist.


The matches of length seven were all, without exception, (a) albums by
"various" or (b) artists/albums named "the be_" which matched "the best
of..." (mostly), "the beatles" and "the bends". If you searched for the
artist whose "best of" you wanted, or just "beatles" or "radiohead" you
got the match in less than 7 entries.

Most of the sequences of length 6 were the same, partial matches on
"various" and titles etc starting with "the".

The results of the experiment were encouraging enough (to me) that I'm
intending to continue digging with the internals of mythmusic to see how
it works out in practise.

For what it's worth, this is quite a generic interface, so I think it would be worth while to try to incorporate a generic implementation into libmyth rather than poking specifically with just mythmusic. Anyone agree??


It is fairly safe to say that this will run of the DB (by that I mean the search terms are in a db field) and use the built in REGEXP stuff in MySQL. If so, the libmyth class or whatever it turns out to be could accept some form of SQL input perhaps?

Also, there are quite a few patches just now to allow multiple database backends, so although MySQL has REGEXP, do you know what e.g. the postgresql equiv. is? I've not used postgres much so don't really know but it should be a consideration!

This is really cool! I've been wanting this for ages!!

Cheers

Col

--

+------------------------+
|     Colin Guthrie      |
+------------------------+
|  [EMAIL PROTECTED]   |
| http://colin.guthr.ie/ |
+------------------------+
_______________________________________________
mythtv-dev mailing list
[EMAIL PROTECTED]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to