MCPcopy Index your code
hub / github.com/simstudioai/sim / analyze

Function analyze

apps/pii/server.py:229–245  ·  view source on GitHub ↗
(req: AnalyzeRequest)

Source from the content-addressed store, hash-verified

227
228@app.post("/analyze")
229def analyze(req: AnalyzeRequest) -> list[dict[str, Any]]:
230 started = time.perf_counter()
231 results = analyzer.analyze(
232 text=req.text,
233 language=req.language,
234 entities=req.entities or None,
235 score_threshold=req.score_threshold,
236 return_decision_process=req.return_decision_process,
237 )
238 logger.info(
239 "analyze lang=%s chars=%d entities=%d duration_ms=%.1f",
240 req.language,
241 len(req.text),
242 len(results),
243 (time.perf_counter() - started) * 1000,
244 )
245 return [r.to_dict() for r in results]
246
247
248@app.post("/analyze_batch")

Callers

nothing calls this directly

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected