getUserEntityTaggedText

<< getNamedEntityTaggedText | Back to Salience 6 python Index | getNamedOpinionTaggedText >>

Summary

Provides a structured representation of the document with annotation of user-defined entities identified within the text.
This method provides a wrapper around the underlying C API method lxaGetUserEntityMarkup.

Syntax

salience6.getUserEntityTaggedText(oSession, acConfigurationID)

Parameters

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

Returns

If successful, returns a string that contains the document text with user-defined entities enclosed within identifying markup tags.

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

<< getNamedEntityTaggedText | Back to Salience 6 python Index | getNamedOpinionTaggedText >>