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 dictionary entries to parse. Each line (or string) must consist of four tab-delimited fields: The entity ID, the normalized form of the entity, the word or phrase to match during entity identification, and the entity type. For more details about the fields, see cts.entity. 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.