Description
The Levenshtein Distance function td_levenshtein_distance_mle()
computes
the Levenshtein distance between two text values. The Levenshtein distance
(or edit distance) is the number of edits needed to transform one string
into the other. An edit is an insertion, deletion, or substitution of a
single character.
Usage
td_levenshtein_distance_mle ( data = NULL, target.column = NULL, source = NULL, threshold = NULL, output.column = "distance", output.target = "target", print.source = "source", accumulate = NULL, data.sequence.column = NULL, data.order.column = NULL )
Arguments
data |
Required Argument. |
data.order.column |
Optional Argument. |
target.column |
Required Argument. |
source |
Required Argument. |
threshold |
Optional Argument. |
output.column |
Optional Argument. |
output.target |
Optional Argument. |
print.source |
Optional Argument. |
accumulate |
Optional Argument.
Specifies the names of the input columns to copy to the output table. |
data.sequence.column |
Optional Argument. |
Value
Function returns an object of class "td_levenshtein_distance_mle"
which
is a named list containing Teradata tbl object.
Named list member can be referenced directly with the "$" operator
using name: result.
Examples
# Get the current context/connection con <- td_get_context()$connection # Load example data. loadExampleData("levenshteindistance_example", "levendist_input") # Create remote tibble objects. levendist_input <- tbl(con, "levendist_input") # Example 1 - This function computes the Levenshtein distance between two input text values. td_levenshtein_distance_out <- td_levenshtein_distance_mle(data=levendist_input, target.column = "tar_text", source = c("src_text1", "src_text2"), threshold = 10, accumulate = c("id") )