Posts Tagged firefox

Sinhala Spell Checker for Firefox

Update : I’ve changed the addon words list to “UCSC/LTRL Sinhala Corpus Beta“. This provides much more accuracy. Updated version is in the addons site. I’ll combine both word lists in the next version.

Sinhala language has been used in computers for a long time. In the beginning, it was simple ASCII fonts, replacing the English glyphs with sinhala letters. However, sinhala unicode came to play around in 2004. Around that time, we built a search engine converting ASCII text to unicode, so that it can search sinhala text written in any font. Actually, that’s how Paradox Software started. There were few blocks with rendering the unicode fonts, and people weren’t exactly using them. However, those problems are solved with newer releases and sinhala unicode is extensively used today.

You might have seen that there is a english to sinhala dictionary developed by UCSC Language Lab. It’s released under GPL as a firefox addon. Today, I extracted the words from the addon database and built a spell checker for firefox.

Following python code is used to extract the words from sqlite database :

#!/usr/bin/env python
import sqlite3
import re

conn = sqlite3.connect('en-si.db')
c = conn.cursor()
c.execute("select * from dict")
out = file("words","w")
for row in c:
  words = re.split(r"[ |]",row[1])
  for i in words:
    out.write(i.encode("utf8")+"\n")
out.close()

After that simply running, “cat words | uniq | sort > words.sorted” produced a sorted uniq list of words. The “affixcompress” tool comes with hunspell generated the affix rules file and I’ve placed some rules to support some common mistakes.

Sinhala Spell Checker Screenshot 1 Sinhala Spell Checker Screenshot 2

Install the addon from here. Once after you installed, you can right click a textbox, enable spell checking and select Sinhala as the language.

(Don’t ask me how සොක්කා got recommended for මඤ්ඤොක්කා)

Download the final source here

Tags: ,

Greasemonkey script for highlighting google results

Each individual on internet have their own browsing habits. For example, I have seen lot of people type the web address directly in the search box instead of the addressbar(If you look at the top searched queries, you can see yahoo.com, etc).

One of my browsing habits is to look for wikipedia articles. If it’s a movie, I look for imdb. So, instead of spending 1/2 seconds to go through results and analyze site address, i decided to write a simple greasemonkey script.

You can grab the script from here. If you have your own list of sites, you can simply edit the source(greasemonkey provides you a simple interface) and change the “sites” array.

Tags: , , ,

Free(dom) Software and Free Rice

Last week, proving one of the most effective open source successes, firefox hit 500+ million downloads. There are no arguments, they have definitely changed the world. Now, in honor of firefox downloads, they are going to change the world in another perspective by helping the Free Rice foundation.

Free Rice

Now, it’s your turn.

Tags: , ,

Fire(bug)

Note : Before you read this blog post, if you are a web developer/designer and you have never tried firebug, then stop all your work and try that.

As you might already know, the best tool to debug a web frontend is firebug. It’s really easy and efficient. When you get used to it, you can’t actually live without it.

I was working on a web project for several months now, and there was a very strange behavior on that site. Everytime I go there, firebug stops working. That’s very annoying specially when that site is AJAX (and when there are lot of bugs there ;) ).

Today, I found what makes firebug stop. I was using “parent” as a variable name. The site works perfectly with it but firebug didn’t manage to handle that.

Tags: , , ,

Test your site in internet explorer. Are you using IE Tab?

If you are a web developer/designer you should have surely checked your site in popular browsers. Specially if you are using css. I always used to use only firefox for the development stages and then later test the sites in IE. But after that i came to aware about the mozilla plugin “IE tab”, it became easier. I started to test the site with IE in the development stages. But recently Nayana have found out that IE doesn’t emulate the Internet Explorer exactly. I dont know what is happening there even when it is using same ActiveX control. However, if you are using IE tab, be careful – just a small warning.

Tags: ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes