NAME

Thesaurus - Perl extension for Thesaurus manipulation


SYNOPSIS

  use Thesaurus;
  $thesaurus = 
     Thesaurus->connect('dbi:mysql:database:some.host.org/thesaurus of choice')
  $keyword = $thesaurus->keyword('foo');
  $,="\n";
  print $keyword,
        $keyword->description,
        "Broader Terms",
        $keyword->bt;


DESCRIPTION

This module is designed to form a consistant method package for accessing various networked thesauri. The idea is that applications can connect to various implementations of thesauri and not care about how they are stored on the remote system, there are three drivers written, one for DBI databases, one for connecting via telnet to the Library of Congress Subject Headings, and one for selection lists, which are basically just lists of words.

Description of creating drivers will wait until someone would actually want to create one. If you want to use the DBI driver, you must have some DBI/DBD database setup. If you want to use the LCSH or LIV you must have Comm.pl.


Objects

Thesaurus
This object represents the thesaurus to which you've connected. If you do a ref($thesaurus) you will see something different, like b<DBI_Thesaurus> or b<LCSH>, etc. These all have Thesaurus as a superclass, so write you're new methods in that package.

Thesaurus::Term
This object represents a generic Term from the thesaurus. Keyword,SA,XREF are all Term objects.

Thesaurus::Keyword;
This object contains thesaurus keywords.

Thesaurus::SA;
This object contains thesaurus See Also's.

Thesaurus::XREF;
This object contains thesaurus cross references.

Thesaurus Methods

connect
This method connects with the thesaurus. Database Thesauri are identified with DBI style connections with the thesaurus name pathed onto the end -- (dbi:mysql:database:host.name:port/thesaurus). The LCSH thesaurus and SelectList is a URL style name (LCSH://host.name:port/thesaurus)

host.name
Is the host having the database. Not used with selectlist.

port
The port to connect. Not used for SelectList

database
The name of the database to connect. Used in DBI_Thesaurus only. For Select lists, this is used to differentiate more than one select list in use.

thesaurus
The thesaurus to use. The DBI_Thesaurus method allows multiple thesauri in a single database.

descriptor
name
writable
definition
keywords
xrefs
keywords_and_xrefs
keyword
xref
keyword_or_xref
roots
delete
insert

Thesaurus::Term Methods

new
thesaurus
qq// representation

Thesaurus::Keyword Methods

keyword
pn
cn
hn
bt
nt
rt
uf
lt

Thesaurus::XREF Methods

use

AUTHOR

Quinn Hart, qjhart@ucdavis.edu

SEE ALSO

perl(1) msql(1) DBI.pm Comm.pl thesaurus.cgi.