wolph / alfred-converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculator and Wolfram Alpha.
93 stars 15 forks source link

Rank default unit conversions better #22

Closed quantumgolem closed 3 years ago

quantumgolem commented 4 years ago

I love this applet, but I think it would greatly benefit from better ranking of unit conversions.

Let's say I want to convert 80°F to °C, which is common. Check out the difference between spotlight and the applet:

Screen Shot 2020-08-14 at 11 57 45 AM image

Sure, kelvin is nice to have... but is it really something that's necessary? I'm an engineering student who's grown up around the metric student, and even then I don't ever want to convert into Kelvin unless I'm using it for homework, but then I'd be happy to add in an extra "to K."

It would just make a lot more sense to rank °C as the first choice, and then kelvin, and then Rankine. Same goes to a C to F calculation—rank F, then maybe R or K, and then the last one.

Let's look at another example: I want to convert 16in to something. Of course, I would MOST LIKELY want the convert it to the metric system; moreover, probably meters or centimeters. Otherwise probably to feet & inches, or maybe even to feet only. Here's what I get:

image image

Similarly here, I can't fathom why the conversion for "femtometer" would be ranked higher than feet if you're converting from inches. I hardly believe that anyone uses Alfred for converting inches to femtometers! And also, there's an inch to inch, which doesn't make that much sense to me.

That being said, I think it's a wonderful tool. I just don't like that I always have to keep digging for the conversion I'm trying to find. Spotlight does the ranking much better in my opinion, but of course I don't use it anymore in favor of Alfred.

I would be happy to give more examples and which items should be ranked higher. I would look into the code but sadly don't know enough about coding to fix it. However, I can do my best to help in some other way.

wolph commented 4 years ago

The ranking is actually decided by Alfred. That means you can easily influence it by selecting the "correct" result a few times so it learns from your queries

It might help a bit if I only show the top 10 "close" units by default. So 1 kilometer won't show the femtometer conversion. That might help in the searching.

As for inch to inch, that's probably a side effect of the fractional versions of inches (i.e. 2.5" vs 2 1/2. That needs to go however, if it's identical it shouldn't be there.

quantumgolem commented 4 years ago

Got it, thanks for the reply! That definitely makes sense. Also makes sense why I keep seeing this, because I never need to select the unit conversions manually.

That's a good idea about the close conversions. Would it also be possible to turn off some conversions? Maybe that would also help, but it might be difficult to implement.

quantumgolem commented 4 years ago

Also, I apologize if I sound mad or anything! Didn't mean to come off like that.

wolph commented 4 years ago

No worries, I'm happy to see that people are using it 👍

I'm definitely going to try and improve the results a bit. It's definitely a bit too messy in some cases, but the drawback of hiding results is that it can be tricky to "guess" the conversion

Disabling of items would be an option as well but I'm not sure what would be the best format. Alfred does offer environment variables as configuration options so that could work. I'll have to think about that for a bit

quantumgolem commented 4 years ago

Thank you! I definitely understand the complications and very much appreciate that you are willing to work with me to resolve this issue. I believe that you have fully understood my issue. There are no more things that you can help me with today. I rate the customer satisfaction 5/5 and would 10/10 rate to a friend. Sincere regards

wolph commented 3 years ago

I've disabled a bunch of units and added the option to specify a blacklist through the alfred variables.

If you add kelvin to that list you won't see it anymore :) image

Additionally, if the units are too large/small compared to your input it won't show them anymore. So no more femtometers :)

image

quantumgolem commented 3 years ago

That's excellent! Thanks a lot for the update!