lxaGetNamedEntityRelationships

<< lxaGetNamedEntities | Back to Salience 6 C API Index | lxaGetNamedEntityOpinions >>

Summary

Retrieves the relationships between entities within the text.
The acConfigurationID parameter specifies the configuration for the results, which are returned in a SalienceRelationList structure. Configurations are defined using the method lxaAddSalienceConfiguration.
After use you should free the allocated memory by calling lxaFreeRelationList.

Syntax

int lxaGetNamedEntityRelationships(SalienceSession *pSession, 
                                   SalienceRelationList *pResults,
                                   const char *acConfigurationID);

Parameters

pSession Pointer to a SalienceSession structure previously returned by a call to lxaOpenSalienceSession
pResults Pointer to a SalienceRelationList structure
acConfigurationID Character string specifying the configuration for the results, blank for the default configuration

Returns

This method returns an integer return code.

Example

TODO: Update example for Salience 6
    char* acPath = "c:/somefile.txt";
    SalienceRelationList oRelationships;
    SalienceSession* pSession;
    ...
    if (lxaOpenSalienceSession(oLicense,acDataPath,&pSession,&acError) == LXA_OK)
    {
        lxaPrepareTextFromFile(pSession,acPath);
        lxaGetNamedEntityRelationships(pSession,&oRelationships);
        ...
        lxaFreeRelationList(&oRelationships);
        lxaCloseSalienceSession(pSession);
    }

<< lxaGetNamedEntities | Back to Salience 6 C API Index | lxaGetNamedEntityOpinions >>