WMTrans Analyzer:
APIs Description

C/C++ API description

The shared library C/C++ API consists of two functions.
In order to use them you need to include the header file "CAnalyzer.h" as shown in CAnalyzerIntegrationDemo.C
int loadFsa(char *fsaFileName, char *fsaTableName)

Used to load the data into memory.

Parameters:

  1. Transducer file (delivered as GerXYZAnalyzer.tra)
  2. Feature table file (delivered as GerXYZAnalyzer.ftb)
The return value informs whether the data could be loaded.
int analyzeFormAndGetCitation(char *form, char *filter, char *result, int resultMaxLen)

Used to retrieve citation forms from a word form.

Parameters:

  1. String containing the word form to be analyzed
  2. String containing the feature filter
  3. Allocated string in which the result is stored
  4. Length of allocated string
The return value informs whether there was a result.

Java API Description

The shared library Java API consists of two functions, with basically the same meaning as the C/C++ API functions.
In order to use them you need to import the class com.canoo.wmtrans.JAnalyzer, as shown in JAnalyzerIntegrationDemo.java
public static int fsaLoad(String fsaName, String tableName)

public static String analyzeAndGetAsCitation(String query, String filter)

The return value contains the result.