StopWordDictionary

StopWordDictionary class

Represents a dictionary of stop words.

public class StopWordDictionary : DictionaryBase, IEnumerable<string>

Properties

Name Description
Count { get; } Gets the number of stop words contained in the StopWordDictionary.
override DictionaryType { get; } Gets the dictionary type.

Methods

Name Description
AddRange(IEnumerable<string>) Adds the specified collection of words to this instance of the StopWordDictionary.
AddRange(string[]) Adds the specified collection of words to this instance of the StopWordDictionary.
override Clear() Removes all words from a StopWordDictionary object.
Contains(string) Determines whether a StopWordDictionary object contains the specified word.
ExportDictionary(string) Exports the dictionary to a file with the specified name.
GetEnumerator() Returns an enumerator that iterates through the collection.
ImportDictionary(string) Imports a dictionary from the specified file.
RemoveRange(IEnumerable<string>) Removes the specified collection of words from this instance of the StopWordDictionary.
RemoveRange(string[]) Removes the specified collection of words from this instance of the StopWordDictionary.

Remarks

The dictionary defines how the text of documents is divided into terms. Therefore the dictionary of an index can be changed only while the index contains no documents and its status is Ready; otherwise a method that changes the dictionary throws InvalidOperationException. A call that does not change the content of the dictionary is always allowed. To use another content with documents that are indexed already, create a new index and index the documents again.

A change of the dictionary of an index is saved in the index at once. If it cannot be saved, the method throws the exception that describes the failure, and the dictionary stays unchanged.

Learn more

See Also