StringDistance#

class langchain.evaluation.string_distance.base.StringDistance(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Distance metric to use.

DAMERAU_LEVENSHTEIN#

The Damerau-Levenshtein distance.

LEVENSHTEIN#

The Levenshtein distance.

JARO#

The Jaro distance.

JARO_WINKLER#

The Jaro-Winkler distance.

HAMMING#

The Hamming distance.

INDEL#

The Indel distance.

DAMERAU_LEVENSHTEIN = 'damerau_levenshtein'#
LEVENSHTEIN = 'levenshtein'#
JARO = 'jaro'#
JARO_WINKLER = 'jaro_winkler'#
HAMMING = 'hamming'#
INDEL = 'indel'#