PlatformSpellChecker
Platform-specific spell checker that provides spell checking functionality.
On Android, this uses the system's TextServicesManager and SpellCheckerSession. On Desktop, this uses native spell checking APIs (Windows Spell Checking API, macOS NSSpellChecker, or Hunspell on Linux).
Platform-specific spell checker that provides spell checking functionality.
On Android, this uses the system's TextServicesManager and SpellCheckerSession. On Desktop, this uses native spell checking APIs (Windows Spell Checking API, macOS NSSpellChecker, or Hunspell on Linux).
Desktop JVM implementation of PlatformSpellChecker.
Automatically detects the operating system and uses the appropriate native spell checker:
Windows 8+: Windows Spell Checking API via JNA/COM
macOS: NSSpellChecker via JNA/Objective-C runtime
Linux: Hunspell/Enchant (to be implemented)
iOS implementation of PlatformSpellChecker using UITextChecker.
UITextChecker is part of UIKit and provides spell checking functionality using the system's dictionaries and language settings.
Constructors
Functions
Adds word to the user dictionary. Subsequent spell checks will treat it as correctly spelled.
Adds word to the user dictionary. Subsequent spell checks will treat it as correctly spelled.
Adds word to the user dictionary. Subsequent spell checks will treat it as correctly spelled.
Adds word to the user dictionary. Subsequent spell checks will treat it as correctly spelled.
Performs spell check on a sentence or multi-word text. Returns a list of SpellingCorrection objects containing the misspelled words, their positions in the original text, and suggested corrections. Returns an empty list if no spelling errors are found.
Performs spell check on a sentence or multi-word text. Returns a list of SpellingCorrection objects containing the misspelled words, their positions in the original text, and suggested corrections. Returns an empty list if no spelling errors are found.
Performs spell check on a sentence or multi-word text. Returns a list of SpellingCorrection objects containing the misspelled words, their positions in the original text, and suggested corrections. Returns an empty list if no spelling errors are found.
Performs spell check on a sentence or multi-word text. Returns a list of SpellingCorrection objects containing the misspelled words, their positions in the original text, and suggested corrections. Returns an empty list if no spelling errors are found.
Checks a single word and returns a structured result indicating if it is spelled correctly. When misspelled, includes up to maxSuggestions suggestions (may be empty).
Checks a single word and returns a structured result indicating if it is spelled correctly. When misspelled, includes up to maxSuggestions suggestions (may be empty).
Checks a single word and returns a structured result indicating if it is spelled correctly. When misspelled, includes up to maxSuggestions suggestions (may be empty).
Checks a single word and returns a structured result indicating if it is spelled correctly. When misspelled, includes up to maxSuggestions suggestions (may be empty).
Releases any platform resources held by the spell checker (if applicable). Safe to call multiple times. No-op on platforms that do not require cleanup.
Releases any platform resources held by the spell checker (if applicable). Safe to call multiple times. No-op on platforms that do not require cleanup.
Releases any platform resources held by the spell checker (if applicable). Safe to call multiple times. No-op on platforms that do not require cleanup.
Releases any platform resources held by the spell checker (if applicable). Safe to call multiple times. No-op on platforms that do not require cleanup.
Marks word as ignored for the lifetime of this checker. Unlike addToDictionary, ignores are not persisted and are not returned by userDictionary. Where the platform provides a native ignore facility (iOS, macOS, Windows, Linux/Hunspell) it is used; otherwise the word is filtered out of results in this library.
Marks word as ignored for the lifetime of this checker. Unlike addToDictionary, ignores are not persisted and are not returned by userDictionary. Where the platform provides a native ignore facility (iOS, macOS, Windows, Linux/Hunspell) it is used; otherwise the word is filtered out of results in this library.
Marks word as ignored for the lifetime of this checker. Unlike addToDictionary, ignores are not persisted and are not returned by userDictionary. Where the platform provides a native ignore facility (iOS, macOS, Windows, Linux/Hunspell) it is used; otherwise the word is filtered out of results in this library.
Marks word as ignored for the lifetime of this checker. Unlike addToDictionary, ignores are not persisted and are not returned by userDictionary. Where the platform provides a native ignore facility (iOS, macOS, Windows, Linux/Hunspell) it is used; otherwise the word is filtered out of results in this library.
Checks if a single word exists in the active dictionary and is considered correctly spelled. Returns true when the word is recognized by the platform spell checker or appears in the user dictionary (see addToDictionary) or session ignores (see ignoreWord); false otherwise.
Checks if a single word exists in the active dictionary and is considered correctly spelled. Returns true when the word is recognized by the platform spell checker or appears in the user dictionary (see addToDictionary) or session ignores (see ignoreWord); false otherwise.
Checks if a single word exists in the active dictionary and is considered correctly spelled. Returns true when the word is recognized by the platform spell checker or appears in the user dictionary (see addToDictionary) or session ignores (see ignoreWord); false otherwise.
Checks if a single word exists in the active dictionary and is considered correctly spelled. Returns true when the word is recognized by the platform spell checker or appears in the user dictionary (see addToDictionary) or session ignores (see ignoreWord); false otherwise.
Removes word from the user dictionary previously added via addToDictionary.
Removes word from the user dictionary previously added via addToDictionary.
Removes word from the user dictionary previously added via addToDictionary.
Removes word from the user dictionary previously added via addToDictionary.
Atomically replaces the DictionaryScope.AppLocal user dictionary with words (normalized the same way as addToDictionary: trimmed, case-insensitive) and resets this checker's session ignore set. Use to switch between independent dictionary contexts without tearing down the checker.
Atomically replaces the DictionaryScope.AppLocal user dictionary with words (normalized the same way as addToDictionary: trimmed, case-insensitive) and resets this checker's session ignore set. Use to switch between independent dictionary contexts without tearing down the checker.
Atomically replaces the DictionaryScope.AppLocal user dictionary with words (normalized the same way as addToDictionary: trimmed, case-insensitive) and resets this checker's session ignore set. Use to switch between independent dictionary contexts without tearing down the checker.
Atomically replaces the DictionaryScope.AppLocal user dictionary with words (normalized the same way as addToDictionary: trimmed, case-insensitive) and resets this checker's session ignore set. Use to switch between independent dictionary contexts without tearing down the checker.