Loading TOC...


   $graph as xs:string,
   [$lang as xs:string],
   [$options as xs:string*]
) as cts:entity-dictionary


Construct an entity dictionary from a SKOS ontology loaded into the database as triples. The mapping from a SKOS ontology is as follows:

graph The URI of the graph containing the triples of the ontology.
lang If labels occur in more than one language, use the ones in this language. Default: "en".
options Options with which you can control the behavior of the entity dictionary. You can specify the following options. It is strongly recommended that you use the default option settings.
  • "case-sensitive" or "case-insensitive": Perform case-sensitive or case-insensitive matching of entities labels. Specify one or the other. Default: "case-sensitive".
  • "remove-overlaps" or "allow-overlaps": Either eliminate entities with the overlapping labels or allow them. Specify one or the other. Default: "allow-overlaps".
  • "whole-words" or "partial-words": Either require matches to align with token boundaries, or allow matches to fall within token boundaries. Specify one or the other. Default: "whole-words".

Usage Notes

To take advantage of caching, insert dictionaries into the database once they have been created. Dictionaries formed from large ontologies can be quite expensive to construct. Do not insert SKOS dictionaries using the graph URI as this will interfere with use of that graph.

For best results it is strongly recommended you construct ontologies using skos:ConceptScheme with explicit skos:inScheme properties.

The following list describes the mapping from a SKOS ontology to entity dictionary entries. NOTE: The "skos" prefix here is shorthand for the namespace "http://www.w3.org/2004/02/skos/core#".

If this function cannot derive an entity dictionary entries from the graph, MarkLogic throws the exception XDMP-EMPTYEDICT.

See Also


import module namespace entity="http://marklogic.com/entity"
  at "/MarkLogic/entity.xqy";


Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.