lxaGetThemes

<< lxaGetSentiment | Back to Salience 6 C API Index | lxaGetQueryDefinedTopics >>

Summary

Retrieves the document-level themes of the text.
The acConfigurationID parameter specifies the configuration for the results, which are returned in a SalienceThemeList structure. Configurations are defined using the method lxaAddSalienceConfiguration.
After use you should free the allocated memory by calling lxaFreeThemeList.

Syntax

int lxaGetThemes(SalienceSession *pSession, 
                 SalienceThemeList *pResults,
                 const char *acConfigurationID);

Parameters

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

Returns

This function returns an integer return code.

Example

     char* acPath = "/path/to/content";
     ...
     SalienceSession* pSession;
     if(lxaOpenSalienceSession(oLicense, &oStartup, &pSession) != LXA_OK)
          return 1;
     lxaPrepareTextFromFile(pSession,acPath);
     SalienceThemeList oThemeList;
     lxaGetThemes(pSession,&oThemeList);
     for(int i = 0; i < oThemeList.nLength; i++)
     {
          ...
     }
     lxaFreeTopicList(&oTopicList);
     lxaCloseSalienceSession(pSession);

<< lxaGetSentiment | Back to Salience 6 C API Index | lxaGetQueryDefinedTopics >>