Do you suggest I implement a spelling correction function against an
SRU interface through the x- feature or through a separate Web Service?
In other words, 2 x- || ! 2 x-, that is the question. :-)
By dumping all of the words in an index to a dictionary (like ASPELL),
I am able to filter SRU queries through the dictionary and suggest
alternative searches. The URL below points to a prototype of such a
function. It searches for the word "origami", returns a number of hits,
and suggests alternative spellings such as "kirigami" which is similar
to origami:
http://tinyurl.com/ds3ea
By applying the query to a thesaurus (WordNet), I can do the same thing
but get synonyms. Here is a search for "hemoglobin" and the
abbreviation "Hb" is suggested as an additional/alternative search:
http://tinyurl.com/ay9xg
Try this search for the word "dog":
http://tinyurl.com/9u5k4
To implement these functions through an SRU interface I could use the
x- feature and create a parameter called x-spell. The value for such a
parameter could be an integer denoting the verbosity of the spelling
function. 1 for a few suggestions. 3 for many. Similarly, I could
implement the synonym function by creating an x-synonym parameter and
use integers as values the same way.
Alternatively, I wonder whether or not I should implement the spelling
and synonym functions as separate Web Services. This way they could be
used in other applications more easily. For example, I could create a
Web Service that looks like this:
http://ockham.org/spell.cgi?term=origami&verbosity=1
Such a service could then return something like this:
<spell>
<term>dog</term>
<verbosity>1</verbosity>
<spellings>
<spelling>origem<spelling>
<spelling>irrigam<spelling>
<spelling>kirigami<spelling>
</spellings>
</spell>
The front-end to my index would submit an SRU query and wait for
results. In the meantime, my front-end would also consult the spelling
and/or synonym services for suggestions. The front-end would then
combine the results of the spelling, synonym, and SRU query, and
present them to the user accordingly.
I could get even trickier by using the x- parameter, but my SRU server
would consult a Web Service for the suggestions.
How do y'all suggest I implement these things? Should I turn a spelling
and synonym function into Web Services or not?
--
Eric Lease Morgan
University Libraries of Notre Dame
|