MCPcopy
hub / github.com/simstudioai/sim / run_anonymize

Function run_anonymize

apps/pii/server.py:197–215  ·  view source on GitHub ↗
(
    text: str,
    raw_results: list[dict[str, Any]],
    operators: dict[str, OperatorConfig] | None,
)

Source from the content-addressed store, hash-verified

195
196
197def run_anonymize(
198 text: str,
199 raw_results: list[dict[str, Any]],
200 operators: dict[str, OperatorConfig] | None,
201):
202 analyzer_results = [
203 RecognizerResult(
204 entity_type=r["entity_type"],
205 start=r["start"],
206 end=r["end"],
207 score=r.get("score", 1.0),
208 )
209 for r in raw_results
210 ]
211 return anonymizer.anonymize(
212 text=text,
213 analyzer_results=analyzer_results,
214 operators=operators,
215 )
216
217
218@app.get("/health")

Callers 2

anonymizeFunction · 0.85
anonymize_batchFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected