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


lucene::analysis::StopFilter Class Reference

Removes stop words from a token stream. More...

#include <Analyzers.h>

Inheritance diagram for lucene::analysis::StopFilter:
lucene::analysis::TokenFilter lucene::analysis::TokenStream lucene::debug::LuceneBase

List of all members.

Public Member Functions

 StopFilter (TokenStream *in, bool deleteTokenStream, const TCHAR **stopWords)
 ~StopFilter ()
 StopFilter (TokenStream *in, bool deleteTokenStream, lucene::util::CLSetList< const TCHAR * > *stopTable)
 Constructs a filter which removes words from the input TokenStream that are named in the CLSetList.
bool next (Token *token)
 Returns the next input Token whose termText() is not a stop word.

Static Public Member Functions

static void fillStopTable (lucene::util::CLSetList< const TCHAR * > *stopTable, const TCHAR **stopWords)
 Builds a Hashtable from an array of stop words, appropriate for passing into the StopFilter constructor.

Detailed Description

Removes stop words from a token stream.


Constructor & Destructor Documentation

lucene::analysis::StopFilter::StopFilter ( TokenStream in,
bool  deleteTokenStream,
const TCHAR **  stopWords 
)
lucene::analysis::StopFilter::~StopFilter (  )  [inline]
lucene::analysis::StopFilter::StopFilter ( TokenStream in,
bool  deleteTokenStream,
lucene::util::CLSetList< const TCHAR * > *  stopTable 
) [inline]

Constructs a filter which removes words from the input TokenStream that are named in the CLSetList.


Member Function Documentation

static void lucene::analysis::StopFilter::fillStopTable ( lucene::util::CLSetList< const TCHAR * > *  stopTable,
const TCHAR **  stopWords 
) [static]

Builds a Hashtable from an array of stop words, appropriate for passing into the StopFilter constructor.

This permits this table construction to be cached once when an Analyzer is constructed. Note: the stopWords list must be a static list because the strings are not copied

bool lucene::analysis::StopFilter::next ( Token token  )  [virtual]

Returns the next input Token whose termText() is not a stop word.

Implements lucene::analysis::TokenStream.


The documentation for this class was generated from the following file:

clucene.sourceforge.net