.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Biblio::Thesaurus 3pm" .TH Biblio::Thesaurus 3pm "2021-01-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Biblio::Thesaurus \- Perl extension for managing ISO thesaurus .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Biblio::Thesaurus; \& \& $obj = thesaurusNew(); \& $obj = thesaurusLoad(\*(Aqiso\-file\*(Aq); \& $obj = thesaurusRetrieve(\*(Aqstorable\-file\*(Aq); \& $obj = thesaurusMultiLoad(\*(Aqiso\-file1\*(Aq,\*(Aqiso\-file2\*(Aq,...); \& \& $obj\->save(\*(Aqiso\-file\*(Aq); \& $obj\->storeOn(\*(Aqstorable\-file\*(Aq); \& \& $obj\->addTerm(\*(Aqterm\*(Aq); \& $obj\->addRelation(\*(Aqterm\*(Aq,\*(Aqrelation\*(Aq,\*(Aqterm1\*(Aq,...,\*(Aqtermn\*(Aq); \& $obj\->deleteTerm(\*(Aqterm\*(Aq); \& \& $obj\->isDefined(\*(Aqterm\*(Aq); \& \& $obj\->describe( { rel=\*(AqNT\*(Aq, desc="Narrow Term", lang=>"UK" } ); \& \& $obj\->addInverse(\*(AqRelation1\*(Aq,\*(AqRelation2\*(Aq); \& \& $obj\->order(\*(Aqrela1\*(Aq, \*(Aqrel2\*(Aq, ....); \& @order = $obj\->order(); \& \& $obj\->languages(\*(Aql1\*(Aq, \*(Aql2\*(Aq, ....); \& @langs = $obj\->languages(); \& \& $obj\->baselang(\*(Aql\*(Aq); \& $lang = $obj\->baselang(); \& \& $obj\->topName(\*(Aqterm\*(Aq); \& $term = $obj\->topName(); \& \& $html = $obj\->navigate(+{configuration},%parameters); \& \& $html = $obj\->getHTMLTop(); \& \& $output = $obj\->downtr(\e%handler); \& $output = $obj\->downtr(\e%handler,\*(Aqterm\*(Aq, ... ); \& \& $obj\->appendThesaurus("iso\-file"); \& $obj\->appendThesaurus($tobj); \& \& $obj\->tc(\*(Aqterm\*(Aq, \*(Aqrelation1\*(Aq, \*(Aqrelation2\*(Aq); \& $obj\->depth_first(\*(Aqterm\*(Aq, 2, "NT", "UF") \& \& $latex = $obj\->toTex( ...) \& $xml = $obj\->toXml( ...) .Ve .SH "ABSTRACT" .IX Header "ABSTRACT" This module provides transparent methods to maintain Thesaurus files. The module uses a subset from \s-1ISO 2788\s0 which defines some standard features to be found on thesaurus files. The module also supports multilingual thesaurus and some extensions to the ISOs standard. .SH "DESCRIPTION" .IX Header "DESCRIPTION" A Thesaurus is a classification structure. We can see it as a graph where nodes are terms and the vertices are relations between terms. .PP This module provides transparent methods to maintain Thesaurus files. The module uses a subset from \s-1ISO 2788\s0 which defines some standard features to be found on thesaurus files. This \s-1ISO\s0 includes a set of relations that can be seen as standard but, this program can use user defined ones. So, it can be used on \s-1ISO\s0 or not \s-1ISO\s0 thesaurus files. .SH "File Structure" .IX Header "File Structure" Thesaurus used with this module are standard \s-1ASCII\s0 documents. This file can contain processing instructions, comments or term definitions. The instructions area is used to define new relations and mathematical properties between them. .PP We can see the file with this structure: .PP .Vb 10 \& _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ \& | | \& | HEADER | \-\-> Can contain, only, processing instructions, \& |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_| comment or empty lines. \& | | \& | Def Term 1 | \-\-> Each term definition should be separated \& | | from each other with an empty line. \& | Def Term 2 | \& | | \& | ..... | \& | | \& | Def Term n | \& |_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_| .Ve .PP Comments can appear on any line. Meanwhile, the comment character (\fB#\fR) should be the first character on the line (with no spaces before). Comments line span to the end of the line (until the first carriage return). .PP Processing instructions lines, like comments, should start with the percent sign (\fB%\fR). We describe these instructions later on this document. .PP Terms definitions can't contain any empty line because they are used to separate definitions from each other. On the first line of term definition record should appear the defined term. Next lines defines relations with other terms. The first characters should be an abbreviation of the relation (on upper case) and spaces. Then, should appear a comma separated list of terms. .PP There can be more than one line with the same relation. Thesaurus module will concatenate the lists. If you want to continue a list on the next line you can repeat the relation term of leave some spaces between the start of the line and the terms list. .PP Here is an example: .PP .Vb 5 \& Animal \& NT cat, dog, cow \& fish, ant \& NT camel \& BT Life being \& \& cat \& BT Animal \& SN domestic animal to be kicked when \& anything bad occurs. .Ve .PP There can be defined a special term (\f(CW\*(C`_top_\*(C'\fR). It should be used when you want a top tree for thesaurus navigation. So, we normally define the \f(CW\*(C`_top_\*(C'\fR term with the more interesting terms to be navigated. .PP The \fB\s-1ISO\s0\fR subset used are: .IP "\fB\s-1TT\s0\fR \- Top Term" 4 .IX Item "TT - Top Term" The broadest term we can define about the current term. .IP "\fB\s-1NT\s0\fR \- Narrower Term" 4 .IX Item "NT - Narrower Term" Terms more specific than current term. .IP "\fB\s-1BT\s0\fR \- Broader Term" 4 .IX Item "BT - Broader Term" More generic terms than current term. .IP "\fB\s-1USE\s0\fR \- Synonym" 4 .IX Item "USE - Synonym" Another chances when finding a Synonym. .IP "\fB\s-1UF\s0\fR \- Quasi-Synonym" 4 .IX Item "UF - Quasi-Synonym" Terms that are no synonyms of current term but can be used, sometimes with that meaning. .IP "\fB\s-1RT\s0\fR \- Related Term" 4 .IX Item "RT - Related Term" Related term that can't be inserted on any other category. .IP "\fB\s-1SN\s0\fR \- Scope Note" 4 .IX Item "SN - Scope Note" Text. Note of context of the current term. Use for definitions or comments about the scope you are using that term. .SS "Processing Instructions" .IX Subsection "Processing Instructions" Processing instructions, as said before, are written on a line starting with the percent sign. Current commands are: .IP "\fBtop\fR" 4 .IX Item "top" When presenting a thesaurus, we need a term, to know where to start. Normally, we want the thesaurus to have some kind of top level, where to start navigating. This command specifies that term, the term that should be used when no term is specified. .Sp Example: .Sp .Vb 1 \& %top Contents \& \& Contents \& NT Biography ... \& RT ... .Ve .IP "\fBenc\fRoding" 4 .IX Item "encoding" This command defines the encoding used in the thesaurus file. .Sp Example: .Sp .Vb 1 \& %enc utf8 .Ve .IP "\fBinv\fRerse" 4 .IX Item "inverse" This command defines the mathematic inverse of the relation. That is, if you define \f(CW\*(C`inverse A B\*(C'\fR and you know that \f(CW\*(C`foo\*(C'\fR is related by \f(CW\*(C`A\*(C'\fR with \f(CW\*(C`bar\*(C'\fR, then, \f(CW\*(C`bar\*(C'\fR is related by \f(CW\*(C`B\*(C'\fR with \f(CW\*(C`foo\*(C'\fR. .Sp Example: .Sp .Vb 2 \& %inv BT NT \& %inverse UF USE .Ve .IP "\fBdesc\fRription" 4 .IX Item "description" This command defines a description for some relation class. These descriptions are used when outputting thesaurus on \s-1HTML.\s0 .Sp Example: .Sp .Vb 2 \& %desc SN Note of Scope \& %description IOF Instance of .Ve .Sp If you are constructing a multilingual thesaurus, you will want to translate the relation class description. To do this, you should use the \f(CW\*(C`description\*(C'\fR command with the language in from of it: .Sp .Vb 2 \& %desc[PT] SN Nota de Contexto \& %description[PT] IOF Instancia de .Ve .IP "\fBext\fRernals" 4 .IX Item "externals" This defines classes that does not relate terms but, instead, relate a term with some text (a scope note, an url, etc.). This can be used like this: .Sp .Vb 2 \& %ext SN URL \& %externals SN URL .Ve .Sp Note that you can specify more than one relation type per line. .IP "\fBlang\fRuages" 4 .IX Item "languages" This other command permits the construction of a multilingual thesaurus. \s-1TO\s0 specify languages classifiers (like \s-1PT, EN, FR,\s0 and so on) you can use one of these lines: .Sp .Vb 2 \& %lang PT EN FR \& %languages PT EN FR .Ve .Sp To describe (legend) the language names, you should use the \fBdescription\fR command, so, you could append: .Sp .Vb 3 \& %description PT Portuguese \& %description EN English \& %description FR French .Ve .IP "\fBbaselang\fRuage" 4 .IX Item "baselanguage" This one makes it possible to explicitly name the base language for the thesaurus. This command should be used with the \f(CW\*(C`description\*(C'\fR one, to describe the language name. Here is a simple example: .Sp .Vb 2 \& %baselang PT \& %languages EN FR \& \& %description PT Portuguese \& %description EN English \& %description FR French .Ve .SS "I18N" .IX Subsection "I18N" Internationalization functions, \f(CW\*(C`languages\*(C'\fR and \f(CW\*(C`setLanguage\*(C'\fR should be used before any other function or constructor. Note that when loading a saved thesaurus, descriptions defined on that file will be not translated. That's important! .PP .Vb 1 \& interfaceLanguages() .Ve .PP This function returns a list of languages that can be used on the current Thesaurus version. .PP .Vb 1 \& interfaceSetLanguage( ) .Ve .PP This function turns on the language specified. So, it is the first function you should call when using this module. By default, it uses Portuguese. Future version can change this, so you should call it any way. .SH "API" .IX Header "API" This module uses a perl object oriented model programming, so you must create an object with one of the \f(CW\*(C`thesaurusNew\*(C'\fR, \f(CW\*(C`thesaurusLoad\*(C'\fR or \&\f(CW\*(C`thesaurusRetrieve\*(C'\fR commands. Next commands should be called using the \fB\s-1OO\s0\fR fashion. .SH "Constructors" .IX Header "Constructors" .SS "thesaurusNew" .IX Subsection "thesaurusNew" To create an empty thesaurus object. The returned newly created object contains the inversion properties from the \s-1ISO\s0 classes and some stub descriptions for the same classes. .SS "thesaurusLoad" .IX Subsection "thesaurusLoad" To use the \f(CW\*(C`thesaurusLoad\*(C'\fR function, you must supply a file name. This file name should correspond to the \s-1ISO ASCII\s0 file as defined on earlier sections. It returns the object with the contents of the file. If the file does not defined relations and descriptions about the \s-1ISO\s0 classes, they are added. .PP Also, .PP .Vb 1 \& $obj = thesaurusLoad({ completed => 1}, \*(Aqiso\-file\*(Aq); .Ve .PP can be used to say that the thesaurus needs \fBnot\fR to be complete after load. .SS "thesaurusMultiLoad" .IX Subsection "thesaurusMultiLoad" You can join different thesaurus \s-1ISO\s0 files using this function: .PP .Vb 1 \& $obj = thesaurusMultiLoad(\*(Aqiso\-file1\*(Aq,\*(Aqiso\-file2\*(Aq,...); .Ve .SS "appendThesaurus" .IX Subsection "appendThesaurus" You can also append a thesaurus \s-1ISO\s0 (or another thesaurus object) to a loaded thesaurus. For that, use one of: .PP .Vb 2 \& $obj\->appendThesaurus("iso\-file"); \& $obj\->appendThesaurus( $other_thesaurus_object ); .Ve .SS "thesaurusLoadM" .IX Subsection "thesaurusLoadM" This method is used to load a thesaurus on the meta-thesaurus format. This is still under development. .SS "thesaurusRetrieve" .IX Subsection "thesaurusRetrieve" Everybody knows that text access and parsing of files is not efficient. So, this module can save and load thesaurus from Storable files. This function should receive a file name from a file which was saved using the \f(CW\*(C`storeOn\*(C'\fR function. .SH "Methods" .IX Header "Methods" .SS "save" .IX Subsection "save" This method dumps the object on an \s-1ISO ASCII\s0 file. Note that the sequence \f(CW\*(C`thesaurusLoad\*(C'\fR, \f(CW\*(C`save\*(C'\fR is not the identity function. Comments are removed and processing instructions can be added. To use it, you should supply a file name. .PP Note: if the process fails, this method will return 0. Any other method die when failing to save on a file. .SS "meta2str" .IX Subsection "meta2str" This method returns the \s-1ISO\s0 ascii description of the metadata. .SS "storeOn" .IX Subsection "storeOn" This method saves the thesaurus object in Storable format. You should use it when you want to load with the \f(CW\*(C`thesaurusRetrieve\*(C'\fR function. .SS "addTerm" .IX Subsection "addTerm" You can add terms definitions using the perl \s-1API.\s0 This method adds a term on the thesaurus. Note that if that term already exists, all its relations will be deleted. .SS "all_terms" .IX Subsection "all_terms" Returns an array with all terms for the thesaurus base language. \&\s-1NOTE:\s0 this function is deprecated. Use allTerms instead. .SS "allTerms" .IX Subsection "allTerms" Returns an array with all terms for the thesaurus base language. .SS "topName" .IX Subsection "topName" Returns the term in the top of the thesaurus, or defined a new one if called with an argument. .SS "top_name" .IX Subsection "top_name" Deprecated. See \f(CW\*(C`; .SS "addRelation" .IX Subsection "addRelation" To add relations to a term, use this method. It can be called again and again. Previous inserted relations will not be deleted. This method can be used with a list of terms for the relation like: .PP .Vb 1 \& $obj\->addRelation(\*(AqAnimal\*(Aq,\*(AqNT\*(Aq,\*(Aqcat\*(Aq,\*(Aqdog\*(Aq,\*(Aqcow\*(Aq,\*(Aqcamel\*(Aq); .Ve .PP Note: After you add a big amount of relations, autocomplete the thesaurus using the \f(CW$obj\fR\->\fBcomplete()\fR method. Completing after each relation addiction is time and cpu consuming. .SS "hasRelation" .IX Subsection "hasRelation" Checks if a specific relation exists in the Thesaurus: .PP .Vb 1 \& if ($obj\->hasRelation(\*(AqAnimal\*(Aq,\*(AqNT\*(Aq,\*(Aqcat\*(Aq)) { ... } .Ve .PP You can check if a term has a relation \*(L"X\*(R" with anything: .PP .Vb 1 \& if ($obj\->hasRelation(\*(AqAnimal\*(Aq,\*(AqSN\*(Aq)) { ... } .Ve .SS "deleteRelation" .IX Subsection "deleteRelation" .Vb 1 \& $obj\->deleteRelation(\*(AqAnimal\*(Aq,\*(AqNT\*(Aq,\*(Aqcat\*(Aq,\*(Aqdog\*(Aq,\*(Aqcow\*(Aq,\*(Aqcamel\*(Aq); .Ve .SS "deleteTerm" .IX Subsection "deleteTerm" Use this method to remove all references of the term supplied. Note that \fBall\fR references will be deleted. .SS "describe" .IX Subsection "describe" You can use this method to describe some relation class. You can use it to change the description of an existing class (like the \s-1ISO\s0 ones) or to define a new class. .SS "isDefined" .IX Subsection "isDefined" Use this method to check if a term exists in the thesaurus. .SS "setExternal" .IX Subsection "setExternal" Use this method to define that a relation is \*(L"extern\*(R". .SS "isExternal" .IX Subsection "isExternal" Use this method to check if a relation is \*(L"extern\*(R". .SS "isLanguage" .IX Subsection "isLanguage" Use this method to check if a relation is a Language. .SS "getdefinition" .IX Subsection "getdefinition" Deprecated. Use \f(CW\*(C`navigate(%arg); .Ve .PP This method can receive, as first argument, a reference to an associative array with some configuration variables like what relations to be expanded and what language to be used by default. .PP So, in the last example we could write .PP .Vb 2 \& $thesaurus\->navigate(+{expand=>[\*(AqNT\*(Aq, \*(AqUSE\*(Aq], \& lang =>\*(AqEN\*(Aq}) .Ve .PP meaning that the structure should show two levels of '\s-1NT\s0' and '\s-1USE\s0' relations, and that it should use the English language. .PP These options include: .IP "capitalize" 4 .IX Item "capitalize" try to capitalize terms when they are the title of the page. .IP "expand" 4 .IX Item "expand" a reference to a list of relations that should be expanded at first level; Defaults to the empty list. .IP "title" 4 .IX Item "title" can be \f(CW\*(C`yes\*(C'\fR or \f(CW\*(C`no\*(C'\fR. If it is \f(CW\*(C`no\*(C'\fR, the current term will not be shown as a title; Defaults to \f(CW\*(C`yes\*(C'\fR. .IP "scriptname" 4 .IX Item "scriptname" the name of the script the links should point on. Defaults to current page name. .IP "level1hide" 4 .IX Item "level1hide" a reference to a list of relations to do not show on the first level. Defaults to the empty list. Useful to hide the '\s-1LEN\s0' relation when using Library::Simple. .IP "level2size" 4 .IX Item "level2size" the number of terms to be shown on each second level relation; Defaults to 0 (all terms). .IP "level2hide" 4 .IX Item "level2hide" a reference to a list of relations to do not show on the second level. Defaults to the empty list. .IP "topic_name" 4 .IX Item "topic_name" the name of the topic \s-1CGI\s0 parameter (default: \*(L"t\*(R") .SS "dumpHTML" .IX Subsection "dumpHTML" This method returns a big string containing all the thesaurus in \&\s-1HTML.\s0 It is mainly used for debug. .SS "getHTMLTop" .IX Subsection "getHTMLTop" This method returns the \s-1HTML\s0 needed for the top level of the browsing thesaurus. It can be useful when putting a top level on the first page of a portal. .SS "complete" .IX Subsection "complete" This function completes the thesaurus based on the invertibility properties. This operation is only needed when adding terms and relations by this \s-1API.\s0 Whenever the system loads a thesaurus \s-1ISO\s0 file, it is completed. .SS "baselang" .IX Subsection "baselang" Use this method to set or retrieve the base language of the thesaurus. If no baselang is provided, the value \*(L"_\*(R" is returned .SS "downtr" .IX Subsection "downtr" The \f(CW\*(C`downtr\*(C'\fR method is used to produce something from a set of terms. When no term is given, the all thesaurus is taken. It should be passed as argument a term and an associative array (handler) with anonymous subroutines that process each relation. These functions can use the pre-instantiated variables \f(CW$term\fR, \f(CW$rel\fR, \f(CW@terms\fR. The handler can have three special functions: \&\f(CW\*(C`\-default\*(C'\fR (default handler for relations that don't have a defined function in the handler), \&\f(CW\*(C`\-eachTerm\*(C'\fR executed with each term output (received as \f(CW$_\fR), and \&\f(CW\*(C`\-end\*(C'\fR executed over the output of the the other functions (received as \f(CW$_\fR), .PP If a \f(CW\*(C`\-order\*(C'\fR array reference is provided, the correspondent order of the relations will be used. .PP Example: .PP .Vb 4 \& $the\->downtr( { NT => sub{ ""}, #Do nothing with NT relations \& \-default => sub{ print "$rel", join(",",@terms) } \& }, \& "frog" ); \& \& print $thesaurus\->downtr( \& {\-default => sub { "\en$rel \et".join("\en\et",@terms)}, \& \-eachTerm => sub { "\en_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ $term $_"}, \& \-end => sub { "Thesaurus :\en $_ \enFIM\en"}, \& \-order => ["BT","NT","RT"], \& }); .Ve .PP Both functions return a output value: the concatenation of the internal values (but functions can also work with side effects) .SS "depth_first" .IX Subsection "depth_first" The \f(CW\*(C`depth_first\*(C'\fR method is used to get the list of terms (in fact the tree of terms) related with \f(CW$term\fR by relations \f(CW@r\fR up to the level \f(CW$lev\fR .PP .Vb 1 \& $hashref = $the\->depth_first($term ,$lev, @r) \& \& $hashref = $the\->depth_first("frog", 2, "NT","UF") .Ve .PP \&\f(CW$lev\fR should be an integer greater then 0. .SS "tc transitive closure" .IX Subsection "tc transitive closure" The \f(CW\*(C`tc\*(C'\fR method is used to eval the transitive closure of the relations \&\f(CW@r\fR starting from a term \f(CW$term\fR .PP .Vb 1 \& $the\->tc($term , @r) \& \& $the\->tc("frog", "NT","UF") .Ve .SS "terms" .IX Subsection "terms" The \f(CW\*(C`terms\*(C'\fR method is used to get all the terms related by relations \f(CW@r\fR with \f(CW$term\fR .PP .Vb 1 \& $the\->terms($term , @r); \& \& $the\->terms("frog", "NT", "UF"); .Ve .SS "toTex" .IX Subsection "toTex" Writes a thesaurus in LaTeX format... The first argument is used to pass a tag substitution hash. It uses downtr function to make the translation; a downtr handler can be given to tune some transformations details... .PP .Vb 3 \& print $thesaurus\->toTex( \& {EN=>["\e\e\e\e\e\eemph{Ingles} \-\- ",""]}, \& {FR => sub{""}}) .Ve .SS "toXml" .IX Subsection "toXml" This method writes a thesaurus in \s-1XML\s0 format... The first argument is used fo pass a tag substitution hash. It uses downtr function to make the translation; a downtr handler can be given to tune some transformations details... .PP .Vb 1 \& print $thesaurus\->toXml(); .Ve .SS "toJson" .IX Subsection "toJson" Returns a \s-1JSON\s0 tree based on \s-1NT\s0 relation. Other relation can be supplied as an argument. Future versions might include language selection. .PP .Vb 1 \& print $thesaurus\->toJson(); .Ve .SS "toHash" .IX Subsection "toHash" Returns a Hash reference with a tree based on \s-1NT\s0 relation. Other relation can be supplied as an argument. Future versions might include language selection. .PP .Vb 1 \& print $thesaurus\->toHash(); .Ve .SH "AUTHOR" .IX Header "AUTHOR" Alberto Simoes, .PP Jos� Joao Almeida, .PP Sara Correia, .PP This module is included in the Natura project. You can visit it at http://natura.di.uminho.pt, and access the \s-1SVN\s0 tree. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2000\-2012 Project Natura. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" The example thesaurus file (\f(CW\*(C`examples/thesaurus\*(C'\fR), .PP Manpages: .PP .Vb 4 \& Biblio::WebPortal(3) \& Biblio::Catalog(3) \& Biblio::Catalog::Bibtex(3) \& perl(1) manpages. .Ve .SS "loading from Iso 2788 =head2 building a thesaurus with internal constructors =head2 writing a thesaurus in another format" .IX Subsection "loading from Iso 2788 =head2 building a thesaurus with internal constructors =head2 writing a thesaurus in another format"