NAME
similarity_server.pl - The WordNet::Similarity server.
DESCRIPTION
This script implements the backend of the web interface for WordNet::Similarity.
This script listens to a port waiting for a request form similarity.cgi or wps.cgi. The client script sends a message to this script as series of queries (see QUERY FORMAT). After all the queries, the client sends a message containing only CRLF (carriage-return line-feed, or \015\012).
The server (this script) responds with the results (see MESSAGE FORMAT) terminated by a message containing only CRLF.
Example:
Client:
g car#n#1CRLF
CRLF
Sever responds:
g car#n#1 4-wheeled motor vehicle; usually propelled by an internal
combustion engine; "he needs a car to get to work"CRLF
CRLF
QUERY FORMAT
<CRLF> means carriage-return line-feed "\r\n" on Unix, "\n\r" on Macs, \015\012 everywhere and anywhere (i.e., don't use \n or \r, use \015\012).
The queries consist of messages in the following formats:
s <word1> <word2><CRLF> - server will return all senses of word1 and
word2
g <word><CRLF> - server will return the gloss for each synset to which
word belongs
r <wps1> <wps2> <measure> <etc...><CRLF> - server will return the
relatedness of wps1 and wps2 using measure.
v <CRLF> - get version information
MESSAGE FORMAT
The messages sent from this server will be in the following formats:
! <msg><CRLF> - indicates an error or warning
g <wps> <gloss><CRLF> - the gloss of wps
r <wps1> <wps2> <score><CRFL> - the relatedness score of wps1 and wps2
t <msg><CRLF> - the trace output for the previous relatedness score
s <wps1> <wps2> ... <wpsN><CRLF> - a synset
v <package> <version number><CRLF> - the version of 'package' being used
AUTHORS
Ted Pedersen, University of Minnesota Duluth
tpederse at d.umn.edu
Jason Michelizzi, University of Minnesota Duluth
mich0212 at d.umn.edu
BUGS
None known.
COPYRIGHT
Copyright (c) 2005, Ted Pedersen and Jason Michelizzi
This program is free software; you may redistribute and/or modify it under the terms of the GNU General Public License version 2 or, at your option, any later version.