lxaExplainConceptMatches

<< lxaGetConceptDefinedTopics | Back to Salience 6 C API Index | lxaGetDocumentCategories >>

Summary

Retrieves the topics determined for the text via the Salience 6 Concept Matrix, as well as terms from the content that generated the match. Before calling this method, you must specify a concept topic list using the Concept Topic List option.
This method has a longer execution time than the call to lxaGetConceptDefinedTopics and should be reserved for use in diagnostic or research interfaces or other application areas where a longer execution time is feasible.
The acConfigurationID parameter specifies the configuration for the results, which are returned via a pointer to a character buffer. Configurations are defined using the method lxaAddSalienceConfiguration.
After use you should free the allocated memory by calling lxaFreeString.

Syntax

int lxaExplainConceptMatches(SalienceSession *pSession, 
                             char **ppBuffer,
                             const char *acConfigurationID);

Parameters

pSession Pointer to a SalienceSession structure previously returned by a call to lxaOpenSalienceSession
ppBuffer Pointer to a character buffer containing a concept matches and a list of terms with match scores
acConfigurationID Character string specifying the configuration for the results, blank for the default configuration

Returns

This function returns an integer return code.

Example

     SalienceOption oOption;
     oOption.nOption = SALIENCEOPTION_CONCEPTTOPICLIST;
     oOption.acValue = "/path/to/concept/topic/list";
     lxaSetSalienceOption(pSession,&oOption);

     char* acConceptMatches;
     lxaPrepareTextFromFile(pSession,acPath);          
     lxaExplainConceptMatches(pSession,&acConceptMatches);
     std::cout << "Concept Topics: " << std::endl;
     std::cout << acConceptMatches << std::endl;
     lxaFreeString(&acConceptMatches);

<< lxaGetConceptDefinedTopics | Back to Salience 6 C API Index | lxaGetDocumentCategories >>