Tuesday, October 25, 2011

MySQL Soundex on Tamil

Just out of curiosity I was applying the mysql soundex function on some Tamilish terms, it was a bit of surprise to see it give good results for Tamil searches. Look below for a small sample,

mysql> select name, soundex(name) as encoded_value from song;

+-----------------+---------------+
| name            | encoded_value |
+-----------------+---------------+
| thamila thamila | T54354        |
| chotta chotta   | C323          |
| ennenna seidhom | E5235         |
+-----------------+---------------+


Now trying the terms with slight spelling deviations came close to the values!


mysql> select soundex("tamila tamila");

+--------------------------+
| soundex("tamila tamila") |
+--------------------------+
| T54354                   |
+--------------------------+




mysql> select soundex("enena saidom");
+-------------------------+
| soundex("enena saidom") |
+-------------------------+
| E5235                   |
+-------------------------+




mysql> select soundex("sotta sotta");
+------------------------+
| soundex("sotta sotta") |
+------------------------+
| S323                   |
+------------------------+





Not bad yar!

No comments:

Post a Comment