%iKnow.Queries.CcAPI
Class %iKnow.Queries.CcAPI Extends %iKnow.Queries.AbstractAPI [ Deprecated, System = 4 ]
The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentation for more detail.
This is the main Query API to get access to Concept-Concept pairs (CCs). CCs are an abstraction of CRCs, aggregating them across relationships to focus only on those concepts that are in a direct relationship with one another, without caring about the actual relationship linking the two.
Parameters
GetByEntitiesRT
Parameter GetByEntitiesRT = "HeadEntUniId:%Integer,HeadEntity:%String,TailEntUniId:%Integer,TailEntity:%String,frequency:%Integer,spread:%Integer,ccUniId:%Integer";
GetByEntityIdsRT
Parameter GetByEntityIdsRT [ Internal ] = "HeadEntUniId:%Integer,HeadEntity:%String,TailEntUniId:%Integer,TailEntity:%String,frequency:%Integer,spread:%Integer,ccUniId:%Integer";
Methods
GetValue
ClassMethod GetValue(pDomainId As %Integer, pCcId As %Integer, vSrcId As %Integer = 0, Output pSC As %Status = {$$$OK}) As %List
Returns the entity values this CC is composed of.
When specifying a Virtual Source ID, it will treat the ccid as a virtual one, in the context of that vSrcId.
GetValueInternal
ClassMethod GetValueInternal(pDomainId As %Integer, pCcId As %Integer, vSrcId As %Integer = 0, Output pSC As %Status = {$$$OK}) As %List [ Internal ]
Internal version of GetValue, skipping security checks.
GetId
ClassMethod GetId(pDomainId As %Integer, pHead As %String, pTail As %String, vSrcId As %Integer = 0, Output pSC As %Status = {$$$OK}) As %Integer
Returns, if any, the CC ID for the combination of head and tail specified.
When specifying a Virtual Source ID, it will treat the heads and tails as virtual entities, in the context of that vSrcId.
GetIdInternal
ClassMethod GetIdInternal(pDomainId As %Integer, ByRef pHead As %String, ByRef pTail As %String, vSrcId As %Integer = 0, Output pSC As %Status = {$$$OK}, pStripPunctuation As %Boolean = 1) As %Integer [ Internal ]
Internal version of GetId
GetInverse
ClassMethod GetInverse(domainId As %Integer, ccUniId As %Integer, Output sc As %Status = {$$$OK}) As %Integer
Returns the "inverse" of a CC pair, which means the CC composed of the same head and tail entity, but at inverted positions.
GetFrequency
ClassMethod GetFrequency(domainId As %Integer, ccUniId As %Integer, vSrcId As %Integer = 0, filter As %iKnow.Filters.Filter = "", Output sc As %Status = {$$$OK}) As %Integer
Returns the frequency of the CC corresponding to the supplied crcUniId.
When specifying a Virtual Source ID, the frequency within the virtual source will be returned.
GetSpread
ClassMethod GetSpread(domainId As %Integer, ccUniId As %Integer, filter As %iKnow.Filters.Filter = "", Output sc As %Status = {$$$OK}) As %Integer
Returns the spread of the CC corresponding to the supplied ccUniId.
GetByEntities
ClassMethod GetByEntities(ByRef result, domainid As %Integer, entitylist As %List, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", filtermode As %Integer = {$$$FILTERONLY}, positionstomatch As %Integer = {$$$USEPOSHT}, sorttype As %Integer = {$$$SORTBYDOMAINDEFAULT}, pActualFormOnly As %Boolean = 0) As %Status
This method will return all CC pairs in which any (if setop = $$$UNION) or all (if setop = $$$INTERSECT) of the entities supplied in the entitylist participate, within the boundaries of the supplied domain.
The scope of this query can be limited through supplying a %iKnow.Filters.Filter object for the filter parameter to restrict the result to those CCs occurring in any source satisfying the filter criteria. When using a filter, the filtermode parameter will control whether or not the frequency and spread of returned records should be recalculated and whether results should be resorted along these recalculated numbers.
Specifying a value for positionstomatch will limit the result to those CCs in which the supplied entities are on the Head (with positionstomatch = $$$USEPOSH) or Tail (with positionstomatch = $$$USEPOST) side rather than either of the two (with positionstomatch = $$$USEPOSHT, default setting).
If stemming is enabled for this domain through $$$IKPSTEMMING, CCs containing any actual form of the entities in entityList will be returned. Use pActualFormOnly=1 to retrieve only those CCs containing the actual forms in entitylist. This argument is ignored if stemming is not enabled.
GetByEntityIds
ClassMethod GetByEntityIds(ByRef result, domainid As %Integer, entityidlist As %List, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", filtermode As %Integer = {$$$FILTERONLY}, positionstomatch As %Integer = {$$$USEPOSHT}, sorttype As %Integer = {$$$SORTBYDOMAINDEFAULT}, pActualFormOnly As %Boolean = 0) As %Status
This method looks up CCs based on a list of Entity IDs.
See also GetByEntities for a description of the parameters.
GetByEntitiesInternal
ClassMethod GetByEntitiesInternal(ByRef result, domainid As %Integer, ByRef entIdList, page As %Integer, pagesize As %Integer, filter As %iKnow.Filters.Filter, filtermode As %Integer, positionstomatch As %Integer, sorttype As %Integer) As %Status [ Internal ]
GetByEntitiesInternal20121
ClassMethod GetByEntitiesInternal20121(ByRef result, domainid As %Integer, ByRef entIdList, page As %Integer, pagesize As %Integer, filter As %iKnow.Filters.Filter, filtermode As %Integer, positionstomatch As %Integer, sorttype As %Integer) As %Status [ Internal ]
GetCountByEntities
ClassMethod GetCountByEntities(domainid As %Integer, entitylist As %List, filter As %iKnow.Filters.Filter = "", positionstomatch As %Integer = {$$$USEPOSHT}, Output sc As %Status = {$$$OK}, pActualFormOnly As %Boolean = 0) As %Integer
This method returns the number of CC pairs based on a list of entities.
See also GetByEntities for a description of the parameters.
GetCountByEntityIds
ClassMethod GetCountByEntityIds(domainid As %Integer, entityidlist As %List, filter As %iKnow.Filters.Filter = "", positionstomatch As %Integer = {$$$USEPOSHT}, Output sc As %Status = {$$$OK}, pActualFormOnly As %Boolean = 0) As %Integer
This method returns the number of CC pairs based on a list of entity ids.
See also GetByEntities for a description of the parameters.
GetCountByEntitiesInternal
ClassMethod GetCountByEntitiesInternal(domainid As %Integer, ByRef entityIdList, filter As %iKnow.Filters.Filter, positionstomatch As %Integer, Output sc As %Status = {$$$OK}) As %Integer [ Internal ]
GetCountByEntitiesInternal20121
ClassMethod GetCountByEntitiesInternal20121(domainid As %Integer, ByRef entityIdList, filter As %iKnow.Filters.Filter, positionstomatch As %Integer, Output sc As %Status = {$$$OK}) As %Integer [ Internal ]
GetCountBySource
ClassMethod GetCountBySource(domainid As %Integer, sourceidlist As %List, setop As %Integer = {$$$UNION}, Output sc As %Status = {$$$OK}) As %Integer
Returns the total number of unique CCs appearing in either (if setop = $$$UNION) or all (if setop = $$$INTERSECT) of the sources specified by ID in sourceidlist.
To get the unique CCs of a virtual source, only a single virtual source can be supplied using its negative ID value (otherwise, -1 is returned).