Create a weighted dictionary in the remote server.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
| Visual Basic (Declaration) |
|---|
| Public Sub wdcreate( _ ByVal wdict As NetricsWeightedDictionary _ ) _ Implements INetricsServerInterface.wdcreate |
| C# |
|---|
| public void wdcreate( NetricsWeightedDictionary wdict ) |
| C++ |
|---|
| public: void wdcreate( NetricsWeightedDictionary wdict ) sealed |
| J# |
|---|
| public void wdcreate( NetricsWeightedDictionary wdict ) |
| JScript |
|---|
| public
function wdcreate( wdict : NetricsWeightedDictionary ) |
Parameters
- wdict
- The NetricsWeightedDictionary object to create on the remote server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods.
Implements
INetricsServerInterface.wdcreate
Exceptions
| Exception Type | Condition |
|---|---|
| NetricsException | If the server indicates that an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING) |
Remarks
A Thesaurus is used for word substitution such as synonyms or related terms.
A Weighted Dictionary is a variant of a Thesaurus which can reduce the contribution of a synonym in the overall score.
A Combined Thesaurus combines the features of a Thesaurus and a Weighted Dictionary and can apply a penalty score to be applied to each Thesaurus class.
Example
This sample code shows how to create a Weighted Dictionary in the TIBCO Patterns Engine running on the localhost listening to port 5051.
Copy Code
| |
|---|---|
using NetricsServerInterface;
class MyClass
{
private static NetricsServerInterface.NetricsServerInterface si = null;
public static void Main()
{
try
{
String host = "localhost";
int port = 5051;
si = new NetricsServerInterface.NetricsServerInterface(host, port);
// Weighted Dictionary input csv file
String file = "c:\\temp\\wdnames.csv";
//Combined Thesaurus name
String thesaurus = "myThesaurus";
// Use default encoding which is LATIN1 specified by the null
NetricsWeightedDictionary wd = new NetricsWeightedDictionary(thesaurus, file, null);
si.wdcreate(wd);
Console.Write("Weighted dictionary/thesaurus created.\n");
}
catch (NetricsException e)
{
Console.Write(e.getErrorDescription() + "\n");
}
}
}
| |