Planeshift
wn.h
Go to the documentation of this file.
1 /*
2 
3  wn.h - header file needed to use WordNet Run Time Library
4 
5  $Id: wn.h,v 1.4 2007/09/14 23:19:16 mgist Exp $
6 
7 */
8 
9 #ifndef _WN_
10 #define _WN_
11 
12 #include <stdio.h>
13 
14 /* Platform specific path and filename specifications */
15 
16 #ifdef _WINDOWS
17 #define DICTDIR "\\dict"
18 //#define DEFAULTPATH "C:\\Program Files\\WordNet\\2.1\\dict"
19 #define DEFAULTPATH "data\\dict"
20 #define DATAFILE "%s\\data.%s"
21 #define INDEXFILE "%s\\index.%s"
22 #define SENSEIDXFILE "%s\\index.sense"
23 #define KEYIDXFILE "%s\\index.key"
24 #define REVKEYIDXFILE "%s\\index.key.rev"
25 #define VRBSENTFILE "%s\\sents.vrb"
26 #define VRBIDXFILE "%s\\sentidx.vrb"
27 #define CNTLISTFILE "%s\\cntlist.rev"
28 #else
29 #define DICTDIR "/dict"
30 //#define DEFAULTPATH "/usr/local/WordNet-2.1/dict"
31 #define DEFAULTPATH "data/dict"
32 #define DATAFILE "%s/data.%s"
33 #define INDEXFILE "%s/index.%s"
34 #define SENSEIDXFILE "%s/index.sense"
35 #define KEYIDXFILE "%s/index.key"
36 #define REVKEYIDXFILE "%s/index.key.rev"
37 #define VRBSENTFILE "%s/sents.vrb"
38 #define VRBIDXFILE "%s/sentidx.vrb"
39 #define CNTLISTFILE "%s/cntlist.rev"
40 #endif
41 
42 /* Various buffer sizes */
43 
44 #define SEARCHBUF ((long)(200*(long)1024))
45 #define LINEBUF (15*1024) /* 15K buffer to read index & data files */
46 #define SMLINEBUF (3*1024) /* small buffer for output lines */
47 #define WORDBUF (256) /* buffer for one word or collocation */
48 
49 #define ALLSENSES 0 /* pass to findtheinfo() if want all senses */
50 #define MAXID 15 /* maximum id number in lexicographer file */
51 #define MAXDEPTH 20 /* maximum tree depth - used to find cycles */
52 #define MAXSENSE 75 /* maximum number of senses in database */
53 #define MAX_FORMS 5 /* max # of different 'forms' word can have */
54 #define MAXFNUM 44 /* maximum number of lexicographer files */
55 
56 /* Pointer type and search type counts */
57 
58 /* Pointers */
59 
60 #define ANTPTR 1 /* ! */
61 #define HYPERPTR 2 /* @ */
62 #define HYPOPTR 3 /* ~ */
63 #define ENTAILPTR 4 /* * */
64 #define SIMPTR 5 /* & */
65 
66 #define ISMEMBERPTR 6 /* #m */
67 #define ISSTUFFPTR 7 /* #s */
68 #define ISPARTPTR 8 /* #p */
69 
70 #define HASMEMBERPTR 9 /* %m */
71 #define HASSTUFFPTR 10 /* %s */
72 #define HASPARTPTR 11 /* %p */
73 
74 #define MERONYM 12 /* % (not valid in lexicographer file) */
75 #define HOLONYM 13 /* # (not valid in lexicographer file) */
76 #define CAUSETO 14 /* > */
77 #define PPLPTR 15 /* < */
78 #define SEEALSOPTR 16 /* ^ */
79 #define PERTPTR 17 /* \ */
80 #define ATTRIBUTE 18 /* = */
81 #define VERBGROUP 19 /* $ */
82 #define DERIVATION 20 /* + */
83 #define CLASSIFICATION 21 /* ; */
84 #define CLASS 22 /* - */
85 
86 #define LASTTYPE CLASS
87 
88 /* Misc searches */
89 
90 #define SYNS (LASTTYPE + 1)
91 #define FREQ (LASTTYPE + 2)
92 #define FRAMES (LASTTYPE + 3)
93 #define COORDS (LASTTYPE + 4)
94 #define RELATIVES (LASTTYPE + 5)
95 #define HMERONYM (LASTTYPE + 6)
96 #define HHOLONYM (LASTTYPE + 7)
97 #define WNGREP (LASTTYPE + 8)
98 #define OVERVIEW (LASTTYPE + 9)
99 
100 #define MAXSEARCH OVERVIEW
101 
102 #define CLASSIF_START (MAXSEARCH + 1)
103 
104 #define CLASSIF_CATEGORY (CLASSIF_START) /* ;c */
105 #define CLASSIF_USAGE (CLASSIF_START + 1) /* ;u */
106 #define CLASSIF_REGIONAL (CLASSIF_START + 2) /* ;r */
107 
108 #define CLASSIF_END CLASSIF_REGIONAL
109 
110 #define CLASS_START (CLASSIF_END + 1)
111 
112 #define CLASS_CATEGORY (CLASS_START) /* -c */
113 #define CLASS_USAGE (CLASS_START + 1) /* -u */
114 #define CLASS_REGIONAL (CLASS_START + 2) /* -r */
115 
116 #define CLASS_END CLASS_REGIONAL
117 
118 #define INSTANCE (CLASS_END + 1) /* @i */
119 #define INSTANCES (CLASS_END + 2) /* ~i */
120 
121 #define MAXPTR INSTANCES
122 
123 /* WordNet part of speech stuff */
124 
125 #define NUMPARTS 4 /* number of parts of speech */
126 #define NUMFRAMES 35 /* number of verb frames */
127 
128 /* Generic names for part of speech */
129 
130 #define NOUN 1
131 #define VERB 2
132 #define ADJ 3
133 #define ADV 4
134 #define SATELLITE 5 /* not really a part of speech */
135 #define ADJSAT SATELLITE
136 
137 #define ALL_POS 0 /* passed to in_wn() to check all POS */
138 
139 #define bit(n) ((unsigned int)((unsigned int)1<<((unsigned int)n)))
140 
141 /* Adjective markers */
142 
143 #define PADJ 1 /* (p) */
144 #define NPADJ 2 /* (a) */
145 #define IPADJ 3 /* (ip) */
146 
147 #define UNKNOWN_MARKER 0
148 #define ATTRIBUTIVE NPADJ
149 #define PREDICATIVE PADJ
150 #define IMMED_POSTNOMINAL IPADJ
151 
152 extern char *wnrelease; /* WordNet release/version number */
153 
154 extern char *lexfiles[]; /* names of lexicographer files */
155 extern char *ptrtyp[]; /* pointer characters */
156 extern char *partnames[]; /* POS strings */
157 extern char partchars[]; /* single chars for each POS */
158 extern char *adjclass[]; /* adjective class strings */
159 extern char *frametext[]; /* text of verb frames */
160 
161 /* Data structures used by search code functions. */
162 
163 /* Structure for index file entry */
164 typedef struct {
165  long idxoffset; /* byte offset of entry in index file */
166  char *wd; /* word string */
167  char *pos; /* part of speech */
168  int sense_cnt; /* sense (collins) count */
169  int off_cnt; /* number of offsets */
170  int tagged_cnt; /* number senses that are tagged */
171  unsigned long *offset; /* offsets of synsets containing word */
172  int ptruse_cnt; /* number of pointers used */
173  int *ptruse; /* pointers used */
174 } Index;
175 
176 typedef Index *IndexPtr;
177 
178 /* Structure for data file synset */
179 typedef struct ss {
180  long hereiam; /* current file position */
181  int sstype; /* type of ADJ synset */
182  int fnum; /* file number that synset comes from */
183  char *pos; /* part of speech */
184  int wcount; /* number of words in synset */
185  char **words; /* words in synset */
186  int *lexid; /* unique id in lexicographer file */
187  int *wnsns; /* sense number in wordnet */
188  int whichword; /* which word in synset we're looking for */
189  int ptrcount; /* number of pointers */
190  int *ptrtyp; /* pointer types */
191  long *ptroff; /* pointer offsets */
192  int *ppos; /* pointer part of speech */
193  int *pto; /* pointer 'to' fields */
194  int *pfrm; /* pointer 'from' fields */
195  int fcount; /* number of verb frames */
196  int *frmid; /* frame numbers */
197  int *frmto; /* frame 'to' fields */
198  char *defn; /* synset gloss (definition) */
199  unsigned int key; /* unique synset key */
200 
201  /* these fields are used if a data structure is returned
202  instead of a text buffer */
203 
204  struct ss *nextss; /* ptr to next synset containing searchword */
205  struct ss *nextform; /* ptr to list of synsets for alternate
206  spelling of wordform */
207  int searchtype; /* type of search performed */
208  struct ss *ptrlist; /* ptr to synset list result of search */
209  char *headword; /* if pos is "s", this is cluster head word */
210  short headsense; /* sense number of headword */
211 } Synset;
212 
213 typedef Synset *SynsetPtr;
214 
215 typedef struct si {
216  char *sensekey; /* sense key */
217  char *word; /* word string */
218  long loc; /* synset offset */
219  int wnsense; /* WordNet sense number */
220  int tag_cnt; /* number of semantic tags to sense */
221  struct si *nextsi; /* ptr to next sense index entry */
222 } SnsIndex;
223 
225 
226 typedef struct {
227  int SenseCount[MAX_FORMS]; /* number of senses word form has */
228  int OutSenseCount[MAX_FORMS]; /* number of senses printed for word form */
229  int numforms; /* number of word forms searchword has */
230  int printcnt; /* number of senses printed by search */
231  char *searchbuf; /* buffer containing formatted results */
232  SynsetPtr searchds; /* data structure containing search results */
233 } SearchResults;
234 
236 
237 /* Global variables and flags */
238 
239 extern SearchResults wnresults; /* structure containing results of search */
240 extern int fnflag; /* if set, print lex filename after sense */
241 extern int dflag; /* if set, print definitional glosses */
242 extern int saflag; /* if set, print SEE ALSO pointers */
243 extern int fileinfoflag; /* if set, print lex file info on synsets */
244 extern int frflag; /* if set, print verb frames after synset */
245 extern int abortsearch; /* if set, stop search algorithm */
246 extern int offsetflag; /* if set, print byte offset of each synset */
247 extern int wnsnsflag; /* if set, print WN sense # for each word */
248 
249 /* File pointers for database files */
250 
251 extern int OpenDB; /* if non-zero, database file are open */
252 extern FILE *datafps[NUMPARTS + 1],
253  *indexfps[NUMPARTS + 1],
254  *sensefp,
255  *cntlistfp,
258 
259 /* Method for interface to check for events while search is running */
260 
261 extern void (*interface_doevents_func)(void);
262  /* callback for interruptable searches in */
263  /* single-threaded interfaces */
264 
265 /* General error message handler - can be defined by interface.
266  Default function provided in library returns -1 */
267 
268 extern int default_display_message(char *);
269 extern int (*display_message)(char *);
270 
271 
272 /* Make all the functions compatible with c++ files */
273 #ifdef __cplusplus
274 extern "C" {
275 #endif
276 
277 /* External library function prototypes */
278 
279 /*** Search and database functions (search.c) ***/
280 
281 /* Primry search algorithm for use with user interfaces */
282 extern char *findtheinfo(char *, int, int, int);
283 
284 /* Primary search algorithm for use with programs (returns data structure) */
285 extern SynsetPtr findtheinfo_ds(char *, int, int, int);
286 
287 /* Set bit for each search type that is valid for the search word
288  passed and return bit mask. */
289 extern unsigned int is_defined(char *, int);
290 
291 /* Set bit for each POS that search word is in. 0 returned if
292  word is not in WordNet. */
293 extern unsigned int in_wn(char *, int);
294 
295 /* Find word in index file and return parsed entry in data structure.
296  Input word must be exact match of string in database. */
297 extern IndexPtr index_lookup(char *, int);
298 
299 /* 'smart' search of index file. Find word in index file, trying different
300  techniques - replace hyphens with underscores, replace underscores with
301  hyphens, strip hyphens and underscores, strip periods. */
302 extern IndexPtr getindex(char *, int);
303 extern IndexPtr parse_index(long, int, char *);
304 
305 /* Read synset from data file at byte offset passed and return parsed
306  entry in data structure. */
307 extern SynsetPtr read_synset(int, long, char *);
308 
309 /* Read synset at current byte offset in file and return parsed entry
310  in data structure. */
311 extern SynsetPtr parse_synset(FILE *, int, char *);
312 
313 /* Free a synset linked list allocated by findtheinfo_ds() */
314 extern void free_syns(SynsetPtr);
315 
316 /* Free a synset */
317 extern void free_synset(SynsetPtr);
318 
319 /* Free an index structure */
320 extern void free_index(IndexPtr);
321 
322 /* Recursive search algorithm to trace a pointer tree and return results
323  in linked list of data structures. */
324 SynsetPtr traceptrs_ds(SynsetPtr, int, int, int);
325 
326 /* Do requested search on synset passed, returning output in buffer. */
327 extern char *do_trace(SynsetPtr, int, int, int);
328 
329 /*** Morphology functions (morph.c) ***/
330 
331 /* Open exception list files */
332 extern int morphinit();
333 
334 /* Close exception list files and reopen */
335 extern int re_morphinit();
336 
337 /* Try to find baseform (lemma) of word or collocation in POS. */
338 extern char *morphstr(char *, int);
339 
340 /* Try to find baseform (lemma) of individual word in POS. */
341 extern char *morphword(char *, int);
342 
343 /*** Utility functions (wnutil.c) ***/
344 
345 /* Top level function to open database files, initialize wn_filenames,
346  and open exeception lists. */
347 extern int wninit();
348 
349 /* Top level function to close and reopen database files, initialize
350  wn_filenames and open exception lists. */
351 extern int re_wninit();
352 
353 /* Top level function to close database files */
354 extern int wnclose();
355 
356 /* Count the number of underscore or space separated words in a string. */
357 extern int cntwords(char *, char);
358 
359 /* Convert string to lower case remove trailing adjective marker if found */
360 extern char *strtolower(char *);
361 
362 /* Convert string passed to lower case */
363 extern char *ToLowerCase(char *);
364 
365 /* Replace all occurrences of 'from' with 'to' in 'str' */
366 extern char *strsubst(char *, char, char);
367 
368 /* Return pointer code for pointer type characer passed. */
369 extern int getptrtype(char *);
370 
371 /* Return part of speech code for string passed */
372 extern int getpos(char *);
373 
374 /* Return synset type code for string passed. */
375 extern int getsstype(char *);
376 
377 /* Reconstruct synset from synset pointer and return ptr to buffer */
378 extern char *FmtSynset(SynsetPtr, int);
379 
380 /* Find string for 'searchstr' as it is in index file */
381 extern char *GetWNStr(char *, int);
382 
383 /* Pass in string for POS, return corresponding integer value */
384 extern int StrToPos(char *);
385 
386 /* Return synset for sense key passed. */
387 extern SynsetPtr GetSynsetForSense(char *);
388 
389 /* Find offset of sense key in data file */
390 extern long GetDataOffset(char *);
391 
392 /* Find polysemy (collins) count for sense key passed. */
393 extern int GetPolyCount(char *);
394 
395 /* Return word part of sense key */
396 extern char *GetWORD(char *);
397 
398 /* Return POS code for sense key passed. */
399 extern int GetPOS(char *);
400 
401 /* Convert WordNet sense number passed of IndexPtr entry to sense key. */
402 extern char *WNSnsToStr(IndexPtr, int);
403 
404 /* Search for string and/or baseform of word in database and return
405  index structure for word if found in database. */
406 extern IndexPtr GetValidIndexPointer(char *, int);
407 
408 /* Return sense number in database for word and lexsn passed. */
409 int GetWNSense(char *, char *);
410 
411 SnsIndexPtr GetSenseIndex(char *);
413 
414 char *GetOffsetForKey(unsigned int);
415 unsigned int GetKeyForOffset(char *);
416 
417 char *SetSearchdir();
418 
419 /* Return number of times sense is tagged */
420 int GetTagcnt(IndexPtr, int);
421 
422 /*
423 ** Wrapper functions for strstr that allow you to retrieve each
424 ** occurance of a word within a longer string, not just the first.
425 **
426 ** strstr_init is called with the same arguments as normal strstr,
427 ** but does not return any value.
428 **
429 ** strstr_getnext returns the position offset (not a pointer, as does
430 ** normal strstr) of the next occurance, or -1 if none remain.
431 */
432 extern void strstr_init (char *, char *);
433 extern int strstr_getnext (void);
434 
435 /*** Binary search functions (binsearch.c) ***/
436 
437 /* General purpose binary search function to search for key as first
438  item on line in open file. Item is delimited by space. */
439 extern char *bin_search(char *, FILE *);
440 extern char *read_index(long, FILE *);
441 
442 /* Copy contents from one file to another. */
443 extern void copyfile(FILE *, FILE *);
444 
445 /* Function to replace a line in a file. Returns the original line,
446  or NULL in case of error. */
447 extern char *replace_line(char *, char *, FILE *);
448 
449 /* Find location to insert line at in file. If line with this
450  key is already in file, return NULL. */
451 extern char *insert_line(char *, char *, FILE *);
452 
453 #ifdef __cplusplus
454 }
455 #endif
456 
457 extern char **helptext[NUMPARTS + 1];
458 /*
459 static char *license = "\
460 This software and database is being provided to you, the LICENSEE, by \n\
461 Princeton University under the following license. By obtaining, using \n\
462 and/or copying this software and database, you agree that you have \n\
463 read, understood, and will comply with these terms and conditions.: \n\
464  \n\
465 Permission to use, copy, modify and distribute this software and \n\
466 database and its documentation for any purpose and without fee or \n\
467 royalty is hereby granted, provided that you agree to comply with \n\
468 the following copyright notice and statements, including the disclaimer, \n\
469 and that the same appear on ALL copies of the software, database and \n\
470 documentation, including modifications that you make for internal \n\
471 use or for distribution. \n\
472  \n\
473 WordNet 2.1 Copyright 2005 by Princeton University. All rights reserved. \n\
474  \n\
475 THIS SOFTWARE AND DATABASE IS PROVIDED \"AS IS\" AND PRINCETON \n\
476 UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR \n\
477 IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON \n\
478 UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- \n\
479 ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE \n\
480 OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT \n\
481 INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR \n\
482 OTHER RIGHTS. \n\
483  \n\
484 The name of Princeton University or Princeton may not be used in \n\
485 advertising or publicity pertaining to distribution of the software \n\
486 and/or database. Title to copyright in this software, database and \n\
487 any associated documentation shall at all times remain with \n\
488 Princeton University and LICENSEE agrees to preserve same. \n"
489 ;
490 
491 static char dblicense[] = "\
492  1 This software and database is being provided to you, the LICENSEE, by \n\
493  2 Princeton University under the following license. By obtaining, using \n\
494  3 and/or copying this software and database, you agree that you have \n\
495  4 read, understood, and will comply with these terms and conditions.: \n\
496  5 \n\
497  6 Permission to use, copy, modify and distribute this software and \n\
498  7 database and its documentation for any purpose and without fee or \n\
499  8 royalty is hereby granted, provided that you agree to comply with \n\
500  9 the following copyright notice and statements, including the disclaimer, \n\
501  10 and that the same appear on ALL copies of the software, database and \n\
502  11 documentation, including modifications that you make for internal \n\
503  12 use or for distribution. \n\
504  13 \n\
505  14 WordNet 2.1 Copyright 2005 by Princeton University. All rights reserved. \n\
506  15 \n\
507  16 THIS SOFTWARE AND DATABASE IS PROVIDED \"AS IS\" AND PRINCETON \n\
508  17 UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR \n\
509  18 IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON \n\
510  19 UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- \n\
511  20 ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE \n\
512  21 OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT \n\
513  22 INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR \n\
514  23 OTHER RIGHTS. \n\
515  24 \n\
516  25 The name of Princeton University or Princeton may not be used in \n\
517  26 advertising or publicity pertaining to distribution of the software \n\
518  27 and/or database. Title to copyright in this software, database and \n\
519  28 any associated documentation shall at all times remain with \n\
520  29 Princeton University and LICENSEE agrees to preserve same. \n"
521 ; */
522 
523 #define DBLICENSE_SIZE (sizeof(dblicense))
524 
525 #endif /*_WN_*/
int getptrtype(char *)
int wcount
Definition: wn.h:184
int GetTagcnt(IndexPtr, int)
int abortsearch
char * headword
Definition: wn.h:209
char * findtheinfo(char *, int, int, int)
Index * IndexPtr
Definition: wn.h:176
int sense_cnt
Definition: wn.h:168
int * frmto
Definition: wn.h:197
char * wnrelease
int tagged_cnt
Definition: wn.h:170
char * GetWNStr(char *, int)
int cntwords(char *, char)
FILE * vsentfilefp
int re_morphinit()
char * morphword(char *, int)
long idxoffset
Definition: wn.h:165
char * bin_search(char *, FILE *)
long loc
Definition: wn.h:218
int wnsense
Definition: wn.h:219
unsigned long * offset
Definition: wn.h:171
struct ss * ptrlist
Definition: wn.h:208
SearchResults wnresults
char * frametext[]
SynsetPtr searchds
Definition: wn.h:232
int wnsnsflag
char * sensekey
Definition: wn.h:216
int GetWNSense(char *, char *)
int saflag
int wnclose()
IndexPtr index_lookup(char *, int)
struct si * nextsi
Definition: wn.h:221
int sstype
Definition: wn.h:181
SynsetPtr read_synset(int, long, char *)
void(* interface_doevents_func)(void)
SynsetPtr GetSynsetForSense(char *)
unsigned int GetKeyForOffset(char *)
char * WNSnsToStr(IndexPtr, int)
char * SetSearchdir()
char * read_index(long, FILE *)
int GetPolyCount(char *)
FILE * sensefp
int getpos(char *)
long hereiam
Definition: wn.h:180
struct ss * nextss
Definition: wn.h:204
unsigned int is_defined(char *, int)
char * defn
Definition: wn.h:198
char partchars[]
FILE * cntlistfp
int frflag
char ** helptext[NUMPARTS+1]
int whichword
Definition: wn.h:188
Definition: wn.h:179
struct ss Synset
Definition: wn.h:164
SearchResults * SearchResultsPtr
Definition: wn.h:235
char * do_trace(SynsetPtr, int, int, int)
char * word
Definition: wn.h:217
int fileinfoflag
int ptruse_cnt
Definition: wn.h:172
int re_wninit()
int fcount
Definition: wn.h:195
char * GetWORD(char *)
Synset * SynsetPtr
Definition: wn.h:213
unsigned int in_wn(char *, int)
int * ptruse
Definition: wn.h:173
char * insert_line(char *, char *, FILE *)
char * searchbuf
Definition: wn.h:231
char * wd
Definition: wn.h:166
char * partnames[]
SnsIndexPtr GetSenseIndex(char *)
FILE * revkeyindexfp
int morphinit()
IndexPtr GetValidIndexPointer(char *, int)
int * pfrm
Definition: wn.h:194
SynsetPtr parse_synset(FILE *, int, char *)
void free_synset(SynsetPtr)
void free_syns(SynsetPtr)
int ptrcount
Definition: wn.h:189
SynsetPtr traceptrs_ds(SynsetPtr, int, int, int)
int getsstype(char *)
int fnum
Definition: wn.h:182
Definition: wn.h:215
struct ss * nextform
Definition: wn.h:205
int default_display_message(char *)
struct si SnsIndex
int * ppos
Definition: wn.h:192
char * FmtSynset(SynsetPtr, int)
FILE * vidxfilefp
#define NUMPARTS
Definition: wn.h:125
int numforms
Definition: wn.h:229
int * pto
Definition: wn.h:193
FILE * indexfps[NUMPARTS+1]
int searchtype
Definition: wn.h:207
char * pos
Definition: wn.h:167
int(* display_message)(char *)
long GetDataOffset(char *)
SnsIndex * SnsIndexPtr
Definition: wn.h:224
void strstr_init(char *, char *)
int printcnt
Definition: wn.h:230
int StrToPos(char *)
SynsetPtr findtheinfo_ds(char *, int, int, int)
char * strsubst(char *, char, char)
int fnflag
int strstr_getnext(void)
void copyfile(FILE *, FILE *)
char * lexfiles[]
int * ptrtyp
Definition: wn.h:190
int * lexid
Definition: wn.h:186
int off_cnt
Definition: wn.h:169
int tag_cnt
Definition: wn.h:220
char * pos
Definition: wn.h:183
char ** words
Definition: wn.h:185
IndexPtr getindex(char *, int)
short headsense
Definition: wn.h:210
FILE * datafps[NUMPARTS+1]
int OpenDB
FILE * keyindexfp
#define MAX_FORMS
Definition: wn.h:53
int dflag
int * frmid
Definition: wn.h:196
unsigned int key
Definition: wn.h:199
void free_index(IndexPtr)
char * adjclass[]
char * GetOffsetForKey(unsigned int)
int wninit()
IndexPtr parse_index(long, int, char *)
char * replace_line(char *, char *, FILE *)
int GetPOS(char *)
char * ToLowerCase(char *)
int offsetflag
int * wnsns
Definition: wn.h:187
void FreeSenseIndex(SnsIndexPtr)
long * ptroff
Definition: wn.h:191
char * strtolower(char *)
char * ptrtyp[]
char * morphstr(char *, int)