%iKnow.Queries.EntityAPI
Class %iKnow.Queries.EntityAPI 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 Query class for retrieving Entities.
Parameters
GetByStemRT
Parameter GetByStemRT = "EntUniId:%Integer,EntityValue:%String";
GetSimilarRT
Parameter GetSimilarRT = "entUniId:%Integer,entity:%String,frequency:%Integer,spread:%Integer";
Returned column summary for GetSimilar.
GetSimilarCountsRT
Parameter GetSimilarCountsRT = "distinctEntities:%Integer,totalFrequency:%Integer,totalSpread:%Integer";
Returned column summary for GetSimilarCounts.
GetTopRT
Parameter GetTopRT = "entUniId:%Integer,entity:%String,frequency:%Integer,spread:%Integer";
Returned column summary for GetTop.
GetByFilterRT
Parameter GetByFilterRT = "entUniId:%Integer,entity:%String,frequency:%Integer,spread:%Integer";
Returned column summary for GetByFilter.
GetBySourceRT
Parameter GetBySourceRT = "entUniId:%Integer,entity:%String,frequency:%Integer,spread:%Integer";
Returned column summary for GetBySource.
GetRelatedRT
Parameter GetRelatedRT = "entUniId:%Integer,entity:%String,frequency:%Integer,spread:%Integer";
Returned column summary for GetRelated.
GetRelatedByIdRT
Parameter GetRelatedByIdRT = "entUniId:%Integer,entity:%String,frequency:%Integer,spread:%Integer";
Returned column summary for GetRelatedById.
GetNewBySourceRT
Parameter GetNewBySourceRT = "entUniId:%Integer,entity:%String,freqInNew:%Integer,freqInOld:%Integer,relFreqInNew:%Numeric,relFreqInOld:%Numeric";
Returned column summary for GetNewBySource.
GetTopGroupsRT
Parameter GetTopGroupsRT [ Internal ] = "string:%String,similarCount:%Integer,totFreq:%Integer,totSpread:%Integer";
GetOccurrenceAttributesRT
Parameter GetOccurrenceAttributesRT = "attTypeId:%Integer,attType:%String,level:%Integer,wordPositions:%String,properties:%String";
GetTopBM25RT
Parameter GetTopBM25RT = "entUniId:%Integer,entityValue:%String,bm25:%Numeric";
GetTopTFIDFRT
Parameter GetTopTFIDFRT = "entUniId:%Integer,entityValue:%String,TFIDF:%Numeric";
GetOccurrencesByIdRT
Parameter GetOccurrencesByIdRT = "EntOccId:%Integer,EntUniId:%Integer,Type:%Integer,SentenceId:%Integer,SourceId:%Integer,IsAttributed:%Integer";
Methods
GetValue
ClassMethod GetValue(domainid As %Integer, entityid As %Integer, vSrcId As %Integer = 0, Output pSC As %Status) As %String
Returns the entity string value corresponding to the specified entity ID, if any.
GetStemValue
ClassMethod GetStemValue(pDomainId As %Integer, pStemUniId As %Integer, vSrcId As %Integer = 0, Output pSC As %Status) As %String
Returns the string value of the stem identified by pStemUniId
GetValueInternal
ClassMethod GetValueInternal(pDomainId As %Integer, pEntUniId As %Integer, vSrcId As %Integer = 0, pUseStem As %Boolean = 0) As %String [ Internal ]
Internal version of GetValue, skipping security checks.
GetByStemArray
ClassMethod GetByStemArray(ByRef pResult, pDomainId As %Integer, pStemUniId As %Integer, vSrcId As %Integer = 0, pLanguageId As %Integer = 0) As %Status
Retrieves all entities corresponding to a certain stem identified by pStemUniId in an array: pResult(tEntUniId)="".
GetByStem
ClassMethod GetByStem(ByRef pResult, pDomainId As %Integer, pStemUniId As %Integer, vSrcId As %Integer = 0, pLanguage As %String = "") As %Status
Retrieves all entities corresponding to a certain stem identified by pStemUniId.
GetStem
ClassMethod GetStem(pDomainId As %Integer = "", pString As %String, pLanguage As %String = "", Output pSC As %Status = {$$$OK}) As %String
Returns the stemmed form of the supplied string pString. If pDomainId is non-null, any domain-level configuration settings will be used for the stemming operation.
GetStemRepresentationForm
ClassMethod GetStemRepresentationForm(pDomainId As %Integer, pStemUniId As %Integer, pLanguage As %String = "en", vSrcId As %Integer = 0, Output pSC As %Status = {$$$OK}) As %String
Returns the representation form for the given stem and language
GetStemIdByEntityId
ClassMethod GetStemIdByEntityId(pDomainId As %Integer, pEntUniId As %Integer, vSrcId As %Integer = 0, pLanguage As %Integer = 0) As %Integer [ Internal ]
Returns the first stem ID found for the supplied entity.
GetRepresentationFormId
ClassMethod GetRepresentationFormId(pDomainId As %Integer, pStemUniId As %Integer, vSrcId As %Integer = 0, pLanguageId As %Integer = 0) As %Integer [ Internal ]
GetId
ClassMethod GetId(domainid As %Integer, entityvalue As %String, vSrcId As %Integer = 0) As %Integer
Returns the entity ID corresponding to the specified entity value, if any.
When specifying a Virtual Source ID, it will treat the entity as a virtual one, in the context of that vSrcId.
GetIdInternal
ClassMethod GetIdInternal(domainid As %Integer, ByRef entityvalue As %String, vSrcId As %Integer = 0, stripPunctuation As %Integer = 1) As %Integer [ Internal ]
Internal version of GetId. stripPunctuation should be set to 0 when called for user-supplied input (e.g. from GetId)
GetStemId
ClassMethod GetStemId(pDomainId As %Integer, pStemValue As %String, vSrcId As %Integer = 0) As %Integer
Returns the stem ID corresponding to the specified stem value, if any.
When specifying a Virtual Source ID, it will treat the stem as a virtual one, in the context of that vSrcId.
GetStemIdInternal
ClassMethod GetStemIdInternal(pDomainId As %Integer, ByRef pStemValue As %String, vSrcId As %Integer = 0, pStripPunctuation As %Boolean = 1) As %Integer [ Internal ]
Internal version of GetStemId. pStripPunctuation should be set to 0 when called for user-supplied input (e.g. from GetStemId)
GetFrequency
ClassMethod GetFrequency(domainId As %Integer, entUniId As %Integer, enttype As %Integer = {$$$ENTTYPEANY}, vSrcId As %Integer = 0, filter As %iKnow.Filters.Filter = "", Output sc As %Status = {$$$OK}) As %Integer
Returns the frequency of the entity corresponding to the supplied entUniId, occurring in a concept role (if enttype = $$$ENTTYPECONCEPT), a relationship role (if enttype = $$$ENTTYPERELATION) or both (enttype = $$$ENTTYPEANY).
When specifying a Virtual Source ID, the frequency within the virtual source will be returned.
GetStemFrequency
ClassMethod GetStemFrequency(pDomainId As %Integer, pStemUniId As %Integer, pEntType As %Integer = {$$$ENTTYPEANY}, vSrcId As %Integer = 0, pFilter As %iKnow.Filters.Filter = "", Output pSC As %Status = {$$$OK}) As %Integer
Returns the frequency of the stem corresponding to the supplied pStemUniId, occurring in a concept role (if pEntType = $$$ENTTYPECONCEPT), a relationship role (if pEntType = $$$ENTTYPERELATION) or both (pEntType = $$$ENTTYPEANY).
When specifying a Virtual Source ID, the frequency within the virtual source will be returned.
GetSpread
ClassMethod GetSpread(domainId As %Integer, entUniId As %Integer, enttype As %Integer = {$$$ENTTYPEANY}, filter As %iKnow.Filters.Filter = "", Output sc As %Status = {$$$OK}) As %Integer
Returns the spread of the entity corresponding to the supplied entUniId, occurring in a concept role (if enttype = $$$ENTTYPECONCEPT), a relationship role (if enttype = $$$ENTTYPERELATION) or both (enttype = $$$ENTTYPEANY).
GetStemSpread
ClassMethod GetStemSpread(pDomainId As %Integer, pStemUniId As %Integer, pEntType As %Integer = {$$$ENTTYPEANY}, pFilter As %iKnow.Filters.Filter = "", Output pSC As %Status = {$$$OK}) As %Integer
Returns the spread of the stem corresponding to the supplied pStemUniId, occurring in a concept role (if pEntType = $$$ENTTYPECONCEPT), a relationship role (if pEntType = $$$ENTTYPERELATION) or both (pEntType = $$$ENTTYPEANY).
GetLiteral
ClassMethod GetLiteral(pDomainId As %Integer, pPartId As %Integer, vSrcId As %Integer = 0) As %String
Returns the literal value for a particular Part ID, as it occurred in the original text.
GetSimilar
ClassMethod GetSimilar(ByRef result, domainid As %Integer, part As %String, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", filtermode As %Integer = {$$$FILTERONLY}, mode As %Integer = {$$$USEDOMAINDEFAULT}, skipListIds As %List = "", pEntRole As %Integer = {$$$ENTTYPEANY}, pUseStems As %Boolean = 0) As %Status
This method will return all entities in the specified domain that are "similar" to the supplied part string. Similarity is defined using the mode parameter. The default setting ($$$USEPARTS), will retrieve all clusters containing at least one word starting with the supplied string, whereas $$$USENGRAMS will search for any character sequence within the whole entity. With mode = $$$USEWORDS, the behavior is the same as $$$USEPARTS but the supplied part needs to occur as a whole word in the retrieved clusters.
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 CRCs 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.
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
GetSimilarBits
ClassMethod GetSimilarBits(pGlobalName As %String, pDomainId As %Integer, pString As %String, pFilter As %iKnow.Filters.Filter = "", pMode As %Integer = {$$$USEDOMAINDEFAULT}, pSkipListIds As %List = "", pUseStems As %Boolean = 0) As %Status [ Internal ]
Internal method used by %iKnow.DeepSee.Dimensions.SimilarEntities
GetSimilarIds
ClassMethod GetSimilarIds(pGlobalName As %String, pDomainId As %Integer, pString As %String, pFilter As %iKnow.Filters.Filter = "", pMode As %Integer = {$$$USEDOMAINDEFAULT}, pSkipListIds As %List = "", pEntRole As %Integer = {$$$ENTTYPEANY}, pUseStems As %Boolean = 0) As %Status [ Internal ]
Note: this method always returns all results and only writes to a global (no return var)
GetSimilarCounts
ClassMethod GetSimilarCounts(domainid As %Integer, part As %String, filter As %iKnow.Filters.Filter = "", mode As %Integer = {$$$USEDOMAINDEFAULT}, skipListIds As %List = "", Output sc As %Status = {$$$OK}, entType As %Integer = {$$$ENTTYPEANY}, pUseStems As %Boolean = 0) As %List
This method returns aggregated details on the entities similar to a supplied text fragment part. The returned list contains the total number of distinct entities similar to part appearing in sources satisfying the supplied filter (if defined), their total aggregated frequency (with respect to filter, if defined) and the total number of sources containing at least one of these "similar" entities (again, respecting filter, if defined).
See also GetSimilar for a description of the other parameters.
Setting the entType parameter to $$$ENTTYPECONCEPT or $$$ENTTYPERELATION will restrict the result to only include entity occurrences of the specified type in the returned number of distinct entities and aggregated frequency. If an entity occurs as both a concept and a relationship (typically in <1% of cases), it contributes to the aggregated spread regardless of entType.
GetTop
ClassMethod GetTop(ByRef result, domainid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", filtermode As %Integer = {$$$FILTERONLY}, sorttype As %Integer = {$$$SORTBYDOMAINDEFAULT}, enttype As %Integer = {$$$ENTTYPECONCEPT}, vSrcId As %Integer = 0, skipListIds As %List = "", pUseStems As %Boolean = 0) As %Status
This method returns the most frequently occurring entities in the specified 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 CRCs 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.
Through the enttype parameter, the method can be instructed to return either concepts ($$$ENTTYPECONCEPT) or relations ($$$ENTTYPERELATION). When looking for top concepts, those shorter than 3 characters are skipped.
Returned values are either sorted by descending frequency (with sorttype $$$SORTBYFREQUENCY), spread (with sorttype $$$SORTBYSPREAD) or the domain default (with sorttype $$$SORTBYDOMAINDEFAULT).
If a Virtual Source ID is provided, only the entities in that virtual source will be considered, filters are ignored and the sort type will always be $$$SORTBYFREQUENCY.
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
GetByFilter
ClassMethod GetByFilter(ByRef result, domainid As %Integer, filter As %iKnow.Filters.Filter = "", filtermode As %Integer = {$$$FILTERONLY}, enttype As %Integer = {$$$ENTTYPECONCEPT}, skipListIds As %List = "", pUseStems As %Boolean = 0) As %Status
Returns all entities appearing in any source satisfying the supplied filter objects criteria, with their frequencies and spread recalculated to comply with the filter depending on the value of filtermode, but the result is NOT re-sorted, regardless of the value for filtermode (use GetTop if you want sorted results).
Depending on the value of enttype parameter, this method will only return concepts ($$$ENTTYPECONCEPT, default), relations ($$$ENTTYPERELATION) or both ($$$ENTTYPEANY).
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
GetByFilterInternal
ClassMethod GetByFilterInternal(ByRef result, domainid As %Integer, filter As %iKnow.Filters.Filter, filtermode As %Integer = {$$$FILTERONLY}, enttype As %Integer = {$$$ENTTYPECONCEPT}, skipListIds As %List = "", sortIndex As %Integer = -1, pUseStems As %Boolean = 0, pTopConcepts As %Boolean = 0) As %Status [ Internal ]
sortIndex = -1 means regular output, otherwise an additional first subscript will be introduced to sort by frequency ($$$SORTBYFREQUENCY) or spread ($$$SORTBYSPREAD): result(-sort, entUniId) WARNING: for internal use only, no input checking is performed and Skiplists must have been set up!
GetByFilterInternal20121
ClassMethod GetByFilterInternal20121(ByRef result, domainid As %Integer, filter As %iKnow.Filters.Filter = "", filtermode As %Integer = {$$$FILTERONLY}, enttype As %Integer = {$$$ENTTYPECONCEPT}, skipListIds As %List = "", sortIndex As %Integer = -1) As %Status [ Internal ]
GetBySource
ClassMethod GetBySource(ByRef result, domainid As %Integer, sourceidlist As %List, page As %Integer = 1, pagesize As %Integer = 10, enttype As %Integer = {$$$ENTTYPEANY}, skipListIds As %List = "", pUseStems As %Boolean = 0) As %Status
Returns the unique entities appearing in the sources specified.
To get the unique entities of a virtual source, only a single virtual source can be supplied using its negative ID value.
GetCountByDomain
ClassMethod GetCountByDomain(domainid As %Integer, filter As %iKnow.Filters.Filter = "", Output sc As %Status = {$$$OK}, skipListIds As %List = "", includeZeroFrequency As %Boolean = 0, pUseStems As %Boolean = 0) As %Integer
Returns the total number of distinct entities for this domain, optionally filtered to a set of sources satisfying the %iKnow.Filters.Filter object supplied through filter. Depending on the value of includeZeroFrequency, entities not appearing in any source (but registered in the domain for other purposes) are included or excluded from the result.
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
GetCountBySource
ClassMethod GetCountBySource(domainid As %Integer, sourceidlist As %List, setop As %Integer = {$$$UNION}, Output sc As %Status = {$$$OK}, skipListIds As %List = "", enttype As %Integer = {$$$ENTTYPEANY}, pUseStems As %Boolean = 0) As %Integer
Returns the total number of distinct entities for a given list of sources. The count returned either represents the entities appearing in either (with setop $$$UNION) or all (with setop $$$INTERSECT) of the supplied sources. Using enttype, the returned count is filtered to just entities ($$$ENTTYPECONCEPT), relations ($$$ENTTYPERELATION). The default is unfiltered ($$$ENTTYPEANY).
To get the unique entities of a virtual source, only a single virtual source can be supplied using its negative ID value (otherwise, -1 is returned).
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
GetOccurrenceCountBySource
ClassMethod GetOccurrenceCountBySource(domainid As %Integer, sourceidlist As %List, Output sc As %Status = {$$$OK}, enttype As %Integer = {$$$ENTTYPEANY}) As %Integer
Returns the total number of entity occurrences for the given list of sources. Use negative source IDs to refer to virtual sources.
GetOccurrenceCountByDomain
ClassMethod GetOccurrenceCountByDomain(pDomainId As %Integer, pFilter As %iKnow.Filters.Filter = "", pEntType As %Integer = {$$$ENTTYPEANY}, Output pSC As %Status = {$$$OK}) As %Integer
Returns the total number of entity occurrences in a domain.
GetRelated
ClassMethod GetRelated(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}, aggregationtype As %Integer = {$$$AGGSUM}, setop As %Integer = {$$$UNION}, sorttype As %Integer = {$$$SORTBYDOMAINDEFAULT}, skipListIds As %List = "") As %Status
This method will return all entities occurring in a direct relationship with at least on (if setop = $$$UNION) or all (if setop = $$$INTERSECT) of the entities in the supplied entitylist, anywhere within 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 CRCs 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.
Through the positionstomatch parameter, the user can specify whether the entities returned should be occurring on the Head side ($$$USEPOSH), the Tail side ($$$USEPOST) or either ($$$USEPOSHT, default) side of the relationship.
The aggregationtype parameter lets you choose how to aggregate the frequency and spread of results related to multiple entries in the input entitylist.
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
Note: this method only returns entities that appear in direct relationships with the seed entity. For the broader context of entities, including indirect relationships (still within a single path), please refer to %iKnow.Semantics.ProximityAPI
GetRelatedById
ClassMethod GetRelatedById(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}, aggregationtype As %Integer = {$$$AGGSUM}, setop As %Integer = {$$$UNION}, sorttype As %Integer = {$$$SORTBYDOMAINDEFAULT}, skipListIds As %List = "") As %Status
Returns the entities directly related to a supplied list of entity IDs.
See GetRelated for a description of the parameters.
GetRelatedInternal
ClassMethod GetRelatedInternal(ByRef result, domainid As %Integer, ByRef entIdList, page As %Integer, pagesize As %Integer, filter As %iKnow.Filters.Filter, filtermode As %Integer, positionstomatch As %Integer, aggregationtype As %Integer, setop As %Integer, sorttype As %Integer, skipListIds As %List) As %Status [ Internal ]
GetRelatedInternal20121
ClassMethod GetRelatedInternal20121(ByRef result, domainid As %Integer, ByRef entIdList, page As %Integer, pagesize As %Integer, filter As %iKnow.Filters.Filter, filtermode As %Integer, positionstomatch As %Integer, aggregationtype As %Integer, setop As %Integer, sorttype As %Integer, skipListIds As %List) As %Status [ Internal ]
GetRelatedCount
ClassMethod GetRelatedCount(domainid As %Integer, entitylist As %List, filter As %iKnow.Filters.Filter = "", positionstomatch As %Integer = {$$$USEPOSHT}, setop As %Integer = {$$$UNION}, Output sc As %Status = {$$$OK}, pIncludeActualForms As %Boolean = 0) As %Integer
Returns the number of related entities for a given list of entities.
See GetRelated for a description of the parameters.
GetRelatedCountById
ClassMethod GetRelatedCountById(domainid As %Integer, entityidlist As %List, filter As %iKnow.Filters.Filter = "", positionstomatch As %Integer = {$$$USEPOSHT}, setop As %Integer = {$$$UNION}, Output sc As %Status = {$$$OK}, pIncludeActualForms As %Boolean = 0) As %Integer
Returns the number of related entities for a given list of entity ids.
See GetRelated for a description of the parameters.
GetRelatedCountInternal
ClassMethod GetRelatedCountInternal(domainid As %Integer, ByRef entityIdList, filter As %iKnow.Filters.Filter, positionstomatch As %Integer, setop As %Integer, Output sc As %Status = {$$$OK}) As %Integer [ Internal ]
GetRelatedCountInternal20121
ClassMethod GetRelatedCountInternal20121(domainid As %Integer, ByRef entityIdList, filter As %iKnow.Filters.Filter, positionstomatch As %Integer, setop As %Integer, Output sc As %Status = {$$$OK}) As %Integer [ Internal ]
GetNewBySource
ClassMethod GetNewBySource(ByRef result, domainid As %Integer, sourceidlist As %List, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", entType As %Integer = {$$$ENTTYPECONCEPT}, algorithm As %String = {$$$NEWENTSIMPLE}, algorithmParams As %List = "", skipListIds As %List = "", pUseStems As %Boolean = 0) As %Status
Retrieves the significant entities in a list of sources supplied through sourceidlist, as compared to the other sources in the domain (optionally filtered through a %iKnow.Filters.Filter object specified through filter).
The following algorithm values are currently available:
- $$$NEWENTSIMPLE - takes no parameters
To get the significant entities of a virtual source compared to the non-virtual ones in the domain, only a single virtual source can be supplied using its negative ID value.
Through the enttype parameter, the method can be instructed to return either concepts ($$$ENTTYPECONCEPT) or relations ($$$ENTTYPERELATION).
Through the skipListIds parameter, a user can supply one or more lists of (to the user) insignificant terms that should be excluded from the result.
TranslateEntityList
ClassMethod TranslateEntityList(domainid As %Integer, entitylist As %List, Output ids, vSrcId As %Integer = 0, Output unMatchedCount As %Integer, pForms As %Integer = 0) As %Status [ Internal ]
translate a list of entities to EntUniIds, removing inexistent entities and duplicates pForms values for domains with stemming: - 0 does no translation - 1 includes other actual forms stemming to the same stem as the supplied entities - 2 returns a two-level array with stems at level 1 and entities at level 2 (ids([stemUniId],[entUniId])
TranslateEntityIdList
ClassMethod TranslateEntityIdList(domainid As %Integer, entIdList As %List, Output ids, vSrcId As %Integer = 0, Output unMatchedCount As %Integer, pForms As %Integer = 0) As %Status [ Internal ]
clean a list of EntUniIds from duplicates and inexistent ids pForms values: - 0 does no translation - 1 includes other actual forms stemming to the same stem as the supplied entities - 2 returns a two-level array with stems at level 1 and entities at level 2 (ids([stemUniId],[entUniId])
GetTopGroups
ClassMethod GetTopGroups(ByRef result, domainId As %Integer, page As %Integer = 1, pageSize As %Integer = 10, filter As %iKnow.Filters.Filter = "", skipListIds As %List = "", language As %String = "en", entType As %Integer = {$$$ENTTYPECONCEPT}, pUseStems As %Boolean = 0) As %Status [ Internal ]
GetOccurrenceAttributes
ClassMethod GetOccurrenceAttributes(ByRef pResult, pDomainId As %Integer, pPartId As %Integer, vSrcId As %Integer = 0) As %Status
Returns all attributes for a given part. Any named attribute properties are also included through sub-nodes (not available through SQL or SOAP):
pResult(rowNumber, propertyName) = propertyValue
The returned wordPositions only extend to the last attributed word position (there might be more words within the entity).
IsAttributed
ClassMethod IsAttributed(pDomainId As %Integer, pEntOccId As %Integer, pAttTypeId As %Integer, vSrcId As %Integer = 0, Output pSC As %Status = {$$$OK}) As %Boolean
Checks if a given entity occurrence has the requested attribute pAttTypeId.
IsAttributedInternal
ClassMethod IsAttributedInternal(pDomainId As %Integer, pEntOccId As %Integer, pAttTypeId As %Integer, pEntOccInfo As %List = "", vSrcId As %Integer = 0, pLevel As %Integer = {$$$IKATTLVLANY}) As %Boolean [ Internal ]
GetTopBM25
ClassMethod GetTopBM25(ByRef pResult, pDomainId As %Integer, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pEntType As %Integer = {$$$ENTTYPECONCEPT}, pUseStems As %Boolean = 0) As %Status
Returns the top entities for a given domain (optionally filtered through pFilter) calculated using a metric based on the Okapi BM25 standard, which combines an entity's frequency with its Inverse Document Frequency, taking into account document length.
GetTopTFIDF
ClassMethod GetTopTFIDF(ByRef pResult, pDomainId As %Integer, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pEntType As %Integer = {$$$ENTTYPECONCEPT}, pUseStems As %Boolean = 0) As %Status
Returns the top entities for a given domain (optionally filtered through pFilter) by multiplying their Term Frequency with their Inverse Document Frequency: IDF(e) = $zlog( [ SourceCount - spread(e) + 0.5 ] / [ spread(e) + 0.5 ] )
GetNBProbabilityInternal
ClassMethod GetNBProbabilityInternal(pDomainId As %Integer, pEntUniId As %Integer, pFilter As %iKnow.Filters.Filter, pReferenceSetFilter As %iKnow.Filters.Filter = "", Output pSC As %Status, pUseStems As %Boolean = 0) As %Double [ Internal ]
GetOccurrencesById
ClassMethod GetOccurrencesById(ByRef pResult, pDomainId As %Integer, pEntUniIds As %List, pPage As %Integer = 1, pPageSize As %Integer = 10, pFilter As %iKnow.Filters.Filter = "", pAttributeId As %Integer = {$$$IKATTNEGATION}, vSrcId As %Integer = 0, pIncludeActualForms As %Boolean = 0) As %Status
Returns all occurrences for any of the given unique entities in pEntUniIds, including whether the attribute pAttributeId is applicable to this occurrence.
If this domain is configured for stemming using $$$IKPSTEMMING, any actual entities corresponding to pEntUniIds elements will be returned.
GetLevenshteinDistance
ClassMethod GetLevenshteinDistance(pString1 As %String, pString2 As %String, Output pSC As %Status, pDomainId As %Integer = "") As %Double [ Internal ]
BuildAttributePropArray
ClassMethod BuildAttributePropArray(pAttributeTypeId As %Integer, pPropList As %List, Output pPropArray) As %Status [ Internal ]
Given an attribute type (ID) and a list of stored properties, build a key/value array with the right names for each position.
AttributePropNames
ClassMethod AttributePropNames(pAttributeTypeId As %Integer, pCount As %Integer = 10) As %List [ Deprecated, Internal ]
backward compatibility support for $$$IKATTTYPEPROPS macro. Use BuildAttributeProps for any new development