<< openSession | Back to Salience 6 python Index | closeSession >>


This method creates a Salience 6 session specifically tuned to shorter content such as tweets or other micro-blog content. Similar to openSession, the method requires a path to a license file and path to data directory. The session can be used to access further functionality of Salience 6.
The method provides a wrapper around the underlying C API methods lxaLoadLicense and lxaOpenSalienceSession, with the Short Form mode switch enabled.
Operating in short-form mode sets different default values for specific Salience options to values more appropriate to processing shorter content. For example, the default value for the text threshold option is 80% alphanumeric content. Short content can fail this threshold with an extra exclamation mark, so short form decreases the default threshold to 25%. Note that any options set to different default values by enabling short-form mode can be adjusted by subsequent API calls to the various option methods.


salience6.openShortFormSession(sLicensePath, sDataPath)


sLicensePath String containing the path to the required license file
sDataPath String containing the path to the data directory to use for the session


If successful, the method returns a SalienceSession object that can be used for processing short-form text, such as Twitter or other micro-blog content.


>>> import salience6 as se6
>>> session = se6.openShortFormSession('/path/to/license.v5','/path/to/data')
>>> session
<SalienceSession object at 0x2b5d6b006db0>

<< openSession | Back to Salience 6 python Index | closeSession >>