Thursday, January 28, 2010

Google and the natural language queries

A recent article about google's new feature of answering the questions by highlighting the answer is interesting.
This feature comes from the Google Squared. In simple terms Google Squared is just extracting pairs with relations. i.e an attribute and a value pair.

Does it understand our NL queries?
According to my understanding, as the tech behind this is google squared, if the attribute in the query or NL question is identified, then the problem
merely boils down to extracting the value for the attribute.
My guess, there is no such complete NL question understanding module.
Few examples I tried to come to this understanding:
Querying with
1. who is the president of india?
2. president of india who?
3. president of india
4. indian president

All of these queries resulted in the answer as Pratibha Patil. :)
But, when tried querying: Chief minister andhra pradesh, the answer was "YS Rajashekara Reddy" ;)
Perhaps, the current CM is not active enough and therefore is not talked much in the media. ;)

Is it trivial?
With so many Presidents available, picking out the current President is challenging i.e
ordering the set of presidents to get the most recent at the top.
Huh! The problem is not complex either. If one has an access to the news feeds from many sites, a simple term frequency based approach should order the set well.

A small flaw:
It seems the query to google is sniffed by the google squared module and returns the results and the results are appended in the first page.
This shows 11 search results on the first page.

Would love to hear your comments/views.

Saturday, January 2, 2010

Remove or clear the last login information in Linux

How to clear last login information in Linux?
Login information is stored in /var/log/lastlog
Deleting the contents of the file will remove the login information.
/var/log/lastlog is a binary file so opening it in an editor will show junk.
To read the contents of the file use lastlog

[praneeth@inferno ~]$ lastlog

Root permissions are needed to clear the login information.
Overwriting the /var/log/lastlog file is enough to clear the information.
[root@inferno ~]$ cat > /var/log/lastlog
CTRL+D