RuleNodeProcessor#
- class langsmith.anonymizer.RuleNodeProcessor(rules: List[StringNodeRule])[source]#
String node processor that uses a list of rules to replace sensitive data.
Initialize the processor with a list of rules.
Attributes
Methods
__init__(rules)Initialize the processor with a list of rules.
mask_nodes(nodes)Mask nodes using the rules.
- Parameters:
rules (List[StringNodeRule])
- __init__(rules: List[StringNodeRule])[source]#
Initialize the processor with a list of rules.
- Parameters:
rules (List[StringNodeRule])
- mask_nodes(nodes: List[StringNode]) List[StringNode][source]#
Mask nodes using the rules.
- Parameters:
nodes (List[StringNode])
- Return type:
List[StringNode]