lxaGetIntentions

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

Summary

Retrieves the intentions expressed within the document content. Intentions are returned as a list of SalienceIntention structures.
The acConfigurationID parameter specifies the configuration for the results. Configurations are defined using the method lxaAddSalienceConfiguration.
After use you should free the allocated memory by calling lxaFreeIntentionList.

Syntax

int lxaGetIntentions(SalienceSession *pSession, 
                     SalienceIntentionList *pResults,
                     const char *acConfigurationID);

Parameters

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

Returns

This function returns an integer return code.

Example

     lxaPrepareTextFromFile(pSession,acPath);          
     SalienceIntentionList oIntentions;
     lxaGetIntentions(pSession,&oIntentions);
     std::cout << "Intentions: " << std::endl;

     for(int i = 0; i < oIntentions.nLength; i++)
     {
          std::cout << "Intention: " << oIntentions.pResults[i].acType << "\t" 
                                     << oIntentions.pResults[i].acEvidence << std::endl;
     }
     lxaFreeIntentionList(&oIntentions);

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