2 * Modified version of StandardAnalyzer.h for Nepomuk mostly to optimize for filename indexing
3 * Copyright (C) 2008 Sebastian Trueg <trueg@kde.org>
5 * Based on StandardAnalyzer.h from the CLucene package.
6 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef _NEPOMUK_CLUCENE_ANALYZER_H_
25 #define _NEPOMUK_CLUCENE_ANALYZER_H_
28 #include <CLucene/clucene-config.h>
29 #include <CLucene/StdHeader.h>
30 #include <CLucene/util/VoidMap.h>
31 #include <CLucene/util/Reader.h>
32 #include <CLucene/analysis/AnalysisHeader.h>
33 #include <CLucene/analysis/Analyzers.h>
38 /** Represents a standard analyzer. */
39 class CLuceneAnalyzer
: public CL_NS(analysis
)::Analyzer
42 /** Builds an analyzer.*/
45 /** Builds an analyzer with the given stop words. */
46 CLuceneAnalyzer( const TCHAR
** stopWords
);
51 * Constructs a StandardTokenizer filtered by a
52 * StandardFilter, a LowerCaseFilter and a StopFilter.
54 CL_NS(analysis
)::TokenStream
* tokenStream(const TCHAR
* fieldName
, CL_NS(util
)::Reader
* reader
);
57 CL_NS(util
)::CLSetList
<const TCHAR
*> stopSet
;