%iKnow.Queries.PathAPI
Class %iKnow.Queries.PathAPI 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 class to retrieve Paths as identified by the engine. Paths are sequences of concepts and relations that form a meaningful sub-section of a sentence.
Parameters
GetPathIdEXP
Parameter GetPathIdEXP [ Internal ] = 1;
GetEntitiesRT
Parameter GetEntitiesRT = "position:%Integer,entOccId:%Integer,entUniId:%Integer,entityValue:%String,literal:%String,role:%Integer,stemUniId:%Integer,stemValue:%String";
GetByEntitiesRT
Parameter GetByEntitiesRT = "pathId:%Integer,entIds:%List";
GetByEntityIdsRT
Parameter GetByEntityIdsRT = "pathId:%Integer,entIds:%List";
GetBySourceRT
Parameter GetBySourceRT = "pathId:%Integer,entIds:%List";
GetAttributesRT
Parameter GetAttributesRT = "attTypeId:%Integer,attType:%String,start:%Integer,span:%Integer,properties:%String";
Methods
GetValue
ClassMethod GetValue(domainid As %Integer, pathid As %Integer, vSrcId As %Integer = 0, Output pSC As %Status, pUseStems As %Boolean = 0) As %List
Returns the sequence of entity values corresponding to the specified path as a %List.
When specifying a Virtual Source ID, it will treat the pathId as a virtual one, in the context of that vSrcId.
If stemming is enabled for this domain through the $$$IKPSTEMMING domain parameter, you can use pUseStems=1 to get the stems rather than the entities for this path.
GetEntIds
ClassMethod GetEntIds(pDomainId As %Integer, pPathId As %Integer, vSrcId As %Integer = 0, pUseStems As %Boolean = 0) As %List [ Internal ]
Internal method. See GetPathId
GetPathId
ClassMethod GetPathId(domainid As %Integer, entityList As %List, vSrcId As %Integer = 0) As %Integer [ Internal ]
Left in for backwards compatibility. Use GetId instead.
GetId
ClassMethod GetId(domainid As %Integer, entityList As %List, vSrcId As %Integer = 0, Output sc As %Status = {$$$OK}) As %Integer
This method will try to find a path corresponding to the supplied list of entities in the specified order. If no path is found, "" is returned.
When specifying a Virtual Source ID, it will treat the path as a virtual one, in the context of that vSrcId.
GetSentenceId
ClassMethod GetSentenceId(domainId As %Integer, pathId As %Integer, Output sc As %Status = {$$$OK}, vSrcId As %Integer = 0) As %Integer
Returns the sentence ID in which the supplied path ID occurs
GetSourceId
ClassMethod GetSourceId(domainId As %Integer, pathId As %Integer, Output sc As %Status = {$$$OK}) As %Integer
Returns the source ID in which the supplied path ID occurs
GetEntities
ClassMethod GetEntities(ByRef result, domainId As %Integer, pathId As %Integer, vSrcId As %Integer = 0) As %Status
Returns a detailed overview of the entities pathId consists of, including their unique and occurrence IDs, positions, roles and literal value.
The last two columns will only contain data if stemming is enabled for this domain through the $$$IKPSTEMMING domain parameter.
GetByEntities
ClassMethod GetByEntities(ByRef result, domainid As %Integer, entitylist As %List, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", setop As %Integer = {$$$UNION}, pActualFormOnly As %Boolean = 0) As %Status
This method will return all Paths containing any (if setop = $$$UNION) or all (if setop = $$$INTERSECT) of the entities in the supplied entitylist.
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 Paths occurring in any source satisfying the filter criteria.
Results are sorted by decreasing path ID.
If stemming is enabled for this domain through $$$IKPSTEMMING, paths containing any actual form of the entities in entitylist will be returned. Use pActualFormOnly=1 to retrieve only those paths 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 = "", setop As %Integer = {$$$UNION}, pActualFormOnly As %Boolean = 0) As %Status
Retrieves paths based on entity IDs.
See also GetByEntities for a description of the parameters.
GetByEntitiesInternal
ClassMethod GetByEntitiesInternal(ByRef result, domainid As %Integer, ByRef entitylist, page As %Integer, pagesize As %Integer, filter As %iKnow.Filters.Filter, setop As %Integer) As %Status [ Internal, Private ]
GetBySource
ClassMethod GetBySource(ByRef result, domainid As %Integer, sourceidlist As %List, page As %Integer = 1, pagesize As %Integer = 10) As %Status
Retrieves the paths appearing in any of the sources supplied through sourceidlist.
To get the paths of a virtual source, only a single virtual source can be supplied using its negative ID value (otherwise, -1 is returned).
GetCountByDomain
ClassMethod GetCountByDomain(domainid As %Integer, filter As %iKnow.Filters.Filter = "", Output sc As %Status = {$$$OK}) As %Integer
Returns the number of paths in a domain, optionally restricted to those appearing in a source satisfying the %iKnow.Filters.Filter object supplied through filter.
GetCountBySource
ClassMethod GetCountBySource(domainid As %Integer, sourceidlist As %List, Output sc As %Status = {$$$OK}) As %Integer
Returns the total number of paths in the sources specified through sourceidlist. Use negative source IDs to refer to virtual sources.
GetCountByEntities
ClassMethod GetCountByEntities(domainid As %Integer, entitylist As %List, filter As %iKnow.Filters.Filter = "", setop As %Integer = {$$$UNION}, Output sc As %Status = {$$$OK}, pActualFormOnly As %Boolean = 0) As %Integer
Retrieves the number of paths containing the specified entities.
See also GetByEntities for a description of the parameters.
GetCountByEntityIds
ClassMethod GetCountByEntityIds(domainid As %Integer, entityidlist As %List, filter As %iKnow.Filters.Filter = "", setop As %Integer = {$$$UNION}, Output sc As %Status = {$$$OK}, pActualFormOnly As %Boolean = 0) As %Integer
Retrieves the number of paths containing the specified entity IDs.
See also GetByEntities for a description of the parameters.
GetCountByEntitiesInternal
ClassMethod GetCountByEntitiesInternal(domainid As %Integer, ByRef entitylist, filter As %iKnow.Filters.Filter, setop As %Integer, Output sc As %Status = {$$$OK}) As %Integer [ Internal, Private ]
TranslatePathIdList
ClassMethod TranslatePathIdList(domainid As %Integer, pathIdList As %List, Output ids, vSrcId As %Integer = 0, Output unMatchedCount As %Integer) As %Status [ Internal ]
clean a list of PathIds from duplicates and inexistent ids
GetAttributes
ClassMethod GetAttributes(ByRef pResult, pDomainId As %Integer, pPathId As %Integer, vSrcId As %Integer = 0) As %Status
Returns all attributes for a given path. Any named attribute properties are also included through sub-nodes (not available through SQL or SOAP):
pResult(rowNumber, propertyName) = propertyValue
Please note this query only returns path-level attributes and not those attributes applying to individual entities or words within entities. To retrieve these, use GetOccurrenceAttributes in %iKnow.Queries.EntityAPI.