Basic Language support is provided via a third party library. These options allow you to configure that library.
Salience 6.6.0 and Basic Languages
As of 6.6.0 Salience supports the Repustate v4 API. This provides much better entity extraction than v3. The last Repustate version that supported v3 is 2.0.9.
To use the v4 API you must set the Basic Language Server Version option to “v4” and you must set the options “-skip_ds” and “-langs”.
Here’s an example in Java to setup to process Polish:
final Salience session = new Salience(licensePath, "/opt/salience/data/pl-data");
session.options.BasicLanguage.setManualBasicLanguageMangement(false);
session.options.BasicLanguage.setBasicLanguageServerOptions("-skip_ds -langs pl");
session.options.BasicLanguage.setBasicLanguageServerVersion("v4");
If you are creating and destroying Basic language Salience sessions frequently it is more efficient to manage the Repustate server outside of Salience. If you have more than one session processing a Basic language then you must manage the Repustate server outside of Salience to avoid a race condition in starting/stopping Repustate.
For example using linux:
$ export REPUSTATE_HOME=$lxainstall/salience/BasicLanguages
$ cd $REPUSTATE_HOME
$ nohup ./repustate -skip_ds -langs ar,ru,pl,vi > /var/log/repustate.log 2>&1 &
Here’s the Java application code. Setting the server options (setBasicLanguageServerOptions) is unnecessary because the options are specified on the command line above.
final Salience session = new Salience(licensePath, "/opt/salience/data/pl-data");
session.options.BasicLanguage.setManualBasicLanguageMangement(true);
session.options.BasicLanguage.setBasicLanguageServerVersion("v4");
Basic Language Options
Option Name | Default | Description |
---|---|---|
Basic Port | 9000 | Which port to run the Repustate server on |
Basic IP Address | Scheme and host (e.g., http://10.12.5.121) | |
Manual Basic Management | false | When true, Salience will not start up/kill Repustate but rely on the user application to do so (default: false) |
Basic Server Options | none | Repustate server command line options (e.g. -langs, -skip_ds, etc.) |
Basic Server Version | v3 | Repustate server version (used in urls, mostly needed for entities) |
Basic Server Startup Timeout | 150 | Seconds to wait for Repustate to become healthy after starting process |
Basic Server Request Timeout | 30 | Seconds to wait for a single Repustate request |
Basic Server Max Request Attempts | 5 | How many times to retry a single request before restarting server |
Basic Server Request Attempt Delay | 3000 | Millisecs to wait after each failed request |
Basic Server Close Delay | 1 | Seconds to wait for Repustate server to close before restarting |
Basic Port
A port number to run the basic languages server on. This does not require outside access: Salience communicates directly to the basic languages server on this machine via this port.
Min/Max range | 1024-49151 |
---|---|
Default value | 9000 |
C API | SalienceOption oOption; |
---|---|
.NET | SalienceEngine.BasicPort = integer value |
Java | Salience.Options.BasicLanguage.setBasicLanguagePort(integer value) |
Python | salience.setOption_BasicPort(session,integer value, configuration ID) |
Manual Basic Management
By default, Salience will launch the basic languages support server when you first use it and close it after the last Salience session is closed. Even if you use multiple processes, the server will go up and down correctly. If for whatever reason you want to manage the lifespan of the Basic Languages server yourself set this option to true. Note that in this case it's your responsibility to ensure the session is always running when a Salience session is trying to process Basic Languages text.
Min/Max range | 0 or 1 |
---|---|
Default value | 0 |
C API | SalienceOption oOption; |
---|---|
.NET | SalienceEngine.ManualBasicManagement= boolean value |
Java | Salience.Options.BasicLanguage.setManualBasicLanguageMangement(boolean value) |
Python | salience.setOption_ManualBasicManagement(session,boolean value, configuration ID) |
Updated 9 months ago