Skip to content

Commit

Permalink
updated stringsim doc
Browse files Browse the repository at this point in the history
  • Loading branch information
markvanderloo committed Dec 2, 2015
1 parent 0852c5d commit 0cb224f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/R/stringsim.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@
#'
#' @details
#' The similarity is calculated by first calculating the distance using
#' \code{\link{stringdist}} and then dividing the distance by the maximum
#' possible distance. This results in a score between 0 and 1, with 1
#' corresponding to perfect similarity and 0 to complete dissimilarity.
#' For distances where weights can be specified, the maximum distance is currently computed by
#' assuming that all weights are equal to 1.
#' \code{\link{stringdist}}, dividing the distance by the maximum
#' possible distance, and substracting the result from 1.
#' This results in a score between 0 and 1, with 1
#' corresponding to complete similarity and 0 to complete dissimilarity.
#' Note that complete similarity only means equality for distances satisfying
#' the identity property. This is not the case e.g. for q-gram based distances
#' (for example if q=1, anagrams are completely similar).
#' For distances where weights can be specified, the maximum distance
#' is currently computed by assuming that all weights are equal to 1.
#'
#' @example ../examples/stringsim.R
#' @export
Expand Down

0 comments on commit 0cb224f

Please sign in to comment.