Spell Checker
Verb: spellChecker
Checks the text spelling, allowing for correction and suggestions, depending on the selected analysis mode.
Syntax
spellChecker --mode(SpellCheckModes) --culture(Culture) --text(String) (String)=text (DataTable)=suggestions (Boolean)=success
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--mode | Mode | Required | SpellCheckModes | Text spelling check mode:
|
--culture | Language | Required | Culture | Language that should be used for text analysis. The options are:
|
--text | Text | Required | Text | Text that should be checked. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
text | Verified Text | Text | Returns the adjusted text, if it was adjusted, according to that specified in the Mode parameter. |
suggestions | Suggestions | Data Table | Returns a data table with the index, the length, the text identified for spelling analysis and the suggestions for adjustment. |
success | Success | Boolean | Returns "True", if the spelling check is successful, otherwise, returns "False". |
Example
The command checks the spelling of text that contains words with errors, such as: "aotumation" and "intelygent". The "Fix" mode is used to return the corrected source text and, consequently, return correction suggestions for the verified words.
defVar --name verifiedText --type String
defVar --name spellingSuggestions --type DataTable
defVar --name executionSuccess --type Boolean
spellChecker --mode "Fix" --culture en-US --text "Leader in intelygent aotumation." verifiedText=text spellingSuggestions=suggestions executionSuccess=success
logMessage --message "Verified Text: ${verifiedText}\r\n\r\nSpelling Suggestions: ${spellingSuggestions}\r\n\r\nExecution Success: ${executionSuccess}" --type "Info"
// Verified Text: IBMRoboticProcessAutomationLeaderinintelygentaotumationinBrazil.
//
// Spelling Suggestions: 0, 10, intelygent, intelligent,intelligence,intelligibly,
// 0, 10, aotumation, automation,maturation,summation,intimation,
//
// Execution Success: True