cts.entityDictionary( entities as cts.entity[], [options as String[]] ) as cts.entityDictionary
Returns a cts:entity-dictionary
object.
Only one of "case-sensitive" and "case-insensitive", "whole-words" and "partial-words", and "allow-overlaps" and "remove-overlaps" is permitted. It is strongly recommended that the defaults be used.
Use this method when creating ad hoc entity dictionaries, or as a prelude to saving the entity dictionary to the database.
import module namespace entity = "http://marklogic.com/entity" at "/MarkLogic/entity.xqy"; xdmp:document-insert("/entities/example.txt", entity:skos-dictionary("http://example.org/ontology","en")) ; cts:entity-walk(doc("mydoc.xml"), <entity type="{$cts:entity-type}">{$cts:text}</entity>, cts:entity-dictionary-get("/entities/example.txt")) )
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.