Links
dtSearch Text Retrieval Engine Programmer's Reference 7.70
dtssGetSynonyms Function
Functions | Send Feedback

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

dtsStringHandle DLLFUNC dtssGetSynonyms(const char * word, long flags);
File

dtsearch.h

Parameters
Parameters 
Description 
const char * word 
The word to look up in the thesaurus 
long flags 
SearchFlags specifying the type of synonym expansion to perform 
Returns

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

Remarks

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>
Group
Links
You are here: C++ API > Functions > dtssGetSynonyms Function
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.