Hi Ted and Varada,
I haven't looked very deeply at what the all_words server actually does.
Actually, I'll confess... I'm not too familiar with the AllWords
project. I guess I've been focusing too much on TargetWord, that I
don't know what goes on inside AllWords. So, I don't know too much about
the "services" provided by the allwords_server. But if it is providing
a disambiguated version of a given string, then it has all of the same
merits of the similarity_server... and would be a useful utility within
the AllWords package.
So, I was just looking over the server code to get a sense of what it
does, and one thing that struck me about the code was that the server
rarely ever "dies" on an error. For example, creating a
WordNet::QueryData object should result in a fatal error, if the object
does not get successfully created for any reason, but there is only an
error message printed, and the code moves on:
$qd ? print LFH "\nWordNet::QueryData object sucessfully created" :print LFH "\nCouldn't construct WordNet::QueryData object";
Similarly, with the WordNet::SenseRelate::Tools object:
$wn ? print LFH "\nWordNet::SenseRelate::Tools object sucessfully created" :print LFH "\nCouldn't construct WordNet::SenseRelate::Tools object";
And then the socket creation:
$sock ? print LFH "\nSocket created with following details \nLocalHost => $localhost\nLocalPort => $localport\nProto => $proto" : print LFH "\nCould not create socket: $!\n";
In my mind, all of these should be fatal errors, and should stop the
server right there. But the program just prints the error, and moves on.
One other thing that I didn't quite understand was the utility of the
if($argument eq 'stop')
die "Server Stopped sucessfully";
This seems to kill the server right at the beginning... but that seems
quite weird. I can't see where one might use something like this.
But anyway, I do think that this server can also be quite a useful
utility, and could be used for more things than just the web interface.
I'll think about this server some more, and share any neat things we
could do with the server.
On Sun, 2008-04-13 at 09:29 -0500, Ted Pedersen wrote:
> Hi Sid and Varada,
> So the new design of similarity_server.pl has me thinking quite a bit
> about the AllWords
> web interface, which is in some sense a spin off of the
> WordNet-Similarity web interface.
> There is a program as a part of that called allwords_server.pl that
> sits in the cgi-bin directory,
> and in general things are structured much as they were in the
> WordNet-Similarity setup.
> I do think it makes sense to have allwords_server.pl evolve as
> similarity_server.pl does, and
> I guess what I'm wondering iif allwords_server.pl should remain as a
> kind of "clone" of
> similarity_server.pl, or if the AllWords interface should directly use
> This might be one of those cases where I'm asking a question before I
> know enough about it
> to realize the question has an obvious answer one way or the other,
> but, I guess I thought
> I would ask the question just to expose my thought processes here, and
> see if you can
> help me understand better how things do and should work.
> I do think that many of the advantages Sid mentioned about the new
> program could be useful for allwords_server.pl, that is it would be
> great if we could have
> multiple versions of AllWords running, in fact right now we have been
> using a development
> machine and a production machine, but if we could actually have both a
> development and
> production version running on the same machine, that would really
> simplify things quite
> a bit.
> I suspect that it might be that allwords_server.pl needs to be a
> clone, in that it's actually
> taking sentences from a user and processing them with the AllWords
> algorithm on the
> server and then returning the results to the client....the
> WordNet-Similarity interface is of
> course taking word pairs from the user and getting back a measurement
> of their similarity,
> so while they are related, I guess what we have running on the
> allwords_server.pl is the
> disambiguation algorithm, which includes the use of
> WordNet-Similarity, but that is
> from a version installed on the server, but not running as a server.
> (Varada, please do feel
> free to correct me if I'm wrong about that...)
> So, these are close enough where I think there is a discussion of some
> kind worth having,
> although I'm not sure exactly what it is.....
> I guess I'm wondering something like this - suppose you want to create
> a web application like
> AllWords, which certainly uses WordNet-Similarity, but it also does
> more than what WordNet-
> Similarity provides. What's the best way to structure that, such that
> we avoid duplicating code
> and that we take best advantage of what is already there.
> My main concern about allwords_server.pl as a "clone" - meaning that
> we took similarity_server.pl
> as a starting point and then hacked on it (in a good sense :) to where
> it became a disambiguation
> server rather than a similarity server, is that as
> similarity_server.pl evolves we probably want to
> evolve along with it, and I'd like that process to be as painless as possible.
> So, any thoughts on the specific issue of how AllWords could/should
> use WordNet-Similarity
> would be most appreciated, and then perhaps on the more general issue
> of how applications in
> general could/should take advantage of similarity_server.pl and
> WordNet-Similarity would also
> be very interesting indeed.
> And again, please do understand that this is just intended to get some
> discussion going, and also
> to try and better understand the potential of web applications that
> use WordNet-Similarity, how
> should we build them, what can we do with them, etc.