/***************************************************************************** File: WnCDbPublic.h Author: Keith Alcock Comment: Describes a(n) WnCDbPublic ****************************************************************************** Include guard *****************************************************************************/ #if !defined(WNCDBPUBLIC_INCLUDED) # define WNCDBPUBLIC_INCLUDED 1 /***************************************************************************** Revision control system *****************************************************************************/ #define PVCS_WNCDBPUBLIC_H \ "@(#)$Workfile: WnCDbPublic.h $\n" \ "@(#)$Revision: 4 $\n" \ "@(#) $Date: 5/27/04 3:45p $\n" \ "@(#)---------:" /***************************************************************************** Defines *****************************************************************************/ #define TEST_WNCDBPUBLIC_OFF 0 #define TEST_WNCDBPUBLIC_ON 1 #if !defined(TEST_WNCDBPUBLIC) # define TEST_WNCDBPUBLIC TEST_WNCDBPUBLIC_OFF #endif /***************************************************************************** Defines *****************************************************************************/ #define WN_ALSO_SEE '\x0' /* ^ */ #define WN_ANTONYM '\x1' /* ! */ #define WN_ATTRIBUTE '\x2' /* = */ #define WN_CAUSE '\x3' /* > */ #define WN_DERIVED_FROM_ADJECTIVE '\x4' /* \ */ #define WN_DERIVATIONALLY_RELATED_FORM '\x5' /* + */ #define WN_DOMAIN_OF_SYNSET_CATEGORY '\x6' /* ;c */ #define WN_DOMAIN_OF_SYNSET_REGION '\x7' /* ;r */ #define WN_DOMAIN_OF_SYNSET_USAGE '\x8' /* ;u */ #define WN_ENTAILMENT '\x9' /* * */ #define WN_HYPERNYM '\xa' /* @ */ #define WN_HYPONYM '\xb' /* ~ */ #define WN_MEMBER_HOLONYM '\xc' /* #m */ #define WN_MEMBER_MERONYM '\xd' /* %m */ #define WN_MEMBER_OF_THIS_DOMAIN_CATEGORY '\xe' /* -c */ #define WN_MEMBER_OF_THIS_DOMAIN_REGION '\xf' /* -r */ #define WN_MEMBER_OF_THIS_DOMAIN_USAGE '\x10' /* -u */ #define WN_PART_HOLONYM '\x11' /* #p */ #define WN_PART_MERONYM '\x12' /* %p */ #define WN_PARTICIPLE_OF_VERB '\x13' /* < */ #define WN_PERTAINYM '\x14' /* \ */ #define WN_SIMILAR_TO '\x15' /* & */ #define WN_SUBSTANCE_HOLONYM '\x16' /* #s */ #define WN_SUBSTANCE_MERONYM '\x17' /* %s */ #define WN_VERB_GROUP '\x18' /* $ */ #define WN_RELATIONSHIP_COUNT 0x19 #define WN_NOUN 0 #define WN_VERB 1 #define WN_ADJECTIVE 2 #define WN_ADVERB 3 /***************************************************************************** EntryPoints *****************************************************************************/ typedef int (*SYNSET_INDEX_COLLECTOR)(int synsetIndex); typedef int (*LEMMA_COLLECTOR)(int wnPos,char *word,int sense); typedef int (*SYNSET_WORD_COLLECTOR)(int wnPos,char *word,int lexId); typedef int (*SYNSET_CHILD_COLLECTOR)(int synsetIndex,int childIndex,int relationship); typedef struct { int synsetIndex; int childIndex; } SEARCH_INFO; int getWnCDbVersion(int *major,int *minor); int getWnCDbSynsetCount(); int getWnCDbSenseFanout(); int enumWnCDbLemmas( SYNSET_INDEX_COLLECTOR synsetIndexCollector,int *distances, int isWnPosValid,int wnPos,int wnPosOrder,LEMMA_COLLECTOR wnPosCollector, int isWordValid,char *word,int wordOrder,LEMMA_COLLECTOR wordCollector, int isSenseValid,int sense,int senseOrder,LEMMA_COLLECTOR senseCollector ); int enumWnCDbSynsetWords(SYNSET_WORD_COLLECTOR wordCollector,int synsetIndex); char *getWnCDbSynsetGloss(int synsetIndex); int calcWnCDbDistances(int synsetIndex,int *distances,int *relativeDistances); int calcWnCDbDepth(int synsetIndex,int *distances,int *relativeDistances,int *maxDepth); int enumWnCDbSynsetChildren(SYNSET_CHILD_COLLECTOR childCollector,int synsetIndex, int *distances,int *relativeDistances); int calcWnCDbSearchInfos(int synsetIndex,int *distances,int *relativeDistances, SEARCH_INFO *searchInfos,int *currentDepth,int searchSynsetIndex,int maxDepth,int skip); /***************************************************************************** Cleanup *****************************************************************************/ #endif /****************************************************************************/