Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
StopAnalyzer.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef STOPANALYZER_H
8 #define STOPANALYZER_H
9
10 #include "Analyzer.h"
11
12 namespace Lucene
13 {
18 class LPPAPI StopAnalyzer : public Analyzer
19 {
20 public:
22 StopAnalyzer(LuceneVersion::Version matchVersion);
23
25 StopAnalyzer(LuceneVersion::Version matchVersion, HashSet<String> stopWords);
26
28 StopAnalyzer(LuceneVersion::Version matchVersion, const String& stopwordsFile);
29
31 StopAnalyzer(LuceneVersion::Version matchVersion, ReaderPtr stopwords);
32
33 virtual ~StopAnalyzer();
34
35 LUCENE_CLASS(StopAnalyzer);
36
37 protected:
38 HashSet<String> stopWords;
39 bool enablePositionIncrements;
40
41 static const wchar_t* _ENGLISH_STOP_WORDS_SET[];
42
43 public:
45 static const HashSet<String> ENGLISH_STOP_WORDS_SET();
46
47 virtual TokenStreamPtr tokenStream(const String& fieldName, ReaderPtr reader);
48 virtual TokenStreamPtr reusableTokenStream(const String& fieldName, ReaderPtr reader);
49 };
50 }
51
52 #endif

clucene.sourceforge.net