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

Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static Hashtable GetWordSet(
	FileInfo wordfile
)
Visual Basic
Public Shared Function GetWordSet ( _
	wordfile As FileInfo _
) As Hashtable
Visual C++
public:
static Hashtable^ GetWordSet(
	FileInfo^ wordfile
)

Parameters

wordfile
Type: System.IO..::..FileInfo
File containing the wordlist

Return Value

A HashSet with the file's words

See Also