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


lucene::analysis::WordlistLoader Class Reference

Loader for text files that represent a list of stopwords. More...

#include <Analyzers.h>


Static Public Member Functions

static CLTCSetListgetWordSet (const char *wordfilePath, const char *enc=NULL, CLTCSetList *stopTable=NULL)
 Loads a text file and adds every line as an entry to a HashSet (omitting leading and trailing whitespace).
static CLTCSetListgetWordSet (lucene::util::Reader *reader, CLTCSetList *stopTable=NULL, const bool bDeleteReader=false)
 Reads lines from a Reader and adds every line as an entry to a HashSet (omitting leading and trailing whitespace).


Detailed Description

Loader for text files that represent a list of stopwords.

Member Function Documentation

static CLTCSetList* lucene::analysis::WordlistLoader::getWordSet ( const char *  wordfilePath,
const char *  enc = NULL,
CLTCSetList stopTable = NULL 
) [static]

Loads a text file and adds every line as an entry to a HashSet (omitting leading and trailing whitespace).

Every line of the file should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Parameters:
wordfile File containing the wordlist
Returns:
A HashSet with the file's words

static CLTCSetList* lucene::analysis::WordlistLoader::getWordSet ( lucene::util::Reader reader,
CLTCSetList stopTable = NULL,
const bool  bDeleteReader = false 
) [static]

Reads lines from a Reader and adds every line as an entry to a HashSet (omitting leading and trailing whitespace).

Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Parameters:
reader Reader containing the wordlist
Returns:
A HashSet with the reader's words


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

clucene.sourceforge.net