StringDistance Class — langchain Architecture
Architecture documentation for the StringDistance class in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 28415ea1_8848_481c_472f_e68140e5dca7["StringDistance"] 02530704_9a53_33b0_b7e6_7a524bfb049e["base.py"] 28415ea1_8848_481c_472f_e68140e5dca7 -->|defined in| 02530704_9a53_33b0_b7e6_7a524bfb049e
Relationship Graph
Source Code
libs/langchain/langchain_classic/evaluation/string_distance/base.py lines 41–58
class StringDistance(str, Enum):
"""Distance metric to use.
Attributes:
`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"
Source
Frequently Asked Questions
What is the StringDistance class?
StringDistance is a class in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/string_distance/base.py.
Where is StringDistance defined?
StringDistance is defined in libs/langchain/langchain_classic/evaluation/string_distance/base.py at line 41.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free