Class Reference
Cache for UNIX 2018.1.2
InterSystems: The power behind what matters   
Documentation  Search
Private  Storage  

persistent class %iKnow.Matching.MatchingProfile extends %Persistent

This class represents the parameters controlling the match score calculation resulting from the iKnow Smart Matching process driven from the %iKnow.Matching.MatchingAPI.

A Matching Profile can be linked to a domain, or just exist "namespace-wide", when setting the DomainId property to 0. In the latter case, the profile is typically referred to with a negative value for its ProfileId.

Use GetProfile to retrieve or instantiate a profile object.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
17 8 1


Summary

Properties
%Concurrency CrcTotalMultiplier DisorderMultiplier DomainId
MaxTermLengthForCrc MinMatchedConceptFraction MinTermLengthForPath MinTermLengthForSent
MinimalMatchScore Name NegationMultiplier PathRelevantScoreMultiplier
PathTotalMultiplier ProfileId RelationshipLengthMultiplier RelationshipScoreMultiplier
ScatteredMatchMultiplier SentTotalMultiplier

Methods
%%OIDGet %1Check %AddJrnObjToSyncSet %AddToSaveSet
%AddToSyncSet %BMEBuilt %BindExport %BuildIndices
%BuildObjectGraph %CheckConstraints %CheckConstraintsForExtent %ClassIsLatestVersion
%ClassName %Close %ComposeOid %ConstructClone
%Delete %DeleteExtent %DeleteId %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DowngradeConcurrency %ExecuteAfterTriggers
%ExecuteBeforeTriggers %Exists %ExistsId %Extends
%FileIndices %GUID %GUIDSet %GetLock
%GetParameter %GetSwizzleObject %Id %IncrementCount
%IsA %IsModified %IsNull %JournalObject
%KillExtent %LockExtent %LockId %New
%NormalizeObject %ObjectIsNull %ObjectModified %Oid
%OnBeforeAddToSync %OnDetermineClass %Open %OpenId
%OriginalNamespace %PackageName %PurgeIndices %Reload
%RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack %SQLAcquireLock
%SQLAcquireTableLock %SQLAfterTriggers %SQLBeforeTriggers %SQLBuildIndices
%SQLBuildPurgeIndexForRow %SQLBuildPurgeIndices %SQLCheckUnique %SQLCheckUniqueIndices
%SQLCheckUniqueKeys %SQLCopyIcolIntoName %SQLCopyNameIntoIcol %SQLCreateInsDelTables
%SQLDefineiDjVars %SQLDelete %SQLDeleteChildren %SQLDeleteTempStreams
%SQLEExit %SQLExists %SQLFKeyDelLock %SQLFieldValidate
%SQLGetLock %SQLGetOld %SQLGetOldAll %SQLGetOldIndex
%SQLInsert %SQLInsertComputes %SQLInsertStreams %SQLInvalid
%SQLInvalid2 %SQLMVDelete %SQLMVIndexDelete %SQLMVIndexInsert
%SQLMVIndexUpdate %SQLMVInsert %SQLMVUpdate %SQLMissing
%SQLNormalizeCompFields %SQLNormalizeFields %SQLPurgeIndices %SQLQuickBulkInsert
%SQLQuickBulkLoad %SQLQuickBulkSave %SQLQuickBulkUpdate %SQLQuickDelete
%SQLQuickDeleteChildren %SQLQuickFindPKeyByRowID %SQLQuickFindRowIDByPKey %SQLQuickInsert
%SQLQuickLoad %SQLQuickLoadChildren %SQLQuickLogicalToOdbc %SQLQuickOdbcToLogical
%SQLQuickUpdate %SQLReleaseLock %SQLReleaseTableLock %SQLStorageValidation
%SQLTrigDelTab %SQLTrigInsTab %SQLUnlock %SQLUnlock2
%SQLUnlockError %SQLUnlockRef %SQLUpdate %SQLUpdateComputes
%SQLUpdateStreams %SQLValidateCompFields %SQLValidateFields %SQLicompView
%SQLnBuild %Save %SaveDirect %SaveIndices
%SerializeObject %SetModified %SortBegin %SortEnd
%SyncObjectIn %SyncTransport %UnlockExtent %UnlockId
%UpgradeConcurrency %ValidateIndices %ValidateObject ApplyProperties
GetProfile GetProfileByName NegationMultiplierGet ProfileIdGet


Properties

• property CrcTotalMultiplier as %Numeric [ InitialExpression = 1 ];
The total score of a CRC-level match is multiplied by this number.
• property DisorderMultiplier as %Numeric [ InitialExpression = 0.7 ];
This multiplier is applied to the aggregate match score for a CRC, path or sentence if the matched entities appear in a different order than in the dictionary term.
• property DomainId as %Integer [ ReadOnly ];
The domain ID this Matching Profile is associated with. When 0, this profile can be used across the namespace.
• property MaxTermLengthForCrc as %Integer [ InitialExpression = 3 ];
If a dictionary term consists of more elements than MaxTermLengthForCrc, it will not be considered a candidate for a CRC-level match. Typically these terms should match at the path level.
• property MinMatchedConceptFraction as %Numeric [ InitialExpression = 0 ];
Use this parameter to add an additional requirement on the number of concepts from the Dictionary Term that should be matched for an aggregate match to be considered. A value of 1 (100%) implies all concepts should be matched. A value of at least 0.51 for example means both concepts in a CRC should match. A value of 0 (default) does not impose additional restrictions.
• property MinTermLengthForPath as %Integer [ InitialExpression = 4 ];
If a dictionary term consists of less elements than MinTermLengthForPath, it will not be considered a candidate for a path-level match. Typically these terms should match at the CRC level.
• property MinTermLengthForSent as %Integer [ InitialExpression = 4 ];
If a dictionary term consists of less elements than MinTermLengthForSent, it will not be considered a candidate for a sentence-level match. Typically these terms should match at the CRC level.
• property MinimalMatchScore as %Numeric [ InitialExpression = 0.33 ];
This is the lower threshold for match scores. Matches having a total score less than MinimalMatchScore will not be stored or returned.
• property Name as %String(MAXLEN=150) [ ReadOnly ];
A name for this profile. This name should be unique within the domain (case-insensitive) and cannot contain colons. For backwards compatibility, empty names are permitted, but these profiles cannot be retrieved with GetProfileByName
• property NegationMultiplier as %Numeric [ InitialExpression = 1 ];
Use this parameter to modify the score of matched entities which are part of a negation. Typically, this value will be either 1, ignoring the fact an entity is part of a negation, or 0, which will make the algorithm skip these entities. Other positive numeric values are also accepted and just modify the entity-level score for the affected entities, causing them to be considered partial matches.
• property PathRelevantScoreMultiplier as %Numeric [ InitialExpression = 0.33 ];
The entity-level score of path-relevant entities will be multiplied by this modifier.
• property PathTotalMultiplier as %Numeric [ InitialExpression = 1 ];
The total score of a path-level match is multiplied by this number.
• property ProfileId as %Integer [ ReadOnly ];
The ID of this profile. This will be a negative number for namespace-wide profiles (which have DomainId = 0).
• property RelationshipLengthMultiplier as %Numeric [ InitialExpression = 0.2 ];
When calculating an aggregate match score for a CRC, path or sentence, the "length" of the matched section is compared to the total "length" of the CRC, path or sentence. This "length" is calculated taking a value of 1 for each concept and a value of RelationshipLengthMultiplier for each relationship. Therefore, setting this property to a lower value will decrease the weight of relationship entities in calculating this ratio.
• property RelationshipScoreMultiplier as %Numeric [ InitialExpression = 0.5 ];
The entity-level score of relationship entities will be multiplied by this modifier.
• property ScatteredMatchMultiplier as %Numeric [ InitialExpression = 0.75 ];
The entity-level score of scattered entity matches will be multiplied by this modifier. For example when matching the entity "blue big car" against the term "big blue car", The initial score of 1 (as all words in the entity are matched) will be multiplied with ScatteredMatchMultiplier
• property SentTotalMultiplier as %Numeric [ InitialExpression = 1 ];
The total score of a sentence-level match is multiplied by this number.

Methods

• private method %OnBeforeSave(insert As %Boolean) as %Status
This callback method is invoked by the %Save method to provide notification that the object is being saved. It is called before any data is written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save will fail.

• private classmethod %OnDelete(oid As %ObjectIdentity) as %Status
This callback method is invoked by the %Delete method to provide notification that the object specified by oid is being deleted.

If this method returns an error then the object will not be deleted.

• private method %OnNew(pDomainId As %Integer = 0, pName As %String = "") as %Status
Creates a new Matching Profile instance in domain pDomainId (set to 0 to use the profile across domains) named pName. The name is optional but if specified, should be unique within the domain (or within the cross-domain profiles) and cannot contain colon characters.
• method ApplyProperties(pOtherProfile As %iKnow.Matching.MatchingProfile) as %Status
Copies all non-ReadOnly property values of the supplied Matching Profile object to the current object. This excludes ProfileId, DomainId and Name.
• classmethod GetProfile(pDomainId As %Integer = 0, pProfileId As %Integer = "", pSC As %Status = $$$OK) as %iKnow.Matching.MatchingProfile

Utility method to instantiate a Matching Profile. If passed a negative integer for pProfileId, it will look for a namespace-wide Matching Profile (which means DomainId is 0), otherwise it will take look in the domain specified through pDomainId. If pProfileId is empty, the default profile for this domain will be returned.

This is the recommended way of instantiating a %iKnow.Matching.MatchingProfile object.

• classmethod GetProfileByName(pDomainId As %Integer = 0, pName As %String, pSC As %Status = $$$OK) as %iKnow.Matching.MatchingProfile
Looks up a Matching Profile by name in the domain identified by pDomainId (or in the set of cross-domain profiles if pDomainId = 0). pName should be a nonempty string and can be prepended with the domain ID to look into (overriding the value of pDomainId), separated by a colon. This allows configuration settings to refer to a particular Matching Profile with a single string. Matching Profiles without a name cannot be looked up through this method and should be looked up by ID using GetProfile instead.
• method NegationMultiplierGet() as %Numeric
This is a Get accessor method for the NegationMultiplier property.
• method ProfileIdGet() as %Integer
This is a Get accessor method for the ProfileId property.

Indices

• index (PKINDEX on DomainId,ProfileId) [IdKey,PrimaryKey,Unique];


Copyright © 1997-2019, InterSystems Corporation