R/normalize.R

Defines functions normalize

normalize <- function(text, distances) {
  min <- min(distances)
  max <- nchar(text) * MAX_DIFFERENCE - min
  1 - ((distances - min) / max)
}

Try the franc package in your browser

Any scripts or data that you put into this service are public.

franc documentation built on Oct. 18, 2021, 9:06 a.m.