Named Entity Recognition 26.1
Named Entity Recognition User and Programming Guide

# getContribution

Returns a specified scoring contribution.

The final score for a match (as retrieved through the getScore method) can be the product of multiple scoring contributions. For some entities the score is then normalized (for example so that it is always a value between 0 and 1).

## Syntax

`edkmatch:getContribution(index)`

## Arguments

Argument | Description
--- | ---
`index` | The number of the contribution to get (where the first contribution has the index zero).

## Returns

The scoring contribution.

## Example

The following example demonstrates how to obtain scoring contributions:

    function processmatch(edkmatch)
        local contributionsCount = edkmatch:getContributionsCount()
        print ("Contributions count: ", contributionsCount)
        if contributionsCount >= 1 then
            for i=0, contributionsCount-1, 1 do
                local contribution = edkmatch:getContribution(i)
                print ("Contribution " .. i .. ": " , contribution)
            end
        end
        print ("Score: " , edkmatch:getScore())
        return true
    end

This script produces output similar to:

    Contributions count:    4.0
    Contribution 0:         1.0
    Contribution 1:         0.75
    Contribution 2:         1.0
    Contribution 3:         0.6
    Score:  0.45

Copyright 2013-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Named Entity Recognition 26.1

Topic Title: getContribution