Skip to content

String distance: dist_str.*

damerau_levenshtein

damerau_levenshtein(
    other: IntoExpr, normalized: bool = False
) -> pl.Expr

Returns damerau levenshtein distance between two expressions

hamming

hamming(
    other: IntoExpr, normalized: bool = False
) -> pl.Expr

Returns hamming distance between two expressions.

The length of the shortest string is padded to the length of longest string.

indel

indel(other: IntoExpr, normalized: bool = False) -> pl.Expr

Returns indel distance between two expressions

jaro

jaro(other: IntoExpr) -> pl.Expr

Returns jaro distance between two expressions. Which is normalized by default.

jaro_winkler

jaro_winkler(other: IntoExpr) -> pl.Expr

Returns jaro_winkler distance between two expressions. Which is normalized by default.

lcs_seq

lcs_seq(
    other: IntoExpr, normalized: bool = False
) -> pl.Expr

Returns lcs_seq distance between two expressions

levenshtein

levenshtein(
    other: IntoExpr, normalized: bool = False
) -> pl.Expr

Returns levenshtein distance between two expressions

osa

osa(other: IntoExpr, normalized: bool = False) -> pl.Expr

Returns osa distance between two expressions

postfix

postfix(
    other: IntoExpr, normalized: bool = False
) -> pl.Expr

Returns postfix distance between two expressions

prefix

prefix(
    other: IntoExpr, normalized: bool = False
) -> pl.Expr

Returns prefix distance between two expressions