Skip to content

model

model

This module provides an interface to Nemo Safe Synthesizer Pii Replacer NER functionality.

Classes:

Name Description
Model

A representation of a singular NER model. This class combines

Model(*args, exclude=None)

A representation of a singular NER model. This class combines several NER techniques into a simple interface

Source code in src/nemo_safe_synthesizer/pii_replacer/ner/model.py
def __init__(self, *args, exclude: list[str] | None = None):
    if args and exclude:
        raise ValueError("Cannot include and exclude predictors")

    _pipeline = pipeline.from_source_string_list(include=args, exclude=exclude)
    self._ner = ner.NER(pipeline=_pipeline)