Jetpack: Showing Search Terms in Awesomebar
Posted: June 20, 2010 Filed under: mozilla, Uncategorized 4 Comments »Note: this is not about searching from the awesomebar.
The awesomebar is one of my favorite things about Firefox. Especially compared to alternatives in other browsers – the awesomebar remains the fastest way for me to find where I want to go. Sometimes a site’s url and title aren’t enough to jog my memory however. At some point I wished Firefox would do full-text indexing for me. Then I realized that Google was already doing that, and there might be a way to hijack that power – by remembering what search terms you used to find the site and displaying that in the awesomebar. You can’t really get better than search terms, they put the value a site gives in your own words. Of course, you might find the site valuable for other things after viewing it, then you have no real choice but to manually tag it (or do you?).
I made a quick extension with Jetpack to do just that, implemented in the simplest possible way. It parses the referrer for ‘q=’, and appends that to the page’s user-set title (which is matched on in the awesomebar). It can be very helpful, but it was less helpful than I thought. It would be more helpful if the referrer persisted across link navigation, the referrer didn’t terminate after #, and more sites used ‘q’ to hold the query, but it was an interesting experiment, and I’d love to see more experiments in Firefox inferring tags for webpages.
Jetpack impressions
I enjoyed using the new Jetpack SDK, I’m a big fan. It took more than a couple minutes to get started but the docs were excellent and I love the CommonJS. I had to bust out the Cc but that’s just because the Places API isn’t quite ready yet. I only had to write 42 lines of code. I can confidently say I won’t be making a ‘regular’ addon again.
Javascript Neural Networks
Posted: June 7, 2010 Filed under: Uncategorized | Tags: javascript, neural networks 15 Comments »There are tons of neural network implementations out there, but not many in JavaScript. This is pretty surprising given that JavaScript is awesome and neural networks could really benefit from being in the browser. One partial implementation was used to do some sweet Captcha OCR, and my last post was about using them to determine whether to display black or white text over a given background color.
I ended up creating brain, the missing JavaScript neural network library. I tried to make it easy to use. To use it you don’t have to know what a hidden layer is (but you can specify hidden layers if you want), you can also specify input (and expected output, for training) as hashes instead of arrays – good for sparse or labelled input, and you can pass trained networks around in JSON, which is useful with Worker threads.
If you want to find out more using neural networks from a programmatic perspective, this is a good introduction that just popped up.
