Description Usage Arguments Value Author(s) References See Also Examples
To check the spelling of a word, one needs a speller instance. A speller instance has information about which dictionaries to use, what filters to apply to eliminate words, what suggestsions to make for misspelled words, etc. Each speller instance is independent of the others and this allows one to use separate spellers for each document or reuse an existing speller for multiple documents. This function returns an opaque reference to the C-level speller instance.
1 | getSpeller(conf = createSpellConfig(), class = "AspellSpeller")
|
conf |
the configuration object to use for this speller. As with spellers, one might create a single configuration and reuse it to create multiple spellers. |
class |
the name of the class that is instantiated with the
external pointer inserted into its |
An object of class AspellSpeller-class
.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
aspell
getSpellConfig
createSpellConfig
1 2 3 4 5 6 7 8 9 10 11 | speller = getSpeller()
words = unlist(strsplit(as.character(packageDescription("Aspell")), "[[:space:][:punct:]]"))
words = unique(words[words != ""])
check = aspell(words, FALSE, speller = speller)
# proportion of words spelled correctly
sum(check)/length(check)
words[!check]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.