langchain_experimental.data_anonymizer.deanonymizer_mapping.DeanonymizerMapping

class langchain_experimental.data_anonymizer.deanonymizer_mapping.DeanonymizerMapping(mapping: ~typing.Dict[str, ~typing.Dict[str, str]] = <factory>)[source]

Deanonymizer mapping.

Attributes

data

Return the deanonymizer mapping.

mapping

Methods

__init__([mapping])

update(new_mapping)

Update the deanonymizer mapping with new values.

Parameters

mapping (Dict[str, Dict[str, str]]) –

__init__(mapping: ~typing.Dict[str, ~typing.Dict[str, str]] = <factory>) None
Parameters

mapping (Dict[str, Dict[str, str]]) –

Return type

None

update(new_mapping: Dict[str, Dict[str, str]]) None[source]

Update the deanonymizer mapping with new values.

Duplicated values will not be added If there are multiple entities of the same type, the mapping will include a count to differentiate them. For example, if there are two names in the input text, the mapping will include NAME_1 and NAME_2.

Parameters

new_mapping (Dict[str, Dict[str, str]]) –

Return type

None