List of sample applications

The sdk package includes a set of sample Java™ applications that demonstrate techniques for using IBM® NameWorks Java APIs. The sample applications can assist in determining whether your own applications are behaving correctly.

The IBM NameWorks sample applications are located in the .../sdk/samples/ directory.

Java samples

The sample applications depend on a LocalText.java file. IBM NameWorks returns only numeric values for culture codes, country codes, and other linguistic values, so the code in LocalText.java converts numeric values to readable text.

Analysis
Determines a name category and parses Personal names. ParseAlternate and ParseName objects provide information about possible parses found. Personal name. A name category (either Organization or Personal) is then is returned in a CategorizeData object. If the name is determined to be a personal name gender and country data is returned for the name, along with confidence and frequency values for the top five countries that the name is most associated with.
CompleteAnalysis
Determines a name category and performs analysis for Personal names. A name category (either Organization or Personal) is returned in a CategorizeData object. If the name is determined to be a personal name, the gender and country data is returned for the name, along with confidence and frequency values.
Compare
Demonstrates comparing two names to produce a similarity score. Alternate parses are generated for each name, then each query parse is compared againts each data parse in order to determine the highest similarity score.
Search
Demonstrates searching a datalist. Configured datalists and search strategies are fetched and listed (by default, this sample always uses the first search strategy). The names are prepared for search using the analyzeForSearch() method. Match results are returned in SearchMatch objects.
Date of birth comparison provides a secondary filter to name-only searches that return too many possible matches. For every name match, the first eight characters of the record identifier field are sent to dateCompare() to produce a date similarity score. The matched records are re-sorted, first by descending name similarity score and second by descending date similarity score. The output format for matched records are modified to include a date similarity score in the form Datalist, Data, Name_score, Date_score, Surname, Given_name.

Each name entry is assumed to have an eight-character date value in the record identifier field. A valid date value contains eight digits in the form CCYYMMDD, which represents the century, year, month, and day of the year. For example, 19850607 would translate to June 7, 1985. Invalid values are compared, but are identified with a -1 similarity score. The value 00000000 is used if a date value is not present.