
entity:dictionary-load( $path as xs:string, $uri as xs:string, [$options as xs:string*] ) as empty-sequence()
Load an entity dictionary from the filesystem into the database in the appropriate format.
(:
Assuming "/data/example.txt" contains
11208172 Nixon Nixon person:head of state
11208172 Nixon Richard Nixon person:head of state
11208172 Nixon Richard M. Nixon person:head of state
11208172 Nixon Richard Milhous Nixon person:head of state
11208172 Nixon President Nixon person:head of state:person
08932568 Paris Paris administrative district:national capital
09145751 Paris Paris administrative district:town
09500217 Paris Paris imaginary being:mythical being
The URI "/ontology/people" will contain an entity dictionary with
four entities (11208172 with 5 alternative matching texts, and the three
entities 08932568, 09145751, and 09500217 with the same matching text).
:)
import module namespace entity="http://marklogic.com/entity"
at "/MarkLogic/entity.xqy";
entity:dictionary-load("/data/example.txt","/ontology/people")
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.