Create a combined thesaurus in the remote server.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Sub cthcreate( _ 
   ByVal cthes As NetricsCombinedThesaurus _ 
)
C#
public void cthcreate(
   NetricsCombinedThesaurus cthes
)
C++
public:
 void cthcreate(
   NetricsCombinedThesaurus cthes
) sealed 
J#
public void cthcreate(
   NetricsCombinedThesaurus cthes
)
JScript
public  function cthcreate(
   cthes : NetricsCombinedThesaurus
)

Parameters

cthes
The NetricsCombinedThesaurus object to create on the remote server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods.

Exceptions

Exception TypeCondition
NetricsExceptionIf 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 Combined Thesaurus 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);
                        // Combined Thesaurus input csv file
                        String file = "c:\\temp\\cthnames.csv";
                        //Combined Thesaurus name
                        String thesaurus = "myThesaurus";
                        // Use default encoding which is LATIN1 specified by the null
                        NetricsCombinedThesaurus wd = new NetricsCombinedThesaurus(thesaurus, file, null);
                        si.cthcreate(wd);
                        Console.Write("Combined thesaurus created.\n");
                    }
                    catch (NetricsException e)
                    {
                        Console.Write(e.getErrorDescription() + "\n");
                    }
                  }
               }
             

See Also