langchain_experimental.data_anonymizer.deanonymizer_matching_strategies.combined_exact_fuzzy_matching_strategy¶
langchain_experimental.data_anonymizer.deanonymizer_matching_strategies.combined_exact_fuzzy_matching_strategy(text: str, deanonymizer_mapping: Dict[str, Dict[str, str]], max_l_dist: int = 3) → str[source]¶
RECOMMENDED STRATEGY.
Combined exact and fuzzy matching strategy for deanonymization.
Parameters
text – text to deanonymize
deanonymizer_mapping – mapping between anonymized entities and original ones
max_l_dist – maximum Levenshtein distance between the anonymized entity and the
text segment to consider it a match
Examples of matching:Kaenu Reves -> Keanu Reeves
John F. Kennedy -> John Kennedy