Loading TOC...

cts.entityDictionaryParse

cts.entityDictionaryParse(
   $contents as String[],
   [$options as String[]]
) as cts.entityDictionary

Summary

Construct a cts:entity-dictionary object by parsing it from a formatted string.

Parameters
$contents The formatted dictionary. Each line consists of four tab-separated fields: the entity ID, the normalized form of the entity, the matching text, and the entity type. Multiple formatted strings can be passed in and they will be combined into a single dictionary object.
$options Dictionary building options. The default is case-sensitive, allow-overlaps, and whole-words.

Options include:

"case-sensitive"
Entity names are case-sensitive.
"case-insensitive"
Entity names are case-insensitive.
"whole-words"
Require that matches align with token boundaries.
"partial-words"
Allow matches to fall within token boundaries.
"allow-overlaps"
Allow overlapping entity labels.
"remove-overlaps"
Remove overlapping entity labels.



cts.entityDictionaryParse(
   $uri as String
) as cts.entityDictionary

Summary

Construct a cts:entity-dictionary object by parsing it from a location in the database. The dictionary will be automatically cached for reuse.

Parameters
$uri The URI of the entity dictionary that has previously been saved in the database.

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