%iKnow.Matching.DictionaryAPI
Class %iKnow.Matching.DictionaryAPI Extends %iKnow.Queries.AbstractAPI [ Deprecated, System = 4 ]
The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentation for more detail.
Main entry point for managing Dictionary contents to be used by the Matching APIs
Parameters
DropDictionaryEXP
Parameter DropDictionaryEXP [ Internal ] = 1;
DropDictionaryItemEXP
Parameter DropDictionaryItemEXP [ Internal ] = 1;
DropDictionaryTermEXP
Parameter DropDictionaryTermEXP [ Internal ] = 1;
GetDictionariesRT
Parameter GetDictionariesRT = "dictId:%Integer,name:%String,description:%String,defaultLanguage:%String";
GetDictionaryItemsRT
Parameter GetDictionaryItemsRT = "dictItemId:%Integer,name:%String,URI:%String,defaultLanguage:%String";
GetDictionaryItemsAndTermsRT
Parameter GetDictionaryItemsAndTermsRT = "dictItemId:%Integer,name:%String,URI:%String,dictTermId:%Integer,string:%String,language:%String,isProcessed:%Boolean";
GetDictionaryTermsByItemRT
Parameter GetDictionaryTermsByItemRT = "dictTermId:%Integer,string:%String,language:%String,isProcessed:%Boolean";
DropAllDictionaryDataEXP
Parameter DropAllDictionaryDataEXP [ Internal ] = 1;
GetTermElementsRT
Parameter GetTermElementsRT [ Internal ] = "dictElemId:%Integer,type:%Integer,valueId:%Integer,value:%String,position:%Integer,role:%Integer,minMatchScore:%Numeric,scoreMultiplier:%Numeric";
GetItemsByNameRT
Parameter GetItemsByNameRT = "dictId:%Integer,dictName:%String,itemId:%Integer,itemName:%String,URI:%String,language:%String";
GetTermsByNameRT
Parameter GetTermsByNameRT = "dictId:%Integer,dictName:%String,itemId:%Integer,itemName:%String,URI:%String,termId:%Integer,term:%String,language:%String";
Methods
CreateDictionary
ClassMethod CreateDictionary(domainId As %Integer, name As %String, description As %String = "", defaultLanguage As %String = "en", defaultProfileId As %Integer = "", Output sc As %Status = {$$$OK}) As %Integer
Creates a Dictionary and returns its ID.
CreateDictionaryInternal
ClassMethod CreateDictionaryInternal(domainId As %Integer, name As %String, description As %String = "", defaultLanguage As %String = "en", defaultProfileId As %Integer = "", mgrClass As %String = "", Output sc As %Status = {$$$OK}) As %Integer [ Internal ]
GetDictionaryId
ClassMethod GetDictionaryId(domainId As %Integer, name As %String, Output sc As %Status = {$$$OK}) As %Integer
Looks up the Dictionary ID corresponding to the supplied Dictionary name.
HasDictionaries
ClassMethod HasDictionaries(pDomainId As %Integer) As %Boolean
Returns whether or not there are any dictionaries in the domain
DropDictionary
ClassMethod DropDictionary(domainId As %Integer, dictId As %Integer) As %Status
Deletes a Dictionary and all related items, terms, elements and matches.
CreateDictionaryItem
ClassMethod CreateDictionaryItem(domainId As %Integer, dictId As %Integer, name As %String, ByRef URI As %String, defaultLanguage As %String = "en", Output sc As %Status = {$$$OK}) As %Integer
Creates a Dictionary Item and returns its ID.
GetDictionaryItemIdByURI
ClassMethod GetDictionaryItemIdByURI(domainId As %Integer, URI As %String, Output sc As %Status = {$$$OK}) As %Integer
Looks up the Dictionary Item ID corresponding to the supplied Dictionary Item URI.
DropDictionaryItem
ClassMethod DropDictionaryItem(domainId As %Integer, dictItemId As %Integer) As %Status
Deletes a Dictionary Item with all related terms, elements and matches.
CreateDictionaryItemAndTerm
ClassMethod CreateDictionaryItemAndTerm(domainId As %Integer, dictId As %Integer, name As %String, ByRef URI As %String, language As %String = "en", Output sc As %Status = {$$$OK}) As %Integer
Shorthand method for creating a Dictionary Item and Term using the Item's name. Returns the Items ID.
CreateDictionaryTerm
ClassMethod CreateDictionaryTerm(domainId As %Integer, dictItemId As %Integer, string As %String, language As %String = "en", Output sc As %Status = {$$$OK}, isProcessed As %Boolean = 0) As %Integer
Creates a Dictionary Term and returns its ID.
If isProcessed is 1 (default 0), the term will be marked as processed upon creation and no Dictionary Elements will be created. This parameter is for internal use only and deprecated in 2013.1.
DropDictionaryTerm
ClassMethod DropDictionaryTerm(domainId As %Integer, dictTermId As %String) As %Status
Drops a single Dictionary Term and its matching results
CreateDictionaryFormat
ClassMethod CreateDictionaryFormat(domainId As %Integer, formatClass As %String, formatParams As %List = "", Output sc As %Status = {$$$OK}) As %Integer
Creates a Dictionary Format instance of the supplied formatClass and returns its ID.
CreateRegularExpression
ClassMethod CreateRegularExpression(pDomainId As %Integer, pDictItemId As %Integer, pRegularExpression As %String, pReplace As %String = "", Output pSC As %Status) As %Integer
Shorthand method to create a Dictionary Term composed of a single Dictionary Format of type %iKnow.Matching.Formats.RegularExpression, matching pRegularExpression and optionally producing output by replacing the matched parts of an entity with pReplace.
CreateDictionaryTermFormat
ClassMethod CreateDictionaryTermFormat(domainId As %Integer, dictItemId As %Integer, formatClass As %String, formatParams As %List = "", Output sc As %Status = {$$$OK}) As %Integer
Creates a Dictionary Term composed of a single Dictionary Format and returns the Terms ID.
CreateDictionaryElement
ClassMethod CreateDictionaryElement(domainId As %Integer, type As %String = {$$$DETERM}, dictTermId As %Integer, value As %String, position As %Integer = {$$$DMPOSUNDEFINED}, role As %Integer = {$$$DMROLEUNDEFINED}, matchScore As %Integer = {$$$DMSCOREUNDEFINED}, nbOfEntries As %Integer = -1, useTransaction As %Boolean = 1, elementWeight As %Numeric = 1, Output sc As %Status = {$$$OK}) As %Integer [ Internal ]
Creates a Dictionary Element NOTE: if $$$IKPSTANDARDIZEDFORM="Stem", the input is assumed to be stemmed already
GetDictionaries
ClassMethod GetDictionaries(ByRef result, domainId As %Integer, page As %Integer = 1, pageSize As %Integer = 10, pIncludeCrossDomain As %Boolean = 0) As %Status
Returns all Dictionaries in this domain. If pIncludeCrossDomain = 1, any cross-domain dictionaries registered in "domain 0" are also included in the result, using a negative value for their ID.
GetDictionaryItems
ClassMethod GetDictionaryItems(ByRef result, domainId As %Integer, dictId As %Integer, page As %Integer = 1, pageSize As %Integer = 10) As %Status
Returns all Dictionary Items for the given Dictionary ID.
GetDictionaryItemsAndTerms
ClassMethod GetDictionaryItemsAndTerms(ByRef result, domainId As %Integer, dictId As %Integer, page As %Integer = 1, pageSize As %Integer = 10) As %Status
Returns all Dictionary Items and their Terms for the given Dictionary ID.
GetDictionaryTermsByItem
ClassMethod GetDictionaryTermsByItem(ByRef result, domainId As %Integer, dictItemId As %Integer, page As %Integer = 1, pageSize As %Integer = 10) As %Status
Returns all the Dictionary Terms for the given Dictionary Item ID.
DropAllDictionaryData
ClassMethod DropAllDictionaryData(domainId As %Integer) As %Status
Drops all dictionary data, including matching results. This method will fail if there are managed dictionaries in this domain.
ContainsFormat
ClassMethod ContainsFormat(pDomainId As %Integer, pTermId As %Integer, Output pSC As %Status = {$$$OK}) As %Boolean [ Internal ]
Returns whether or not a given Dictionary Term pTermId contains at least one Dictionary Format element.
GetTermElements
ClassMethod GetTermElements(ByRef pResult, pDomainId As %Integer, pDictionaryTermId As %Integer) As %Status [ Internal ]
Retrieves the elements corresponding to a given pDictionaryTermId.
GetFormatDetails
ClassMethod GetFormatDetails(pDomainId As %Integer, pDictionaryFormatId As %Integer, Output pFormatClass As %String, Output pFormatParams As %List) As %Status
Retrieves the Dictionary format class and parameters for a given pDictionaryFormatId
GetDictionaryCount
ClassMethod GetDictionaryCount(pDomainId As %Integer, Output pSC As %Status = {$$$OK}) As %Integer
GetItemCount
ClassMethod GetItemCount(pDomainId As %Integer, pDictIds As %List = "", Output pSC As %Status) As %Integer
GetTermCount
ClassMethod GetTermCount(pDomainId As %Integer, pDictIds As %List = "", Output pSC As %Status = {$$$OK}) As %Integer
GetTermCountByItem
ClassMethod GetTermCountByItem(pDomainId As %Integer, pDictItemIds As %List = "", Output pSC As %Status = {$$$OK}) As %Integer
GetItemsByName
ClassMethod GetItemsByName(ByRef pResult, pDomainId As %Integer, pString As %String, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pDictIds As %List = "", pMode As %Integer = {$$$USEPARTS}, pCheck As %String(VALUELIST="NAME,URI") = "NAME", pLang As %String = "en") As %Status
Note: pFilter is ignored when looking at cross-domain dictionaries
GetTermsByName
ClassMethod GetTermsByName(ByRef pResult, pDomainId As %Integer, pString As %String, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pDictIds As %List = "", pMode As %Integer = {$$$USEPARTS}, pLang As %String = "en") As %Status
Note: pFilter is ignored when looking at cross-domain dictionaries
GetDictElemStringId
ClassMethod GetDictElemStringId(pDomainId As %Status, pString As %String, Output pSC As %Status = {$$$OK}) As %Integer [ Internal ]
Returns an identifier for the string value pString of a dictionary element. If this string exists as a real Unique Entity, the corresponding entUniId is returned. Otherwise, the string is added to ^IRIS.IK.Mat.DictElemStringId (if it didn't exist already) and the corresponding dictElemStringId is returned. In either case, a lookup entry in ^IRIS.IK.Mat.DictElemString is added if it didn't exist already.