dtSearch Text Retrieval Engine Programmer's Reference
dtssGetSynonyms Function

Generates a stream of XML containing synonym information for the specified word.

File: dtsearch.h

dtsStringHandle DLLFUNC dtssGetSynonyms(const char * word, long flags);
const char * word
The word to look up in the thesaurus
long flags
SearchFlags specifying the type of synonym expansion to perform

XML data containing the results of the thesaurus lookup, returned as a dtsStringHandle.

The stream of XML is returned as a dtsStringHandle, which should be released once the calling program has extracted the text. The flags are a combination of the synonym-related SearchFlags used in dtsSearchJob

Below is an example of the XML stream returned. Field order may vary and new fields may be added in future versions, so calling programs should not depend on the specific field layout in this example. 


<?xml version="1.0" encoding="UTF-8" ?> <ThesaurusOutput> <SynonymSet> <Gloss>example, illustration, instance: a single item that is representative of a type</Gloss> <RelationDescription>Synonym</RelationDescription> <RelationName>Synonym</RelationName> <RelationId>19</RelationId> <Members>example illustration instance representative</Members> <PartOfSpeech>noun</PartOfSpeech> </SynonymSet> [Additional synonym sets omitted] </ThesaurusOutput>