A few years ago, when I was writing my PhD thesis, I was often confused on whether a particular word should have the indefinite article ‘a’ or ‘an’. We all know the rule of thumb that ‘an’ is for words beginning with vowels, but this rule is just a very crude approximation. In reality, it’s not the spelling of the word but its phonetics the one that determines the correct article.
Not being a native speaker, the phonetics rule was just as confusing, and looking up the information on the web wasn’t always straightforward. What or where are you supposed to search if you’re trying to find the correct article for ‘unifier’. Eventually I came up with this little trick to google for, e.g., "a unifier" and "an unifier" (with the quotes) and use the number of hits to find the most commonly used combination that, I hoped, was also likely to be the correct answer.
However, just eyeballing the number of hits quickly became unpractical. Being the geek I am, I ended up writing a bunch of scripts to extract potentially problematic nouns from my thesis document, and then look them up on the web using this trick to find errors. I always thought it would be nice to have a service like this on the web, but I never found the time (or the motivation) to actually do it.
But today in my spare time, and as some kind of therapy to relax (yes I’m that weird :P), I finally decided to implement a web version of this tool now available at: http://navarroj.com/aoran. For the moment you have a simple input box where you can check individual words. If there is enough interest, I might eventually implement another version with a larger text box to enter whole paragraphs and have them automatically checked for errors.
For the geek bits: I’m using the Yahoo! BOSS API to lookup the words on the web, and even find spelling suggestions. This is actually quite nice! It’s really a shame that Google doesn’t expose an API for their search as Yahoo! does.
By the way, do you know what is the correct article for unifier?
Mostrando las entradas con la etiqueta webapp. Mostrar todas las entradas
Mostrando las entradas con la etiqueta webapp. Mostrar todas las entradas
miércoles, 3 de marzo de 2010
lunes, 22 de febrero de 2010
Time Zone Calculator
As I plan for calls, meetings, or paper deadlines, I often find that I need to check and compare dates and times in different time zones.
When I had to do this, I would look up entries into websites or use some of the many time zone converters out there, clicking and scrolling to select time zones from large lists of cities. After a while, I got tired of this clicking around and I wished there was a way to just type my query into a search box, hit enter and get the result. You can, for example, google “time London” to figure out the current time in many cities around the world but, e.g. for planning meetings in the future, I needed more than that.
So eventually I sat down and hacked out my own Time Zone Calculator to do just that. Appart from boring queries such as “now”, you can also type “10:00pm from Berlin to Mexico”, or even more crazy things like “tomorrow noon from local to Seoul”. To set up your own local time write in the search box something like “here is Mexico”. All the input is typed into a single search box, making it convenient to save it as a quick search in Firefox or Chrome.
The geek bits: Parsing of the input is done with Perl's Date::Manip which allows the search box to understand many different ‘natural’ ways to input dates and times. Time zone conversion itself is done with the DateTime modules that take into account of all the tricky details such as daylight saving times and the like. To extend the amount of cities available, names of cities are geolocated using the Yahoo! Geolocation API, and then time zones obtained from GeoNames.
Feel free to leave feedback and report problems or errors in the comments section bellow.
When I had to do this, I would look up entries into websites or use some of the many time zone converters out there, clicking and scrolling to select time zones from large lists of cities. After a while, I got tired of this clicking around and I wished there was a way to just type my query into a search box, hit enter and get the result. You can, for example, google “time London” to figure out the current time in many cities around the world but, e.g. for planning meetings in the future, I needed more than that.
So eventually I sat down and hacked out my own Time Zone Calculator to do just that. Appart from boring queries such as “now”, you can also type “10:00pm from Berlin to Mexico”, or even more crazy things like “tomorrow noon from local to Seoul”. To set up your own local time write in the search box something like “here is Mexico”. All the input is typed into a single search box, making it convenient to save it as a quick search in Firefox or Chrome.
The geek bits: Parsing of the input is done with Perl's Date::Manip which allows the search box to understand many different ‘natural’ ways to input dates and times. Time zone conversion itself is done with the DateTime modules that take into account of all the tricky details such as daylight saving times and the like. To extend the amount of cities available, names of cities are geolocated using the Yahoo! Geolocation API, and then time zones obtained from GeoNames.
Feel free to leave feedback and report problems or errors in the comments section bellow.
Suscribirse a:
Entradas (Atom)