Add README
[xapian-trec.git] / stopword.h
blob47660b2870ac735733c2dc12fba388a22dbc14ca
1 /* stopword.h: stop word access routines
3 * ----START-LICENCE----
4 * Copyright 2003 Andy MacFarlane, City University
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 * USA
20 * -----END-LICENCE-----
23 #ifndef _STOPS_H_
24 #define _STOPS_H_
26 #define KW_SIZE 80 /* maximum size of a keyword */
27 #define MAX_STOPWORDS 1000 /* max number of words in extra stop word list */
29 typedef struct sw_store {
31 char words[MAX_STOPWORDS][KW_SIZE]; /* list of stop words */
32 unsigned nstops; /* the number of stop words held in core */
34 } SW_STORE;
37 extern void Read_SW_File( char sw_file[], SW_STORE * sw_store );
38 /* read stop word file into stop word store
39 version which goes directly to the file, with need for specifiying dir */
41 extern int IsStopWord( SW_STORE sw_store, char word[KW_SIZE] );
42 /* see if word is a stop word */
44 extern void Init_str( char str[], int size );
45 /* init str */
47 #endif