/* By Josh Rabinowitz 2005 */ /* $Id: jqpstopwords.c,v 1.5 2005/09/03 20:58:15 joshr Exp $ */ #include "jqpstopwords.h" #include /* for strcasecmp() */ #include /* for NULL */ static char *stopwords[] = /* list of stopwords, last is NULL */ { "the", "but", "if", "he", "she", "it", "them", NULL }; /* and more like that, read from a file, or get from swish-e */ /* this function is NOT USED YET */ /* returns 1 if word is a stopword, else 0 */ int is_stopword (char *word) { int i=0; for(i=0; stopwords[i]; i++) { /* linear search for the word */ fprintf(stderr, "Comparing '%s' to '%s'\n", stopwords[i], word); if( strcasecmp(stopwords[i], word) == 0) return 1; } return 0; }