Biblio::Thesaurus::SQLite - Perl extension for managing ISO thesaurs into a SQLite database
use Biblio::Thesaurus::SQLite; ISOthe2TheSql('thesaurus', 'dbfile'); TheSql2ISOthe('dbfile', 'output_file'); getTermAsXHTML('term', 'dbfile'); getTermAsISOthe('term', 'dbfile'); getTermAsPerl('term', 'dbfile'); setTerm('term', 'rel', 'definition', 'dbfile'); deleteTerm('term', 'rel', 'definition'); changeTerm('term', 'oldrel', 'olddef', 'newrel', 'newdef', 'dbfile');
This module provides transparent methods to maintain Thesaurus files in a backend SQLite database. The module uses a subset from ISO 2788 which defines some standard features to be found on thesaurus files. The module also supports multilingual thesaurus and some extensions to the ISOs standard.
This method reads a ISO thesaurus ASCII file, and converts it to a SQLite database, stored on 'DBFILE'.
WARNING: This method will erase any existing DB with DBFILE filename
This method dumps the SQLIte thesaurus database DBFILE to a file THESAURUS, and tries to write a beautiful (or not) ISO thesaurus format.
Search in the database for info about this term and outputs it in the following FORMAT:
Usefull (or not yet) to use in CGI modules. A simple table is used to write the output of the query.
Tries to output the info about the term in a ISO Thesaurus text format.
Constructs a Perl structure (see the "picture" below) and outputs the text representation of it using the Data::Dumper format
ovo => { NT => [_, _, _] SN => [_, _, _] }
This method tries to blindly add information about the term into the SQLite database... Much work to be done here...
This simple deletes the TERM with the RELATION and DEFINITION from the database
Given the relation and the definition to delete, and the new relation/definition to insert into the database, this method tries to do just that! (but it's really really primitive right now...)
This module should be extended to work with *any* DBI class, not just a SQLite one. Also, it should check and try to correct incongruences that ca happen loading, adding, changing or deleting a term.
Of course, it needs better docs too :P
For now, please contact me using my email. In the future, I'll find something better (I'm still getting used to RT).
perl(1), Data::Dumper(3x), Biblio::Thesaurus(3x), DBIx::Simple(3x)
Ruben Fonseca, <fonseka@gmail.com>
Copyright (C) 2005 by krani1
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Biblio::Thesaurus::SQLite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Biblio::Thesaurus::SQLite
CPAN shell
perl -MCPAN -e shell install Biblio::Thesaurus::SQLite
For more information on module installation, please visit the detailed CPAN module installation guide.