<< getConceptDefinedTopics | Back to Salience 6 python Index | getDocumentCategories >>


Returns a formatted block of text listing the concept topics determined for the text via the Salience 6 Concept Matrix, as well as individual terms that occur in the text that generate the matches. 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 getConceptDefinedTopics and should be reserved for use in diagnostic or research interfaces or other application areas where a longer execution time is feasible.
This method provides a wrapper around the underlying C API method lxaExplainConceptMatches.


salience6.explainConceptMatches(oSession, acConfigurationID)


oSession A SalienceSession object previously created via openSession
acConfigurationID An identifier for a configuration added through addConfiguration, or empty string for default configuration


If successful, returns a string containing a formatted block of text. Each line in the text string returned contains either a topic label and overall match score or (indented) a document term contributing to the match for a certain topic and the term match score.


    import salience6 as se6
    session = se6.openSession('/path/to/license.v5','/path/to/data')
    ret = se6.prepareTextFromFile(session,'/path/to/aFile.txt')
    if (ret==0):
        se6.setOption_ConceptTopicList(session, '/path/to/queries.txt')
        matches = se6.explainConceptMatches(session, "")
        print matches
        if (ret==6):
            print se6.getLastWarnings(session) 

<< getConceptDefinedTopics | Back to Salience 6 python Index | getDocumentCategories >>