SDcheck: Performs spell checking using symmetric delete spell...

Description Usage Arguments Details Value See Also Examples

View source: R/SDcheck.R

Description

Spell checking for symmetric delete approach. Automatically detects the distance with which the keeper was pre-created.

Usage

1
SDcheck(keeper, string, summarize = FALSE)

Arguments

keeper

the structure used in the pre-calculation step to store the dictionary symmetrical deletions.

string

the misspelled string to correct.

summarize

if TRUE returns a list that summarizes the different distances of the corrected words. Default is FALSE.

Details

Generate terms with an edit distance <= maxdist (deletes only) from the query term. As the edit distance between two terms is symmetrical and the deletions from the dictionary terms have been pre-stored, the performance is three orders of magnitude better than Peter Norvig's approach for distance 2 and five orders for distance 3.

Value

A vector or a list with the corrected words.

See Also

SDkeeper

Examples

1
2
3
fruitTree <- SDkeeper(c("apple", "orange", "lemon"), 2)
SDcheck(fruitTree,"aple")
SDcheck(fruitTree,"aple", summarize = TRUE)

TSTr documentation built on May 1, 2019, 9:16 p.m.