Hi Rainer
Rainer.Scherg@rexroth.de wrote:
>
> Hi Jose!
>
> I tried and compiled the new version.
> filtera are working fine so far.
>
> Just a remark to the code (file.c):
>
> else if ((c = (char *) lstrstr(line, "FileFilter"))) {
> c += strlen("FileFilter");
> sl=parse_line(c);
> if(sl && sl->n==2) {
> filterlist = (struct filter *)
> addfilter(filterlist,sl->word[0],
> sl->word[1],filterdir);
> freeStringList(sl);
> } else progerr("FileFilter requires two values");
> }
>
>
> the c += strlen ("FileFilter") is obsolete, because your routine
> parse_line() does the job already. You just have to pass
> sl->word[1] and sl->word[2] (and of course check sl->n ==3)
> (a slight optinmization).
>
I agree. Th code can be something like
else {
sl=parse_line(c);
if(sl && sl->n) {
if(!strcasecmp(sl->word[0],"FileFilter) {
if(sl->n==3) {
....
} else progerr();
} else if(!strcasecmp(sl->word[0],"OtherOp" {
....
}
....
}
}
> I would like to include another feature into swish-e
> (not yet coded). swish-e only supports a standard list of
> stop words. Stopwords of other langues are to be defined in the
> config file. This is IMO to complicated if you got a lot of stopwords.
>
> I would like to propose the following directive:
>
> IgnoreWords SwishDefault
> IgnoreWords <word> [<word> ...]
> new: IgnoreWords File: <path-to-stop-word-file>
>
> path contains a file with stop words (separated by whitespaces).
> So swish could provide default stopword files for English, German,
> French, Spanish, etc. etc..
>
> Any remarks to this?
I like it. Perhaps we could use a C style directive:
IgnoreWords #include <path-to-stop-word-file>
In this way you can include files elsewhere in the
config file.
cu
Jose
Received on Thu Jun 15 09:56:45 2000