| Package | com.adobe.linguistics.spelling.framework |
| Class | public class SpellingService |
| Inheritance | SpellingService flash.events.EventDispatcher |
| Language Version : | ActionScript 3.0. |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
| Property | Defined By | ||
|---|---|---|---|
| ignoreWordWithAllUpperCase : Boolean
This property controls if words in all upper-case should be considered as properly spelled or not. | SpellingService | ||
| userDictionaries : Vector.<UserDictionary> [read-only]
A Vector of user dictionaries added to this SpellingService. | SpellingService | ||
| Method | Defined By | ||
|---|---|---|---|
SpellingService(language:String)
Constructs a spelling service object. | SpellingService | ||
addUserDictionary(userDictionary:UserDictionary):Boolean
Add a UserDictionary to the SpellingService. | SpellingService | ||
checkWord(word:String):Boolean
Check the spelling of a word. | SpellingService | ||
getSuggestions(word:String):Vector.<String>
Get the suggestion of a misspelled word. | SpellingService | ||
init():void
Initialize the SpellingService. | SpellingService | ||
removeUserDictionary(userDictionary:UserDictionary):Boolean
Remove a UserDictionary from the SpellingService. | SpellingService | ||
| ignoreWordWithAllUpperCase | property |
ignoreWordWithAllUpperCase:BooleanThis property controls if words in all upper-case should be considered as properly spelled or not.
ignoreWordWithAllUpperCase | Description | |
false | Default | Words with all characters in upper case are checked against the dictionary for proper spelling. Example: if |
true | Any words with all characters in upper case are always considered as properly spelled, no matter whether the word is in the dictionary or not. Example: if |
public function get ignoreWordWithAllUpperCase():Boolean public function set ignoreWordWithAllUpperCase(value:Boolean):void| userDictionaries | property |
userDictionaries:Vector.<UserDictionary> [read-only]
A Vector of user dictionaries added to this SpellingService.
public function get userDictionaries():Vector.<UserDictionary>See also
| SpellingService | () | Constructor |
public function SpellingService(language:String)Constructs a spelling service object.
Parameterslanguage:String — The language used to create a SpellingService.
|
| addUserDictionary | () | method |
public function addUserDictionary(userDictionary:UserDictionary):Boolean
Add a UserDictionary to the SpellingService.
Parameters
userDictionary:UserDictionary — The UserDictionary to be added.
|
Boolean — True if the UserDictionary is added successfully, false if any error occurs. An example error scenario: Trying to add a previously added user dictionary.
|
See also
| checkWord | () | method |
public function checkWord(word:String):BooleanCheck the spelling of a word.
Parameters
word:String — The word to be checked.
|
Boolean — True if the word is correctly spelled, false if it is misspelled.
|
| getSuggestions | () | method |
public function getSuggestions(word:String):Vector.<String>Get the suggestion of a misspelled word.
Parameters
word:String — The word to be checked.
|
Vector.<String> — A vector containing all suggestions for the misspelled word, ordered by similarity to the original word.
Note that if a word is already correctly spelled, an empty Vector is returned.
|
| init | () | method |
public function init():void
Initialize the SpellingService. Once the initialization is done, an Event.COMPLETE event will be dispatched
and the SpellingService is ready to be used.
| removeUserDictionary | () | method |
public function removeUserDictionary(userDictionary:UserDictionary):Boolean
Remove a UserDictionary from the SpellingService.
Parameters
userDictionary:UserDictionary — The UserDictionary to be removed.
|
Boolean — True if the UserDictionary is removed successfully, false if any error occurs. An example error scenario: Trying to remove a user dictionary that has not been added previously.
|
See also