Marked Text

getNamedEntityTaggedText

Summary

Provides a structured representation of the document with annotation of entities identified within the text.

This method provides a wrapper around the underlying C API method lxaGetNamedEntityMarkup.

Syntax

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

getUserEntityTaggedText

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)

getNamedOpinionTaggedText

Summary

Provides a rendition of the document with annotation of entity opinions identified within the text.

This method provides a wrapper around the underlying C API method lxaGetNamedOpinionTaggedText.

Syntax

salience6.getNamedOpinionTaggedText(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 opinions of named entities identified by Salience 6 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.getNamedOpinionTaggedText(session, "")
        print markup
    else:
        if (ret==6):
            print se6.getLastWarnings(session) 
    se6.closeSession(session)

getUserOpinionTaggedText

Summary

Provides a rendition of the document with annotation of entity opinions for user-defined entities identified within the text.

This method provides a wrapper around the underlying C API method lxaGetUserOpinionTaggedText.

Syntax

salience6.getUserOpinionTaggedText(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 opinions of user-defined entities identified by Salience 6 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.getUserOpinionTaggedText(session, "")
        print markup
    else:
        if (ret==6):
            print se6.getLastWarnings(session) 
    se6.closeSession(session)

getPOSTaggedText

Summary

Provides a rendition of the document with each word annotated with the appropriate part-of-speech tag.

This method provides a wrapper around the underlying C API method lxaGetPOSMarkup.

Syntax

salience6.getPOSTaggedText(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 part-of-speech tags associated with each word 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):
        markup = se6.getPOSTaggedText(session, "")
        print markup
    else:
        if (ret==6):
            print se6.getLastWarnings(session) 
    se6.closeSession(session)

getSentimentTaggedText

Summary

Provides a rendition of the document with sentiment-bearing phrases annotated in the text.

This method provides a wrapper around the underlying C API method lxaGetSentimentMarkup.

Syntax

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