function taxonomy_xml_relationship_synonyms in Taxonomy import/export via XML 5
Same name and namespace in other branches
- 5.2 taxonomy_xml.module \taxonomy_xml_relationship_synonyms()
- 6.2 taxonomy_xml.module \taxonomy_xml_relationship_synonyms()
- 6 taxonomy_xml.module \taxonomy_xml_relationship_synonyms()
- 7 taxonomy_xml.module \taxonomy_xml_relationship_synonyms()
Return an array of alternative wordings that may be used in the input files.
Add to this as needed, Referring to the globals defined at the top of the module. Different input files use different words to express the same concept. This array tries to translate the meanings down into the core concepts used internally. The reason that this list is so big and messy is because all the different academic sources I've researched just use different terminology to say the same thing.
See ISO 2788 for notes on expressing thesauri. or SKOS http://www.w3.org/2004/02/skos/vocabs
or an alternative glossary: "http://www.boxesandarrows.com/view/controlled_vocabularies_a_glosso_thes...
Each of these terms are predicates that would make up a 'triple' statement. For a geographical taxonomy, a sample could be:
Subject, Predicate, Object
"United States of America", "Narrower", "Iowa" "United States of America", "Broader", "North America" "United States of America", "AKA", "USA" "The States", "See", "United States of America"
3 calls to taxonomy_xml_relationship_synonyms()
- taxonomy_xml_csv_parse in ./
csv_format.inc - Scan the input CSV file and create a taxonomy structure out of it.
- taxonomy_xml_merge_predicates_into_attributes in ./
taxonomy_xml.module - Merge all predicate data into a simpler array, re-tagging the attributes as needed
- taxonomy_xml_rdf_parse in ./
rdf_format.inc - Read in RDF taxonomies and vocabularies. Create vocabs and terms as needed.
File
- ./
taxonomy_xml.module, line 670 - taxonomy_xml.module This module makes it possible to import and export taxonomies as XML documents.
Code
function taxonomy_xml_relationship_synonyms() {
return array(
'Related Terms' => TAXONOMY_XML_RELATED,
'Related' => TAXONOMY_XML_RELATED,
'related' => TAXONOMY_XML_RELATED,
# SKOS
'RT' => TAXONOMY_XML_RELATED,
# ISO2788
'seeAlso' => TAXONOMY_XML_RELATED,
'Broader Terms' => TAXONOMY_XML_PARENT,
'Broader' => TAXONOMY_XML_PARENT,
'broader' => TAXONOMY_XML_PARENT,
# SKOS
'Broad Term' => TAXONOMY_XML_PARENT,
'BT' => TAXONOMY_XML_PARENT,
# ISO2788
'subClassOf' => TAXONOMY_XML_PARENT,
# rdfs
'SubClassOf' => TAXONOMY_XML_PARENT,
# contentlabel
'ChildOf' => TAXONOMY_XML_PARENT,
'hypernym' => TAXONOMY_XML_PARENT,
'hyponymOf' => TAXONOMY_XML_PARENT,
'Narrower Terms' => TAXONOMY_XML_CHILD,
'Narrower' => TAXONOMY_XML_CHILD,
'narrower' => TAXONOMY_XML_CHILD,
# SKOS
'NT' => TAXONOMY_XML_CHILD,
# ISO2788
'ParentOf' => TAXONOMY_XML_CHILD,
'hyponym' => TAXONOMY_XML_CHILD,
'Description' => TAXONOMY_XML_DESCRIPTION,
'definition' => TAXONOMY_XML_DESCRIPTION,
# SKOS
'Definition' => TAXONOMY_XML_DESCRIPTION,
'comment' => TAXONOMY_XML_DESCRIPTION,
'gloss' => TAXONOMY_XML_DESCRIPTION,
'Scope Note' => TAXONOMY_XML_DESCRIPTION,
'note' => TAXONOMY_XML_DESCRIPTION,
# SKOS
'SN' => TAXONOMY_XML_DESCRIPTION,
# ISO2788
'Used for' => TAXONOMY_XML_HAS_SYNONYM,
'AKA' => TAXONOMY_XML_HAS_SYNONYM,
'synonym' => TAXONOMY_XML_HAS_SYNONYM,
'altLabel' => TAXONOMY_XML_HAS_SYNONYM,
# SKOS
'equivalentClass' => TAXONOMY_XML_HAS_SYNONYM,
'See' => TAXONOMY_XML_SYNONYM_OF,
'USE' => TAXONOMY_XML_SYNONYM_OF,
# ISO2788
'Use' => TAXONOMY_XML_SYNONYM_OF,
'related' => TAXONOMY_XML_RELATED,
'seeAlso' => TAXONOMY_XML_RELATED,
'memberMeronymOf' => TAXONOMY_XML_RELATED,
'Part of' => TAXONOMY_XML_IN_VOCABULARY,
'belongs-to-facet' => TAXONOMY_XML_IN_VOCABULARY,
'isDefinedBy' => TAXONOMY_XML_IN_VOCABULARY,
# rdfs
'inScheme' => TAXONOMY_XML_IN_VOCABULARY,
# SKOS
'name' => TAXONOMY_XML_NAME,
'lexicalForm' => TAXONOMY_XML_NAME,
'label' => TAXONOMY_XML_NAME,
'scientific name' => TAXONOMY_XML_NAME,
'prefLabel' => TAXONOMY_XML_NAME,
#SKOS
'hasDescriptor' => 'unused',
);
// By listing the deliberately unused attributes the parser finds,
// we can still be alerted to other unrecognised tags found in the input.
// Perhaps they could be used. Otherwise the unused ones cause too much noise.
}