Alphabet

Alphabet class

Represents a dictionary of characters that is used during indexing to detect the character type. Each character can be handled as a separator, as a letter, or both.

public class Alphabet : DictionaryBase, IEnumerable<int>

Properties

Name Description
Count { get; } Gets the number of characters contained in the Alphabet.
override DictionaryType { get; } Gets the dictionary type.

Methods

Name Description
override Clear() Sets the Separator type for all characters in this Alphabet.
ExportDictionary(string) Exports the dictionary to a file with the specified name.
GetCharacterType(char) Gets a type of a character.
GetCharacterType(int) Gets a type of a Unicode code point.
GetCharacterType(string) Gets a type of a character. This method can be used to obtain the type of a surrogate pair.
GetEnumerator() Returns an enumerator that iterates through the collection.
ImportDictionary(string) Imports a dictionary from the specified file.
SetRange(char[], CharacterType) Sets the type for each character of the specified collection in this instance of the Alphabet.
SetRange(int[], CharacterType) Sets the type for each character of the specified collection in this instance of the Alphabet.
SetRange(string[], CharacterType) Sets the type for each character of the specified collection in this instance of the Alphabet.

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