Text::Thesaurus::ISO - A class to handle ISO thesaurii
use Text::Thesaurus::ISO; $thes = new Text::Thesaurus::ISO; $thes->open("myisothesfile"); $thes->reopen("myisothesfile"); %entry = $thes->terminfo("dumpy"); @broaderterms = $thes->broader("dumpy"); @narrowerterms = $thes->narrower("dumpy"); $dateentered = $thes->dateentered("dumpy"); $datechanged = $thes->datechanged("dumpy"); @alternatives = $thes->alternatives("dumpy"); @sources = $thes->sources("dumpy"); @links = $thes->links("dumpy"); @scopenotes = $thes->scopenote("dumpy"); @historynotes = $thes->history("dumpy");
This module defines an abstract ROADS Thesaurus object and a number of methods that operate on these objects. These methods allow new Thesaurus objects to be created, specify what Thesaurus file to use, retrieve all the information from the thesaurus concerning a given term, find broader terms for a given term and find narrower terms for a given term.
This creates a new (empty) thesaurus object.
Opens an ISO thesaurus file specified by its single parameter. It also checks if the backend database exists for this file and if not, creates it.
Opens an ISO thesaurus file specified by its single parameter. This method always reindexes the ISO thesaurus file, and so should be called if the ISO thesaurus file has been changed since the last time the index was generated. Note that this call can be quite time consuming, especially on a large thesaurus file, so its probably best avoided in interactive systems (have a batch script that periodically updates the thesaurus indexes behind the scenes instead).
Takes a term (a word or phrase) and returns all the information for that term from its thesaurus record. The information is returned in a hash array keyed on the attribute name in the ISO thesaurus record (ie BT, TERM, UF, etc).
Takes a term and returns a list of all the broader terms for it.
Takes a term and returns a list of all the narrower terms for it.
Takes a thesaurus term as a parameter and returns the date that the term's record was entered into the thesaurus file. Returns an undef value if the term does not exist in the thesaurus file or if there is no entry date recorded.
Takes a thesaurus term as a parameter and returns the date that the term's record was last changed in the thesaurus file. Returns an undef value if the term does not exist in the thesaurus file or if there is no changed date recorded.
Takes a thesaurus term as a parameter and returns an array of alternative terms based on that.
Takes a thesaurus term as a parameter and returns an array of source statements that detail where the term was extracted from.
Takes a thesaurus term as a parameter and returns an array of links to other terms in the thesaurus.
Takes a thesaurus term as a parameter and returns an array of scope notes applying to that term. The scope notes often provide human readable descriptions of the term and the its limits.
Takes a thesaurus term as a parameter and returns an array of historical notes. These are usually human readable comments made when major changes have been made to the thesaurus that effect the specified term's entry.
None known of as yet. It is intended that more methods will be added in the future to specifically retreive various parts of the thesaurus record which will hopefully make the terminfo method obsolete. Also note that this version has only been tested against a single ISO thesaurus file (a demonstration version of the Art and Architecture Thesaurus) - feedback of bugs with other thesaurii are most welcome.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), and the European Commission Telematics for Research Programme.
Jon Knight <firstname.lastname@example.org> Martin Hamilton <email@example.com>