Description Usage Arguments Details Value Author(s) References See Also Examples
These functions provide facilities to add words
to the speller's dictionary.
addCorrection
specifies
the corrected version of a “word”
so that it can be used as a possible suggestion
in the future.
addToList
allows the caller to augment
the existing dictionary, either for this session
or in the personal dictionary.
1 2 | addCorrection(speller, ..., .words, .pairs)
addToList(words, speller, session = TRUE)
|
... |
a named collection of words. The names are the mistakes and the associated values are the desired corrections. |
.words |
a named character vector of words. This is provided for programmatic access to this function and mirrors the values specified in .... |
words |
a character vector whose elements are to be added to the list of acceptable (correctly spelled) words. |
.pairs |
a character vector that allows the caller to specify the mis-spelled/correct word pairs directly as a character vector without having to arrange them into a named character vector of correct words. This should have even length or an error will be generated. The elements are incorrect followed by correct pairs of words. |
speller |
the |
session |
a logical value. |
These call aspell_add_to_personal
aspell_add_to_session
and
aspell_speller_store_replacement
.
An integer vector with as many elements as there are words.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://aspell.sourceforge.net http://www.omegahat.org
1 2 3 4 5 6 7 | sp = getSpeller()
# The 3 calls are equivalent, but provide different
# interfaces.
addCorrection(sp, "duncn" = "duncan")
addCorrection(sp, .words = c(duncn = "duncan"))
addCorrection(sp, .pairs = c("duncn", "duncan"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.