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]#
Combined exact and fuzzy matching strategy for deanonymization.
It is a RECOMMENDED STRATEGY.
- Parameters:
text (str) – text to deanonymize
deanonymizer_mapping (Dict[str, Dict[str, str]]) – mapping between anonymized entities and original ones
max_l_dist (int) – maximum Levenshtein distance between the anonymized entity and the text segment to consider it a match
- Return type:
str
- Examples of matching:
Kaenu Reves -> Keanu Reeves John F. Kennedy -> John Kennedy