WikiHome has been setup
Hi, after procrastinating a lot on this, I've finally managed to set up the WikiHome for the project (here's the link: http://code.google.com/p/vaani/wiki/WikiHome).
Again thanks to my mentor, Stephen Shaw for the final push yesterday. The wiki is minimal now, but I hope it'll grow like all Wiki do :)
The changelog is on its way too.
Btw two good news-
1. Netbeans 6.7 has released which promises some good collaborative features.
2. I've set up Google Analytic for the http://code.google.com/p/vaani
Tuesday, June 30, 2009 | 2 Comments
Using D-Bus in Java
I think one of the most fun things I've got to learn during Summer of Code is d-bus. I had to learn it to open instant message conversations in the Pidgin module. And I guess I can present a noobish tutorial to do something simple in Java using d-bus. Before you start, you can refer to this excellent manual here.
Pre-requisites-
1. you need JVM and JDK (the version I used was openJDK 1.6 taken from the standard repository)
2. dbus-java (which requires you to install libmatthew as well).
The task at hand is to make an empty note in Tomboy using a java program.
Step-1 Extend the required interface for the function you're looking to implement (you can use a software called d-feet which can help you analyze various buses, object paths and interface names)
package org.gnome.Tomboy;
import org.freedesktop.dbus.DBusInterface;
import org.freedesktop.dbus.DBusInterfaceName;
/**
*
* @author sourcemorph
*/
@DBusInterfaceName("org.gnome.Tomboy.RemoteControl")
public interface RemoteControl extends DBusInterface {
public String CreateNote();
}
[The annotation is important, and you need to mention the corresponding object path of the interface you're extending, here I have declared just one function that we needed, but you can choose from the available functions from d-feet].
Step-2 Write a main class to get an object of this interface type and execute the function.
/**
*
* @author sourcemorph
*/
import org.freedesktop.dbus.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
import org.gnome.Tomboy.RemoteControl;
public class NewClass {
private static String ObjectPath = "/org/gnome/Tomboy/RemoteControl";
private static String ServiceBusName = "org.gnome.Tomboy";
private static DBusConnection conn;
public NewClass() {
try {
conn = DBusConnection.getConnection(DBusConnection.SESSION);
RemoteControl c = (RemoteControl) conn.getRemoteObject(ServiceBusName, ObjectPath);
c.CreateNote();
} catch(DBusException ex) {
ex.printStackTrace();
}
}
public static void main(String [] args) {
NewClass n = new NewClass();
}
}
Fairly simple. By the way its something really admirable about D-Bus because now my Java code can interact with processes which could have been coded in C sharp, Python etc. I am going to call methods on the Pidgin interface through Java code, and learning D-Bus was totally worth the effort.
PS: thanks to my mentor Stephen Shaw for patiently referring me to the README files when dbus-java wasn't compiling.. :) and also for d-feet, its awesome!
Sunday, June 28, 2009 | 2 Comments
Blah blah...
I was reading this book today ("Speech and Language Processing - An Introduction to Natural Language Processing and Computational Linguistics and Speech Recognition" by Daniel Jurafsky & James H. Martin) and would like to share a few interesting tid bits I gathered in the opening chapter..
1. "... regardless of what people believe or know about the inner workings of computers, they talk about them and interact with them as social entities. People act towards computers as if they were people, they are polite to them, treat them as team members, and expect among other things that computers should be able to understand their needs, and be capable of interacting with them naturally" [doesn't that make my job simpler, this software should only understand polite commands and not the rude, mean ones :P ]
2. ELIZA (probably the first cool NLP application, written back in 1966) actually managed to fool people into believing that it were a Rogerian psychotherapist by simply rephrasing sentences inputted by them.
"ELIZA's deep relevance to Turing's ideas is that many people who interacted with ELIZA came to believe that it really understood them and their problems. Indeed, Weizenbaum (1976) notes that many of these people continued to believe in ELIZA's abilities even after the program's operation was explained to them."
[check this for a sample conversation with ELIZA : http://www.stanford.edu/group/SHR/4-2/text/dialogues.html]
The future looks all hunky dory, doesn't it...
Btw my firefox too is showing some signs of being talkative, the last I heard was
"
(firefox:19328): Gdk-WARNING **: XID collision, trouble ahead
(firefox:19328): Gdk-WARNING **: XID collision, trouble ahead
(firefox:19328): Gdk-WARNING **: XID collision, trouble ahead
"
Sunday, June 14, 2009 | 0 Comments
"Vaani", new project started
Hi, after a week of contemplation (:P), when my laptop was away with the nice service center guys (:D) , I finally figured out that "vaani" (means sound in Hindi) seems to be a cool enough title. The project has been hosted at code.google.com/p/vaani, and part of the initial code has been uploaded. You can check it out using svn (though its in considerably bad shape right now).
The package structure is--
1. sourcemorph.nlp.vaani -- for this project
2. sourcemorph.nlp.shabd -- for nl text to bash command ("shabd" means word in Hindi)
3. sourcemorph.nlp.swar -- for speech to nl text ("swar" roughly means voice in Hindi).
Wednesday, June 03, 2009 | 0 Comments