CharacterReplacementDictionary class
Leave feedback
On this page
Represents a character replacement dictionary used during indexing, allowing character replacement such as removing accents or enabling case‑insensitive indexing.
The dictionary defines how the text of documents is divided into terms. It can be changed only while the index contains no documents and its status is IndexStatus.ready; otherwise a method that changes the dictionary raises RuntimeError. Calls that do not modify the dictionary content are always allowed. To apply a different dictionary to documents that are already indexed, create a new index and re‑index the documents.
A change to the dictionary is saved to the index immediately. If the change cannot be saved, the method raises the exception that describes the failure, and the dictionary remains unchanged.
Learn more
- https://docs.groupdocs.com/search/python-net/character-replacement-during-indexing/
- https://docs.groupdocs.com/search/python-net/character-replacements/
The CharacterReplacementDictionary type exposes the following members:
| Method | Description |
|---|---|
| add_range | Adds the specified collection of character replacements to this CharacterReplacementDictionary. |
| add_range | Adds the specified collection of Unicode code point replacements to this instance of the CharacterReplacementDictionary. |
| add_range | Adds the specified collection of character replacements to this instance of the CharacterReplacementDictionary. |
| add_range | Adds the specified collection of character replacements to this instance of the CharacterReplacementDictionary. |
| clear | Removes all character replacements from the dictionary. |
| contains | Determines whether a CharacterReplacementDictionary object contains a replacement for the specified Unicode code point. |
| get_enumerator | Returns an enumerator that iterates through the collection. |
| get_replacement | Returns the replacement for the specified Unicode code point. |
| remove_range | Removes the specified collection of character replacements from this instance of the CharacterReplacementDictionary. |
| remove_range | Removes the specified collection of Unicode code point replacements from this CharacterReplacementDictionary. |
| remove_range | Removes the specified collection of character replacements from this instance of the CharacterReplacementDictionary. |
| remove_range | Removes the specified collection of Unicode code points replacements from this instance of the CharacterReplacementDictionary. |
| export_dictionary | Exports the dictionary to a file with the specified name. (inherited from DictionaryBase) |
| import_dictionary | Imports a dictionary from the specified file. (inherited from DictionaryBase) |
| Property | Description |
|---|---|
| count | The number of Unicode code points contained in this CharacterReplacementDictionary. |
| dictionary_type | The dictionary type. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.