Class Reference
%iKnow.Queries.SourceQAPI
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%iKnow] >  [Queries] >  [SourceQAPI]
Private  Storage

class %iKnow.Queries.SourceQAPI extends %iKnow.Queries.AbstractQAPI

This is an automatically generated class, offering a functionally equivalent set of methods and queries as %iKnow.Queries.SourceAPI, exposed as SqlProc methods.

See the classdocs for %iKnow.Queries.SourceAPI for more information.

This class was generated by %iKnow.Queries.SourceAPI.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
48 12


Summary

Methods
%%OIDGet %AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject GetByCrcIdsClose GetByCrcIdsExecute GetByCrcIdsFetch
GetByCrcMaskClose GetByCrcMaskExecute GetByCrcMaskFetch GetByCrcsClose
GetByCrcsExecute GetByCrcsFetch GetByDomainClose GetByDomainExecute
GetByDomainFetch GetByEntitiesClose GetByEntitiesExecute GetByEntitiesFetch
GetByEntityIdsClose GetByEntityIdsExecute GetByEntityIdsFetch GetByEquivalentIdsClose
GetByEquivalentIdsExecute GetByEquivalentIdsFetch GetByEquivalentsClose GetByEquivalentsExecute
GetByEquivalentsFetch GetByPathIdsClose GetByPathIdsExecute GetByPathIdsFetch
GetCountByCrcIds GetCountByCrcMask GetCountByCrcs GetCountByDomain
GetCountByEntities GetCountByEntityIds GetCountByPathIds GetExternalId
GetFullReference GetLanguagesClose GetLanguagesExecute GetLanguagesFetch
GetSimilarClose GetSimilarExecute GetSimilarFetch GetSourceId
GetSummaryClose GetSummaryDirect GetSummaryExecute GetSummaryFetch
GetTopLanguage


Methods

• classmethod GetCountByCrcIds(domainid As %Integer, crcidlist As %String, filter As %String = "", setop As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc ]

Retrieves the number of sources containing the given CRC ids.

See also GetByEntities for a description of the parameters.

• classmethod GetCountByCrcMask(domainid As %Integer, master As %String(MAXLEN=32767)=$$$WILDCARD, relation As %String(MAXLEN=32767)=$$$WILDCARD, slave As %String(MAXLEN=32767)=$$$WILDCARD, filter As %String = "", Output scText As %String = "") as %Library.Integer [ SQLProc ]

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

See also GetByEntities for a description of the parameters.

• classmethod GetCountByCrcs(domainid As %Integer, crclist As %String, filter As %String = "", setop As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc ]

Retrieves the number of sources containing the given CRCs.

See also GetByEntities for a description of the parameters.

• classmethod GetCountByDomain(domainid As %Integer, filter As %String = "", Output scText As %String = "") as %Library.Integer [ SQLProc ]

This method returns the total number of sources in the specified domain, optionally filtered through a %iKnow.Filters.Filter object passed in as filter.

• classmethod GetCountByEntities(domainid As %Integer, entitylist As %String, filter As %String = "", setop As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc ]

Retrieves the number of sources containing the given entities.

See also GetByEntities for a description of the parameters.

• classmethod GetCountByEntityIds(domainid As %Integer, entityidlist As %String, filter As %String = "", setop As %Integer = $$$UNION, Output scText As %String = "") as %Library.Integer [ SQLProc ]

Retrieves the number of sources containing the given entity ids.

See also GetByEntities for a description of the parameters.

• classmethod GetCountByPathIds(domainid As %Integer, pathidlist As %String, filter As %String = "", Output scText As %String = "") as %Library.Integer [ SQLProc ]

Retrieves the number of sources containing the given path ids.

See also GetByEntities for a description of the parameters.

• classmethod GetExternalId(domainid As %Integer, srcId As %Integer, Output scText As %String = "") as %Library.String [ SQLProc ]

Retrieves the external ID for the source identified by srcId.

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

• classmethod GetFullReference(domainId As %Integer, srcId As %Integer, Output scText As %String = "") as %Library.String [ SQLProc ]

Retrieves the Full Reference for the source identified by srcId.

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

• classmethod GetSourceId(domainid As %Integer, externalId As %String(MAXLEN=32767), Output scText As %String = "") as %Library.Integer [ SQLProc ]

Retrieves the source ID for the source identified by externalId.

• classmethod GetSummaryDirect(domainId As %Integer, sourceId As %Integer, length As %Integer = 5, Output isTruncated As %Boolean = 0, Output scText As %String = "", separator As %String(MAXLEN=32767)=" ... ") as %Library.String [ SQLProc ]

This is a utility wrapper method around GetSummary, 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.

• classmethod GetTopLanguage(domainid As %Integer, sourceid As %Integer, Output totalConfidence As %Numeric = "", Output numberOfSentences As %Integer = "", Output scText As %String = "") as %Library.String [ SQLProc ]

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.


Queries

• query GetByCrcIds(domainid As %Integer, crcidlist As %String, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "", setop As %Integer = $$$UNION)
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

Retrieves all sources containing the given CRC ids.

See also GetByEntities for a description of the parameters.

• query GetByCrcMask(domainid As %Integer, master As %String(MAXLEN=32767)=$$$WILDCARD, relation As %String(MAXLEN=32767)=$$$WILDCARD, slave As %String(MAXLEN=32767)=$$$WILDCARD, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "")
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

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

See also GetByEntities for a description of the parameters.

• query GetByCrcs(domainid As %Integer, crclist As %String, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "", setop As %Integer = $$$UNION)
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

Retrieves all sources containing the given CRCs.

See also GetByEntities for a description of the parameters.

• query GetByDomain(domainid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "")
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

Returns a list of all sources within a domain, optionally filtered through a %iKnow.Filters.Filter object passed in as filter.

• query GetByEntities(domainid As %Integer, entitylist As %String, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "", setop As %Integer = $$$UNION)
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

This method will retrieve all sources containing any (if = $$$UNION) or all (if = $$$INTERSECT) of the entities supplied through 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 sources satisfying the filter criteria.

Results are ordered by decreasing source id.

• query GetByEntityIds(domainid As %Integer, entityidlist As %String, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "", setop As %Integer = $$$UNION)
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

Retrieves all sources containing the given entity ids.

See also GetByEntities for a description of the parameters.

• query GetByEquivalentIds(domainid As %Integer, entityidlist As %String, setid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "")
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)
• query GetByEquivalents(domainid As %Integer, entitylist As %String, setid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "")
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)
• query GetByPathIds(domainid As %Integer, pathidlist As %String, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "")
Selects srcId As %Integer, externalId As %String(MAXLEN=32767)

Retrieves all sources containing the given path ids.

See also GetByEntities for a description of the parameters.

• query GetLanguages(domainid As %Integer, sourceid As %Integer)
Selects language As %String(MAXLEN=32767), totalConfidence As %Numeric, sentenceCount As %Integer

This method returns, for a given source, the list of 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.

• query GetSimilar(domainid As %Integer, sourceid As %Integer, page As %Integer = 1, pagesize As %Integer = 10, filter As %String = "", algorithm As %String(MAXLEN=32767)=$$$SIMSRCSIMPLE, algorithmParams As %String = "", blackListIds As %String = "")
Selects srcId As %Integer, extId As %String(MAXLEN=32767), percentageMatched As %Numeric, percentageNew As %Numeric, nbOfEntsInRefSrc As %Integer, nbOfEntsInCommon As %Integer, nbOfEntsInSimSrc As %Integer, score As %Numeric

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 blackListIds parameter allows a user to select one or more BlackLists of which the elements should be completely ignored in the similarity algorithm. Blacklisted 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 "nbOfEnt***"
  • $$$SIMSRCEQUIVS: similar to $$$SIMSRCSIMPLE, but also taking into account equivalent terms.
    Parameters:
    1. equivSetId As %Integer - equivalency set ID
  • $$$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)
• query GetSummary(domainid As %Integer, sourceid As %Integer, length As %Integer = 5)
Selects sentId As %Integer, sentenceValue As %String(MAXLEN=32767), sentenceIsTruncated As %Boolean

This method returns the most relevant sentences of the required document, 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.