stringdistmatrix: stringdistmatrix

Description Usage Arguments Details Value Constraints See Also Examples

Description

compute distance metrics between strings.

Usage

1
2
3
4
5
stringdistmatrix(a, b, method = "osa", useBytes = FALSE, weight = c(d = 1,
  i = 1, s = 1, t = 1), maxDist = Inf, q = 1, p = 0,
  useNames = c("none", "strings", "names"), ncores = 1, cluster = NULL,
  nthread = getOption("sd_num_thread"), caseFlag = 0, vlength = 3,
  asMatrix = TRUE, ...)

Arguments

a

character or FLVector of characters

b

character or FLVector of characters

method

can be c("lv","dl","hamming","jaccard","jw") where lv - levenshtein, dl - levenshtein.damerau jw - jaro-winkler. Default is "lv"

p

penality factor for jaro-winkler if p==0 jaro distance is computed

caseFlag

logical or 0/1 indicating if comparision should be case sensitive

vlength

optional, length of strings to compare used for hamming

Details

stringdistmatrix computes the string distance matrix with rows according to a and columns according to b.

Value

FLMatrix of string distances

Constraints

row vectors are not supported currently.

See Also

stringdist for R function reference implementation.

Examples

1
2
3
4
5
6
7
widetable  <- FLTable("iris", "rownames")
flv <- widetable[1:10,"Species"]
resultflmatrix <- stringdistmatrix("xyz",flv)
resultflmatrix <- stringdistmatrix(c("xyz","abc"),flv,method="lv",caseFlag=1)
resultflmatrix <- stringdistmatrix("xyz",flv,method="hamming",vlength=4)
resultflmatrix <- stringdistmatrix(flv,flv,method="jw",p=1)
resultflmatrix <- stringdistmatrix(flv,c("xyz","abc"),method="jw")

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.