C# Class Lucene.Net.Analysis.WordlistLoader

Loads a text file and adds every line as an entry to a Hashtable. Every line should contain only one word. If the file is not found or on any error, an empty table is returned.
显示文件 Open project: synhershko/lucene.net Class Usage Examples

Public Methods

Method Description
GetStemDict ( System wordstemfile ) : string>.Dictionary

Reads a stem dictionary. Each line contains: word\tstem (i.e. two tab seperated words)

GetWordSet ( System wordfile ) : ISet

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).

GetWordSet ( System wordfile, System comment ) : ISet

Loads a text file and adds every non-comment 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).

Method Details

GetStemDict() public static method

Reads a stem dictionary. Each line contains: word\tstem (i.e. two tab seperated words)
public static GetStemDict ( System wordstemfile ) : string>.Dictionary
wordstemfile System
return string>.Dictionary

GetWordSet() public static method

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).
public static GetWordSet ( System wordfile ) : ISet
wordfile System File containing the wordlist
return ISet

GetWordSet() public static method

Loads a text file and adds every non-comment 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).
public static GetWordSet ( System wordfile, System comment ) : ISet
wordfile System File containing the wordlist
comment System The comment string to ignore
return ISet