1 | /**************************************************************************
|
---|
2 | *
|
---|
3 | * stemmer.h -- The stemmer/case folder
|
---|
4 | * Copyright (C) 1994 Neil Sharman
|
---|
5 | *
|
---|
6 | * This program is free software; you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation; either version 2 of the License, or
|
---|
9 | * (at your option) any later version.
|
---|
10 | *
|
---|
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.
|
---|
15 | *
|
---|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | *
|
---|
20 | **************************************************************************/
|
---|
21 |
|
---|
22 | #ifndef STEMMER_H
|
---|
23 | #define STEMMER_H
|
---|
24 |
|
---|
25 | #include "sysfuncs.h"
|
---|
26 |
|
---|
27 | #define STEMMER_MASK 3
|
---|
28 | #define MAX_STEM_DESCRIPTION_LEN 16
|
---|
29 |
|
---|
30 | /* stemmernumber will return the stemmer for
|
---|
31 | * a description of the stemmer. Stemmer descriptions
|
---|
32 | * are not case sensitive. Valid descriptions are:
|
---|
33 | *
|
---|
34 | * 'English'
|
---|
35 | * 'Lovin'
|
---|
36 | * 'French'
|
---|
37 | * 'SimpleFrench'
|
---|
38 | *
|
---|
39 | * More than one description might result in the same
|
---|
40 | * stemmer number (for example, for stemming 'English'
|
---|
41 | * we currently use the 'Lovin' stemmer).
|
---|
42 | *
|
---|
43 | * stemmerdescription is a normal C, null-terminated,
|
---|
44 | * string.
|
---|
45 | *
|
---|
46 | * stemmernumber will return -1 if it doesn't know the
|
---|
47 | * stemmer description.
|
---|
48 | */
|
---|
49 | int stemmernumber (u_char *stemmerdescription);
|
---|
50 |
|
---|
51 | /*
|
---|
52 | * Method 0 - Do not stem or case fold.
|
---|
53 | * Method 1 - Case fold.
|
---|
54 | * Method 2 - Stem.
|
---|
55 | * Method 3 - Case fold and stem.
|
---|
56 | *
|
---|
57 | * The stemmer number should be obtained using function
|
---|
58 | * stemmernumber above.
|
---|
59 | */
|
---|
60 | #ifdef __cplusplus
|
---|
61 | extern "C"
|
---|
62 | #endif
|
---|
63 | void stemmer (int method, int stemmer, u_char * word);
|
---|
64 |
|
---|
65 | #endif
|
---|