Building and Running the Sample Applications
To build and run the sample applications, you must have the Java SDK (11 or later). To use the Ant build files we provide to build and run the samples, you need Ant (1.7.1 or later) with the JAVA_HOME
environment variable set to the root of your Java SDK. For more information, see http://ant.apache.org.
The source files for these applications and the Ant build file for compiling and running them (build.xml
) are located in $BT_ROOT/rlpnc/samples/java
.
Tip
The Ant scripts and build files require one input property: bt.arch=$BT_BUILD
(bt.arch=amd64-glibc217-gcc48
, for example). If you set this property in the script (build.xml
), you do not need to include it on the command line.
Table 2. Sample Applications
Source File
|
Description
|
AddNamesSample.java
|
Adds names from a UTF-8 file to an RNI Index.
|
LoadGazetteerSample.java
|
Loads an XML gazetteer into an RNI Index.
|
IndexQuerySample.java
|
Submits a series of queries (names) to an index and reports on the results.
|
DistributedTransactionSample.java
|
Queries an index, deletes the names returned from that index, and adds the names to a second index. The deletions and additions are performed in a single distributed transaction with two-phase commit.
|
MatchNamesSample.java
|
Determines the similarity of two or more names.
|
MatchPhenomenaSample.java
|
Demonstrates the different name matching phenomena that RNI supports.
|
AutomatedTranslationSample.java
|
Translates one or more names.
|
InteractiveTranslationSample.java
|
Simulates a series of user interactions resulting in the translation of an Arabic name.
|
RNISolrjSample.java
|
Integrates RNI with Solr to add and query Solr documents with multiple and multivalued name fields.
|
AddressIndexQuerySample.java
|
Submits a series of queries (addresses) to an index and reports on theresults.
|
AddressMatchPhenomenaSample.java
|
Demonstrates the different address matching phenomena that RNIsupports.
|
Your License
You must copy the license file you obtained from BasisTech to $BT_ROOT/rlp/rlp/licenses
. If the license is not in place, you cannot access any RNI-RNT functionality. The license defines the scope of the activities you may perform with RNI-RNT.
Using the Ant Build Script
Tip
The Ant scripts and build files require one input property: bt.arch=$BT_BUILD
(bt.arch=amd64-glibc217-gcc48
, for example). If you set this property in the script (build.xml
), you do not need to include it on the command line.
Change directory to $BT_ROOT/rlpnc/samples/java
and run Ant:
ant -Dbt.arch=$BT_BUILD target
where target is one of the Ant build targets in the following table.
As you create your own applications, you can use the Ant build file as the starting point for establishing your own build procedures.