runModelSmokeTest

<< resetThemes | Back to Salience 6 python Index | prepareText >>

Summary

Runs smoke tests to ensure that the installed Salience version is compatible with the models in the data directory. Please use the output of this function to create detailed reports for support engagements.
A smoke test is successful if the number of "success" messages is at least 1 (showing that smoke testing was invoked) and the number of "failure" messages is 0 (showing that no errors arose during smoke testing).
This method provides a wrapper around the underlying C API method lxaRunModelSmokeTest.

Syntax

salience6.runModelSmokeTest(oSession, ,acConfigurationID)

Parameters

oSession A SalienceSession object previously created via openSession
lSuccesses A list structure for containing the results for smoke tests that succeeded
lFailures A list structure for containing the results for smoke tests that succeeded

Returns

If successful, returns a Python dictionary containing with the following keys:
document_terms A list of tokens contained with the document and their term frequencies
fingerprint A string containing the calculated fingerprint of the document (DEPRECATED)
internal_version A string providing the internal Salience representation of the document after preprocessing
sentences A list of the individual sentences in the document, where each sentence item contains a structure of information about the sentence.
sentence_count An integer giving the count of sentences in the document
word_count An integer giving the count of words in the document

Example

    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):
        details = se6.getDocumentDetails(session,"")
        print details
    else:
        if (ret==6):
            print se6.getLastWarnings(session) 
    se6.closeSession(session)

<< resetThemes | Back to Salience 6 python Index | prepareText >>