IRISLIB database
SourceAPI Class Reference
Inheritance diagram for SourceAPI:
Collaboration diagram for SourceAPI:

Static Public Member Functions

_.Library.Status GetAttributes (pResult, _.Library.Integer pDomainId, _.Library.Integer pSrcId, _.Library.Integer pPage, _.Library.Integer pPageSize, _.Library.List pTypes, _.Library.Integer pLevel)
 
_.Library.Status GetByCrcIds (result, _.Library.Integer domainid, _.Library.List crcidlist, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.String sortByField)
 
_.Library.Status GetByCrcMask (result, _.Library.Integer domainid, _.Library.String head, _.Library.String relation, _.Library.String tail, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.String sortByField, _.Library.Boolean pActualFormOnly)
 
_.Library.Status GetByCrcs (result, _.Library.Integer domainid, _.Library.List crclist, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.String sortByField)
 
_.Library.Status GetByDomain (result, _.Library.Integer domainid, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.String sortByField)
 
_.Library.Status GetByEntities (result, _.Library.Integer domainid, _.Library.List entitylist, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.List attributeFilter, _.Library.String sortByField, _.Library.Boolean pActualFormOnly)
 
_.Library.Status GetByEntityIds (result, _.Library.Integer domainid, _.Library.List entityidlist, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.List attributeFilter, _.Library.String sortByField, _.Library.Boolean pActualFormOnly)
 
_.Library.Status GetByPathIds (result, _.Library.Integer domainid, _.Library.List pathidlist, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.String sortByField)
 
_.Library.Integer GetCountByCrcIds (_.Library.Integer domainid, _.Library.List crcidlist, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.Status sc)
 
_.Library.Integer GetCountByCrcMask (_.Library.Integer domainid, _.Library.String head, _.Library.String relation, _.Library.String tail, _.iKnow.Filters.Filter filter, _.Library.Status sc, _.Library.Boolean pActualFormOnly)
 
_.Library.Integer GetCountByCrcs (_.Library.Integer domainid, _.Library.List crclist, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.Status sc)
 
_.Library.Integer GetCountByDomain (_.Library.Integer domainid, _.iKnow.Filters.Filter filter, _.Library.Status sc)
 
_.Library.Integer GetCountByEntities (_.Library.Integer domainid, _.Library.List entitylist, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.Status sc, _.Library.Boolean pActualFormOnly)
 
_.Library.Integer GetCountByEntityIds (_.Library.Integer domainid, _.Library.List entityidlist, _.iKnow.Filters.Filter filter, _.Library.Integer setop, _.Library.Status sc, _.Library.Boolean pActualFormOnly)
 
_.Library.Integer GetCountByPathIds (_.Library.Integer domainid, _.Library.List pathidlist, _.iKnow.Filters.Filter filter, _.Library.Status sc)
 
_.Library.String GetExternalId (_.Library.Integer domainid, _.Library.Integer srcId, _.Library.Status sc)
 
_.Library.String GetFullReference (_.Library.Integer domainId, _.Library.Integer srcId, _.Library.Status sc)
 
_.Library.Status GetLanguages (result, _.Library.Integer domainid, _.Library.Integer sourceid)
 
_.Library.Status GetSimilar (result, _.Library.Integer domainid, _.Library.Integer sourceid, _.Library.Integer page, _.Library.Integer pagesize, _.iKnow.Filters.Filter filter, _.Library.String algorithm, _.Library.List algorithmParams, _.Library.List skipListIds)
 
_.Library.Integer GetSourceId (_.Library.Integer domainid, _.Library.String externalId, _.Library.Status sc)
 
_.Library.Status GetSummary (result, _.Library.Integer domainId, _.Library.Integer srcId, _.Library.Integer length, _.Library.String summaryConfig)
 
_.Library.String GetSummaryDirect (_.Library.Integer domainId, _.Library.Integer sourceId, _.Library.Integer length, _.Library.Boolean isTruncated, _.Library.Status sc, _.Library.String separator, _.Library.String summaryConfig)
 
_.Library.Status GetSummaryForText (pResult, _.Library.Integer pDomainId, _.Library.String pText, _.Library.Integer pLength, _.Library.String pSummaryConfig, _.Library.String pLanguage, _.Library.String pUserDict)
 
_.Library.String GetTopLanguage (_.Library.Integer domainid, _.Library.Integer sourceid, _.Library.Numeric totalConfidence, _.Library.Integer numberOfSentences, _.Library.Status sc)
 

Static Public Attributes

 GetAttributesRT = None
 

Detailed Description

The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentation for more detail.

Main Query API for retrieving sources and related information.

Member Function Documentation

◆ GetAttributes()

_.Library.Status GetAttributes (   pResult,
_.Library.Integer  pDomainId,
_.Library.Integer  pSrcId,
_.Library.Integer  pPage,
_.Library.Integer  pPageSize,
_.Library.List  pTypes,
_.Library.Integer  pLevel 
)
static

Returns all the attributes of the Entity Occurrences, Paths and Sentences enclosed in the

specified source, optionally filtered by level through pLevel and/or pType.

Please note the startPos and span result columns refer to positions within the path for path-level attributes (level=$$$IKATTLVLPATH) and sentence positions for the other attributes (level=$$$IKATTLVLSENT).

◆ GetByCrcIds()

_.Library.Status GetByCrcIds (   result,
_.Library.Integer  domainid,
_.Library.List  crcidlist,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.String  sortByField 
)
static

Retrieves all sources containing the given CRC ids.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetByCrcMask()

_.Library.Status GetByCrcMask (   result,
_.Library.Integer  domainid,
_.Library.String  head,
_.Library.String  relation,
_.Library.String  tail,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.String  sortByField,
_.Library.Boolean  pActualFormOnly 
)
static

Retrieves all sources containing a CRC satisfying the given CRC Mask.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetByCrcs()

_.Library.Status GetByCrcs (   result,
_.Library.Integer  domainid,
_.Library.List  crclist,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.String  sortByField 
)
static

Retrieves all sources containing the given CRCs.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetByDomain()

_.Library.Status GetByDomain (   result,
_.Library.Integer  domainid,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.String  sortByField 
)
static

Returns all sources within a domain, optionally filtered through

a <class>iKnow.Filters.Filter</class> object passed in as filter.

◆ GetByEntities()

_.Library.Status GetByEntities (   result,
_.Library.Integer  domainid,
_.Library.List  entitylist,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.List  attributeFilter,
_.Library.String  sortByField,
_.Library.Boolean  pActualFormOnly 
)
static

This method will retrieve all sources containing any (if setop = $$$UNION) or all (if setop =

$$$INTERSECT) of the entities supplied through entitylist.

The scope of this query can be limited through supplying a <class>iKnow.Filters.Filter</class> object for the filter parameter to restrict the result to those sources satisfying the filter criteria.

By default, results are ordered by decreasing source id. You can override this by setting sortByField to the name of a metadata field (optionally appended with " ASC" or " DESC" for this domain to order by that field's value.

The attributeFilter argument can be used to filter the results to only those where the requested entities (entitylist) appear in the context of a particular (set of) attribute(s). By using the negative attribute ID, you can select only those occurrences NOT appearing in the context of that attribute. For example, passing in $lb($$$IKATTNEGATION) will restrict the result to only those entities in a negative context and $lb(-$$$IKATTNEGATION) the ones in an affirmative context. Note that the use of this argument may have a significant performance impact.

If stemming is enabled for this domain through $$$IKPSTEMMING, sources containing any actual form of the entities in entityList will be returned. Use pActualFormOnly=1 to retrieve only those sources containing the actual forms in entitylist. This argument is ignored if stemming is not enabled.

◆ GetByEntityIds()

_.Library.Status GetByEntityIds (   result,
_.Library.Integer  domainid,
_.Library.List  entityidlist,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.List  attributeFilter,
_.Library.String  sortByField,
_.Library.Boolean  pActualFormOnly 
)
static

Retrieves all sources containing the given entity ids.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetByPathIds()

_.Library.Status GetByPathIds (   result,
_.Library.Integer  domainid,
_.Library.List  pathidlist,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.String  sortByField 
)
static

Retrieves all sources containing the given path ids.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetCountByCrcIds()

_.Library.Integer GetCountByCrcIds ( _.Library.Integer  domainid,
_.Library.List  crcidlist,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.Status  sc 
)
static

Retrieves the number of sources containing the given CRC ids.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetCountByCrcMask()

_.Library.Integer GetCountByCrcMask ( _.Library.Integer  domainid,
_.Library.String  head,
_.Library.String  relation,
_.Library.String  tail,
_.iKnow.Filters.Filter  filter,
_.Library.Status  sc,
_.Library.Boolean  pActualFormOnly 
)
static

Retrieves the number of sources containing a CRC satisfying the given CRC Mask.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetCountByCrcs()

_.Library.Integer GetCountByCrcs ( _.Library.Integer  domainid,
_.Library.List  crclist,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.Status  sc 
)
static

Retrieves the number of sources containing the given CRCs.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetCountByDomain()

_.Library.Integer GetCountByDomain ( _.Library.Integer  domainid,
_.iKnow.Filters.Filter  filter,
_.Library.Status  sc 
)
static

This method returns the total number of sources in the specified domain, optionally filtered

through a <class>iKnow.Filters.Filter</class> object passed in as filter.

◆ GetCountByEntities()

_.Library.Integer GetCountByEntities ( _.Library.Integer  domainid,
_.Library.List  entitylist,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.Status  sc,
_.Library.Boolean  pActualFormOnly 
)
static

Retrieves the number of sources containing the given entities.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetCountByEntityIds()

_.Library.Integer GetCountByEntityIds ( _.Library.Integer  domainid,
_.Library.List  entityidlist,
_.iKnow.Filters.Filter  filter,
_.Library.Integer  setop,
_.Library.Status  sc,
_.Library.Boolean  pActualFormOnly 
)
static

Retrieves the number of sources containing the given entity ids.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetCountByPathIds()

_.Library.Integer GetCountByPathIds ( _.Library.Integer  domainid,
_.Library.List  pathidlist,
_.iKnow.Filters.Filter  filter,
_.Library.Status  sc 
)
static

Retrieves the number of sources containing the given path ids.

See also <method>GetByEntities</method> for a description of the parameters.

◆ GetExternalId()

_.Library.String GetExternalId ( _.Library.Integer  domainid,
_.Library.Integer  srcId,
_.Library.Status  sc 
)
static

Retrieves the external ID for the source identified by srcId.

A negative srcId is considered to refer to a Virtual Source.

◆ GetFullReference()

_.Library.String GetFullReference ( _.Library.Integer  domainId,
_.Library.Integer  srcId,
_.Library.Status  sc 
)
static

Retrieves the Full Reference for the source identified by srcId.

A negative srcId is considered to refer to a Virtual Source.

◆ GetLanguages()

_.Library.Status GetLanguages (   result,
_.Library.Integer  domainid,
_.Library.Integer  sourceid 
)
static

This method returns, for a given source, all languages the iKnow Automatic Language

Identification algorithm has identified for the sentences it contains. For each language, it will list the sum of ALI confidence ratings when assigning the language to a sentence, plus the total number of sentences the language was assigned to. If ALI was disabled when indexing this source, confidence ratings will be set to 0.

A negative Source ID is interpreted as a Virtual Source.

◆ GetSimilar()

_.Library.Status GetSimilar (   result,
_.Library.Integer  domainid,
_.Library.Integer  sourceid,
_.Library.Integer  page,
_.Library.Integer  pagesize,
_.iKnow.Filters.Filter  filter,
_.Library.String  algorithm,
_.Library.List  algorithmParams,
_.Library.List  skipListIds 
)
static

Retrieves those sources that have similar content to the one specified

through the sourceId parameter. Similarity is expressed by the (approximated) ratio between the length of the source and the overlap with the starting source, based on the chosen algorithm (according to the algorithm-specific algorithmParams).

Note: whenever possible, use a filter object to limit the search space for this query to perform adequately.

If the supplied Source ID is negative, it is treated as a Virtual Source. While this allows looking for sources similar to a Virtual Source, the query will not verify against other Virtual Sources and they will therefore not appear in the results of this query.

The skipListIds parameter allows a user to select one or more SkipLists of which the elements should be completely ignored in the similarity algorithm. Skiplisted elements will be ignored both for selecting similar candidates AND the calculation of their similarity score.

The following algorithms are currently available:

  • $$$SIMSRCSIMPLE: basic algorithm simply looking at entities (or CRCs or CCs) present in the reference source.
    Parameters:

    1. targetType As String - either "ent", "crc" or "cc" (case insensitive, defaults to "ent"). Please note this implies the result columns will represent the corresponding targets, despite being named "nbOf<i>Ent</i>***"

  • $$$SIMSRCDOMENTS starts looking for similar sources based on dominant terms in the reference source.
    Parameters:
    1. strict As Boolean - whether or not to select only sources for which at least one of the reference source's dominant concepts are also dominant in a similar source. (defaults to 1)

◆ GetSourceId()

_.Library.Integer GetSourceId ( _.Library.Integer  domainid,
_.Library.String  externalId,
_.Library.Status  sc 
)
static

Retrieves the source ID for the source identified by externalId.

◆ GetSummary()

_.Library.Status GetSummary (   result,
_.Library.Integer  domainId,
_.Library.Integer  srcId,
_.Library.Integer  length,
_.Library.String  summaryConfig 
)
static

This method returns the most relevant sentences of the requested source, in their original order.

The number of sentences returned is controlled by the length parameter.

A negative Source ID is interpreted as a Virtual Source.

◆ GetSummaryDirect()

_.Library.String GetSummaryDirect ( _.Library.Integer  domainId,
_.Library.Integer  sourceId,
_.Library.Integer  length,
_.Library.Boolean  isTruncated,
_.Library.Status  sc,
_.Library.String  separator,
_.Library.String  summaryConfig 
)
static

This is a utility wrapper method around <method>GetSummary</method>, returning the summary

sentences as a single concatenated string.

The isTruncated output parameter indicates whether or not the returned string is complete or was truncated to avoid MAXSTRING errors. This can happen when either an individual sentence surpassed the maximum string length or when the concatenation of these sentences surpassed it.

◆ GetSummaryForText()

_.Library.Status GetSummaryForText (   pResult,
_.Library.Integer  pDomainId,
_.Library.String  pText,
_.Library.Integer  pLength,
_.Library.String  pSummaryConfig,
_.Library.String  pLanguage,
_.Library.String  pUserDict 
)
static

This method returns the most relevant sentences of the supplied text, in their original order.

The number of sentences returned is controlled by the length parameter.

Note: the value of pDomainId is ignored since 2013.2

◆ GetTopLanguage()

_.Library.String GetTopLanguage ( _.Library.Integer  domainid,
_.Library.Integer  sourceid,
_.Library.Numeric  totalConfidence,
_.Library.Integer  numberOfSentences,
_.Library.Status  sc 
)
static

This method returns the language of a given source, calculated as the one with the

highest total confidence rating for the individual sentences in the source. This total confidence, as well as the number of sentences to which this language was assigned is provided through output variables totalConfidence and numberOfSentences.

A totalConfidence of 0 indicates ALI was switched off when indexing this source.

A negative Source ID is interpreted as a Virtual Source.

Member Data Documentation

◆ GetAttributesRT

GetAttributesRT = None
static

The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentation for more detail.

Main Query API for retrieving sources and related information.