lxaGetNamedEntityOpinions

<< lxaGetNamedEntityRelationships | Back to Salience 6 C API Index | lxaGetUserDefinedEntities >>

Summary

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

Syntax

int lxaGetNamedEntityOpinions(SalienceSession *pSession, 
                              SalienceOpinionList *pResults,
                              const char *acConfigurationID);

Parameters

pSession Pointer to a SalienceSession structure previously returned by a call to lxaOpenSalienceSession
pResults Pointer to a SalienceOpinionList 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";
    SalienceOpinionList oOpinionList;
    SalienceSession* pSession;
    ... //Set up the parameters as well as the license here
    if (lxaOpenSalienceSession(oLicense,acDataPath,&pSession,&acError) == LXA_OK)
    {
        lxaPrepareTextFromFile(pSession,acPath);
        lxaGetNamedEntityOpinions(pSession,&oOpinionList);
        ...
        lxaFreeOpinionList(&oOpinionList);
        lxaCloseSalienceSession(pSession);
    }

<< lxaGetNamedEntityRelationships | Back to Salience 6 C API Index | lxaGetUserDefinedEntities >>