Repository Analysis

maziyarpanahi/openmed

Local-first healthcare AI: clinical NER & HIPAA PII de-identification that runs 100% on-device. 2,200+ medical models, 21 languages, Apple MLX + Python, no cloud, no patient data leaving your network. Apache-2.0

23.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of maziyarpanahi/openmed, a Python project with 5,174 GitHub stars. SynthScan v2.0 examined 971,482 lines of code across 2808 source files, recording 21324 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 23.5 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

23.5
Adjusted Score
23.5
Raw Score
100%
Time Factor
2026-08-26
Last Push
5.2K
Stars
Python
Language
971.5K
Lines of Code
2.8K
Files
21.3K
Pattern Hits
2026-08-29
Scan Date
0.11
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 298MEDIUM 877LOW 20149

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 21324 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers11463 hits · 11318 pts
SeverityFileLineSnippetContext
LOWpackaging/standalone_manifest.py483def _validate_entry_collection(CODE
LOWopenmed/__init__.py272def _split_prediction_at_boundaries(CODE
LOWopenmed/traces/audit.py461def _merged_byte_range_length(ranges: Iterable[ByteRange]) -> int:CODE
LOWopenmed/traces/fidelity.py867def _is_path_segment_sequence(items: Sequence[Any]) -> bool:CODE
LOWopenmed/traces/fidelity.py873def _looks_like_path_expression(value: object) -> bool:CODE
LOWopenmed/traces/streaming.py114def _validate_positive_integer(value: int, name: str) -> int:CODE
LOWopenmed/traces/tool_calls.py141def redact_tool_call_with_report(CODE
LOWopenmed/traces/schemas/preference.py557 def redact_dataset_with_report(CODE
LOWopenmed/traces/schemas/preference.py686def redact_preference_dataset(CODE
LOWopenmed/traces/schemas/preference.py864def _contains_source_fragment(source: str, candidate: str) -> bool:CODE
LOWopenmed/traces/schemas/columnar.py129def iter_redacted_record_batches(CODE
LOWopenmed/traces/schemas/chat.py862def redact_chat_record_with_report(CODE
LOWopenmed/traces/schemas/chat.py926def redact_chat_messages_with_report(CODE
LOWopenmed/core/repro_hash.py43def compute_canonical_payload_hash(payload: Any) -> str:CODE
LOWopenmed/core/repro_hash.py63def compute_reproducibility_hash(CODE
LOWopenmed/core/repro_hash.py113def compute_environment_lock_digest(lock_path: str | Path = "uv.lock") -> str:CODE
LOWopenmed/core/repro_hash.py119def compute_training_reproducibility_hash(CODE
LOWopenmed/core/repro_hash.py149def build_training_provenance(CODE
LOWopenmed/core/repro_hash.py197def write_training_provenance(CODE
LOWopenmed/core/repro_hash.py289def canonicalize_span_records(spans: Iterable[Any]) -> list[dict[str, Any]]:CODE
LOWopenmed/core/repro_hash.py458def _normalise_training_provenance(provenance: Mapping[str, Any]) -> dict[str, Any]:CODE
LOWopenmed/core/repro_hash.py531def _verify_manifest_row_hash(row: Mapping[str, Any], recorded_hash: str) -> None:CODE
LOWopenmed/core/document_stream.py332def _select_overlap_sentences(CODE
LOWopenmed/core/document_stream.py606def deidentify_document_stream(CODE
LOWopenmed/core/labels.py524def canonical_label_for_column_semantic(semantic_type: str) -> str:CODE
LOWopenmed/core/labels.py2035def supports_name_boundary_refinement(label: str, lang: str = "en") -> bool:CODE
LOWopenmed/core/quality_gates.py301def validate_entity_spans_strict(CODE
LOWopenmed/core/quality_gates.py362def resolve_overlapping_entities(CODE
LOWopenmed/core/quality_gates.py426def detect_overlapping_entities(CODE
LOWopenmed/core/config.py143def _property_validation_errors(CODE
LOWopenmed/core/audit.py98def _contains_sensitive_india_identifier(value: str) -> bool:CODE
LOWopenmed/core/audit.py208def _safe_attribute_disclosure(value: Any) -> list[dict[str, Any]]:CODE
LOWopenmed/core/audit.py248def _sanitize_release_assessment(value: Mapping[str, Any]) -> dict[str, Any]:CODE
LOWopenmed/core/audit.py321def _safe_generalization_summary(value: Any) -> dict[str, Any]:CODE
LOWopenmed/core/audit.py396def _sanitize_anonymization_summary(value: Mapping[str, Any]) -> dict[str, Any]:CODE
LOWopenmed/core/audit.py443def _looks_like_detailed_risk_report(value: Mapping[str, Any]) -> bool:CODE
LOWopenmed/core/audit.py451def _sanitize_detailed_risk_report(value: Mapping[str, Any]) -> dict[str, Any]:CODE
LOWopenmed/core/audit.py561def _looks_like_kanon_enforcement(value: Mapping[str, Any]) -> bool:CODE
LOWopenmed/core/audit.py567def _sanitize_kanon_enforcement(value: Mapping[str, Any]) -> dict[str, Any]:CODE
LOWopenmed/core/audit.py1299 def export_review_bundle_json(self) -> str:CODE
LOWopenmed/core/export_naming.py86def _looks_like_raw_identifier(value: str) -> bool:CODE
LOWopenmed/core/export_naming.py117def _normalise_schema_version(value: object) -> str:CODE
LOWopenmed/core/export_naming.py178def _normalise_fingerprint_length(value: object) -> int:CODE
LOWopenmed/core/export_naming.py208def _normalise_explicit_timestamp(value: object) -> str | None:CODE
LOWopenmed/core/export_naming.py364def _snapshot_metadata_mapping(value: Mapping[str, Any]) -> dict[str, Any]:CODE
LOWopenmed/core/models.py51def _ensure_hf_auto_tokenizer() -> None:CODE
LOWopenmed/core/models.py700 def _resolve_attn_implementation(CODE
LOWopenmed/core/models.py713 def _apply_attention_pipeline_kwargs(self, pipeline_kwargs: Dict[str, Any]) -> None:CODE
LOWopenmed/core/models.py809 def _build_load_quantization_config(CODE
LOWopenmed/core/models.py841 def _build_pipeline_cache_key(CODE
LOWopenmed/core/surrogate_vault.py304def _validated_name_matching_metadata(CODE
LOWopenmed/core/surrogate_vault.py411 def set_name_matching_metadata(self, metadata: Mapping[str, Any]) -> None:CODE
LOWopenmed/core/surrogate_vault.py933 def transliteration_aware_name_matching(self) -> bool:CODE
LOWopenmed/core/surrogate_vault.py939 def indic_name_similarity_threshold(self) -> float:CODE
LOWopenmed/core/surrogate_vault.py1429 def _normalized_legacy_key_for_epoch(CODE
LOWopenmed/core/surrogate_vault.py1441 def _exact_indian_key_for_epoch(CODE
LOWopenmed/core/surrogate_vault.py1553 def _indic_candidate_leaks_source(CODE
LOWopenmed/core/baseline.py250def _validate_relation_golden(value: Any) -> None:CODE
LOWopenmed/core/model_cache_policy.py246def _validate_nonnegative_int(value: Any, *, name: str) -> int:CODE
LOWopenmed/core/model_cache_policy.py941 def _is_manifest_relative_path(self, relative: str) -> bool:CODE
11403 more matches not shown…
Unused Imports6072 hits · 4307 pts
SeverityFileLineSnippetContext
LOWpackaging/standalone_manifest.py18CODE
LOWopenmed/__init__.py3CODE
LOWopenmed/__init__.py11CODE
LOWopenmed/__init__.py14CODE
LOWopenmed/__init__.py14CODE
LOWopenmed/__init__.py14CODE
LOWopenmed/__init__.py14CODE
LOWopenmed/__init__.py15CODE
LOWopenmed/__init__.py16CODE
LOWopenmed/__init__.py16CODE
LOWopenmed/__init__.py16CODE
LOWopenmed/__init__.py21CODE
LOWopenmed/__init__.py21CODE
LOWopenmed/__init__.py21CODE
LOWopenmed/__init__.py26CODE
LOWopenmed/__init__.py26CODE
LOWopenmed/__init__.py26CODE
LOWopenmed/__init__.py26CODE
LOWopenmed/__init__.py26CODE
LOWopenmed/__init__.py34CODE
LOWopenmed/aio.py9CODE
LOWopenmed/aio.py30CODE
LOWopenmed/aio.py32CODE
LOWopenmed/aio.py35CODE
LOWopenmed/traces/audit.py10CODE
LOWopenmed/traces/discovery.py8CODE
LOWopenmed/traces/transaction.py10CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py3CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py12CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
LOWopenmed/traces/__init__.py29CODE
6012 more matches not shown…
Decorative Section Separators823 hits · 2944 pts
SeverityFileLineSnippetContext
MEDIUMopenmed/core/labels.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/labels.py27# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/labels.py549# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/labels.py551# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/labels.py1376# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/labels.py1378# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/config.py806# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/config.py808# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/review_workflow.py567# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/review_workflow.py569# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_entity_merger.py72# ============================================================================COMMENT
MEDIUMopenmed/core/pii_entity_merger.py74# ============================================================================COMMENT
MEDIUMopenmed/core/pii_entity_merger.py540# ============================================================================COMMENT
MEDIUMopenmed/core/pii_entity_merger.py542# ============================================================================COMMENT
MEDIUMopenmed/core/pii_i18n.py487# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py489# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py4399# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py4401# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py11589# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py11591# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py61# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py204# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py206# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py407# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py409# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py786# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py788# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py3054# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py3056# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py3641# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py3643# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py3790# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py3792# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py4345# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py4347# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py4500# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py4502# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7489# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7491# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7692# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7694# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7717# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7719# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7781# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7783# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7843# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7845# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7907# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7909# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7971# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py7973# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py8044# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py8046# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py8108# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py8110# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py9378# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py9380# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py9708# ---------------------------------------------------------------------------COMMENT
MEDIUMopenmed/core/pii_i18n.py9710# ---------------------------------------------------------------------------COMMENT
763 more matches not shown…
Docstring Block Structure247 hits · 1235 pts
SeverityFileLineSnippetContext
HIGHopenmed/traces/transaction.py145Redact one local text file with an atomic in-place commit. Args: path: Existing regular file to replace. STRING
HIGHopenmed/traces/fidelity.py472Verify structural fidelity after a trace transformation. Args: original: The pre-redaction JSON-like trace.STRING
HIGHopenmed/traces/parallel.py348Partition trace paths into bounded shards without reordering them. Args: files: An iterable of local paths,STRING
HIGHopenmed/traces/tool_calls.py103Return a structure-preserving redaction of one tool-call payload. Args: tool_call: JSON-compatible tool-calSTRING
HIGHopenmed/traces/schemas/columnar.py70Redact configured text leaves in one Arrow record batch. ``text_columns`` contains top-level column names or dottedSTRING
HIGHopenmed/core/config.py560Create config from a named profile. Args: profile_name: Name of a built-in or custom profile. STRING
HIGHopenmed/core/config.py830Get the settings for a specific profile. Args: profile_name: Name of the profile. Returns: DicSTRING
HIGHopenmed/core/config.py880Delete a custom profile. Args: profile_name: Name of the profile to delete. Returns: True if dSTRING
HIGHopenmed/core/models.py175Load a TokenClassification model and tokenizer. Args: model_name: Name of the model to load. Can beSTRING
HIGHopenmed/core/config_provenance.py213Resolve configuration sources and produce value-free provenance. The deterministic precedence order is ``default < STRING
HIGHopenmed/core/locale_formats.py686Return date order and number separators for an OpenMed language code. Args: lang: OpenMed ISO 639-1 languagSTRING
HIGHopenmed/core/hf_hub.py127Resolve a registry alias or bare name to a fully-qualified Hub repo id. A value that already looks like a Hub id (cSTRING
HIGHopenmed/core/hf_hub.py171Pre-download an OpenMed model snapshot and return its local path. The friendly *name_or_alias* is resolved to a HubSTRING
HIGHopenmed/core/hf_hub.py706Return the OpenMed model repos present in the local Hugging Face cache. The scan is read-only and never touches theSTRING
HIGHopenmed/core/hf_hub.py768Return the current Hub snapshot size for one model in decimal MB. This is the only size helper that performs a netwSTRING
HIGHopenmed/core/hf_hub.py809Delete a single OpenMed repo from the local Hugging Face cache. Args: name: Registry key, repo id, or bare STRING
HIGHopenmed/core/local_identifiers.py130Return username entities found in absolute local paths. Args: text: Text containing logs, traces, or other STRING
HIGHopenmed/core/budget.py229Validate and return a :class:`RequestBudget` or ``None``. Accepts an existing :class:`RequestBudget`, ``None`` (unlSTRING
HIGHopenmed/core/review_workflow.py339Build a review queue from an extraction or de-identification result. Surfaces the spans a human should look at befoSTRING
HIGHopenmed/core/review_workflow.py455Capture a reviewer's decision about a review item as a feedback record. Args: item: The :class:`ReviewItem`STRING
HIGHopenmed/core/review_workflow.py543Append one feedback record to a local JSONL file. The file is created if it does not exist. Each call appends a sinSTRING
HIGHopenmed/core/telemetry.py90Parse an explicit telemetry opt-in value. Args: raw_value: Environment or configuration value. ``None``, anSTRING
HIGHopenmed/core/telemetry.py126Return the no-PHI subset of candidate stage attributes. String values are never accepted generically. Stage names mSTRING
HIGHopenmed/core/text_normalize.py85Translate a normalized half-open span to source offsets. Args: start: Inclusive normalized code-poiSTRING
HIGHopenmed/core/script_detect.py1669Decode untrusted multilingual bytes using an explicit codec allow-list. Codec names are normalized through a staticSTRING
HIGHopenmed/core/capabilities.py321Return an importless :class:`BackendStatus` for a single backend. Args: name: A registered capability key (STRING
HIGHopenmed/core/language_pack.py223Register and return a language pack. Args: pack: Fully validated language-pack declaration. STRING
HIGHopenmed/core/language_pack.py275Return the pack registered for ``code``. Args: code: Lowercase ISO 639-1 language code. ReSTRING
HIGHopenmed/core/path_portability.py243Audit local resource paths without reading the filesystem. Args: paths: An iterable of path strings or pathSTRING
HIGHopenmed/core/pii_i18n.py1682Return the ISO 7064 MOD 11-2 check character for a 17-digit body. Args: body: The first 17 digits of a ChinSTRING
HIGHopenmed/core/pii_i18n.py5015Return the ISO 7064 MOD 31-3 check character for a USCC body. Args: body17: Seventeen characters from :dataSTRING
HIGHopenmed/core/pii_i18n.py11622Return combined PII patterns for the given language. English patterns (email, URL, IP, etc.) are universal and alwaSTRING
HIGHopenmed/core/rtl_render.py252Render de-identified ``text`` with bidi-safe masks. For a right-to-left or mixed-script document, each replacement STRING
HIGHopenmed/core/rtl_render.py338Wrap a single mask/surrogate token in ``FSI ... PDI`` isolates. A convenience for callers that build redacted outpuSTRING
HIGHopenmed/core/rtl_render.py369Remove bidi isolate/embedding/override controls and directional marks. For source text without pre-existing bidi coSTRING
HIGHopenmed/core/pii.py1396Extract PII entities from text with intelligent entity merging. Uses token classification models to detect personalSTRING
HIGHopenmed/core/pii.py2635De-identify text by detecting and redacting PII with intelligent merging. Implements multiple de-identification strSTRING
HIGHopenmed/core/pii.py3656Re-identify text using stored mapping. Restores original PII from de-identified text using the mapping created STRING
HIGHopenmed/core/decoding/viterbi.py301Decode token-class indices via constrained BIOES Viterbi. Args: token_logprobs: One inner list of class logSTRING
HIGHopenmed/core/anonymizer/format_preserve.py159Render an Aadhaar value in UIDAI's masked ``XXXX XXXX NNNN`` form. The first eight digits are never returned. AlreaSTRING
HIGHopenmed/core/anonymizer/engine.py312Apply a dedicated Aadhaar anonymization strategy. Args: original: A checksum-valid Aadhaar value. STRING
HIGHopenmed/ner/indexing.py99Discover models located under ``models_dir`` and return a structured index. Args: models_dir: Root directorSTRING
HIGHopenmed/onnx/maple_export.py182Download the immutable BF16 Maple snapshot and bind it to a receipt. Args: destination: New or empty local STRING
HIGHopenmed/onnx/tensorrt_export.py331Build and optionally certify a TensorRT token-classification engine. INT8 builds consume the shared deterministic sSTRING
HIGHopenmed/onnx/tensorrt_export.py648Verify a serialized engine against a pinned SHA-256 digest. Args: engine_path: Serialized engine to hash. STRING
HIGHopenmed/onnx/tensorrt_session.py75Run one batch and return the engine's logits as a NumPy array. Args: input_ids: Rank-two token ID bSTRING
HIGHopenmed/processing/zh_normalize.py585Parse an everyday or financial-form Chinese numeral as an integer. Digit-only forms such as ``二〇二四`` are read positSTRING
HIGHopenmed/processing/zh_segmentation.py238Create a Chinese segmenter without importing unselected backends. Args: backend: One of ``"jieba"``, ``"pkuSTRING
HIGHopenmed/processing/zh_segmentation.py299Load a jieba-format medical dictionary through bounded validation. Args: path: Plain UTF-8 dictionary or siSTRING
HIGHopenmed/processing/zh_segmentation.py464Run the shared exact-offset conformance suite against one backend. Every case is checked independently so a report STRING
HIGHopenmed/processing/text.py49Return bounded UTF-8 text safe to pass to PII normalization. The check runs before normalization allocates offset mSTRING
HIGHopenmed/processing/text.py1240Drop records fully contained by boilerplate/copy-forward annotations. Suppression is opt-in and conservative. RecorSTRING
HIGHopenmed/processing/zh_pinyin.py128Romanize Chinese text after word segmentation. Args: text: Source text to romanize. style: ``NORMALSTRING
HIGHopenmed/plugins/conformance.py197Require plugin components to pass the offline conformance kit. Args: components: A component, component iteSTRING
HIGHopenmed/plugins/quarantine.py214Evaluate injected plugin metadata without loading plugin code. Args: metadata: One metadata mapping or an iSTRING
HIGHopenmed/training/directid_quantization.py144Export and evaluate DirectID Tiny runtime artifacts locally. Args: candidate: Path-free candidate mapping eSTRING
HIGHopenmed/training/recipe.py695Return the immutable label, head, runtime, recipe, and tier contract. Args: family: Canonical clinical famiSTRING
HIGHopenmed/training/recipe.py714Hash the base recipe together with a family's label/head contract. Args: family: Canonical clinical family STRING
HIGHopenmed/training/recipe.py758Build release artifacts only from a completed, signed external run. This function never trains a model, reads corpuSTRING
HIGHopenmed/training/directid_distill.py224Execute a local DirectID Mode-A backend and emit hash-only evidence. Args: dataset_evidence: Aggregate evidSTRING
187 more matches not shown…
Fake / Example Data667 hits · 764 pts
SeverityFileLineSnippetContext
LOWREADME.hi.md451[('NAME', 'John Doe'), ('DATE', '01/15/1970'), ('SSN', '123-45-6789')]CODE
LOWCHANGELOG.md2275- **`method="replace"` outputs no longer come from the prior hardcoded list** (`["Jane Smith", "John Doe", "Alex JohnsonCODE
LOWCHANGELOG.md2524 - Expanded locale fake-data dictionaries with `FIRST_NAME`, `LAST_NAME`, and `ZIPCODE` values across supported languagCODE
LOWREADME.md458[('NAME', 'John Doe'), ('DATE', '01/15/1970'), ('SSN', '123-45-6789')]CODE
LOWREADME.zh-CN.md451[('NAME', 'John Doe'), ('DATE', '01/15/1970'), ('SSN', '123-45-6789')]CODE
LOWopenmed/core/secrets.py283 "placeholder",CODE
LOWopenmed/core/pii_i18n.py10611 "NAME": ["Jane Smith", "John Doe", "Alex Johnson", "Sam Taylor"],CODE
LOWopenmed/core/pii_i18n.py10614 "EMAIL": ["patient@example.com", "contact@example.org"],CODE
LOWopenmed/core/pii_i18n.py10615 "PHONE": ["555-0123", "555-0456", "555-0789"],CODE
LOWopenmed/core/pii_i18n.py10617 "STREET_ADDRESS": ["123 Main St", "456 Oak Ave"],CODE
LOWopenmed/core/pii_i18n.py10599 "EMAIL": ["pasiënt@example.co.za", "kontak@example.org"],CODE
LOWopenmed/core/pii_i18n.py10739 "EMAIL": ["patient@example.in", "sampark@example.org"],CODE
LOWopenmed/core/pii_i18n.py10776 "EMAIL": ["patient@example.in", "sampark@example.org"],CODE
LOWopenmed/core/pii_i18n.py10803 "EMAIL": ["takami@example.et", "contact@example.org"],CODE
LOWopenmed/core/pii_i18n.py10833 "EMAIL": ["patient@example.eg", "contact@example.org"],CODE
LOWopenmed/core/pii_i18n.py10870 "EMAIL": ["patient@example.pk", "contact@example.org"],CODE
LOWopenmed/core/pii_i18n.py10909 "EMAIL": ["patient@example.co.il", "contact@example.org"],CODE
LOWopenmed/core/pii_i18n.py10946 "EMAIL": ["patient@example.jp", "renraku@example.org"],CODE
LOWopenmed/core/pii_i18n.py11023 "EMAIL": ["pasyente@example.ph", "kontak@example.org"],CODE
LOWopenmed/core/pii_i18n.py11071 "EMAIL": ["isiguli@example.co.za", "xhumana@example.org"],CODE
LOWopenmed/core/pii_i18n.py11091 "EMAIL": ["isigulane@example.co.za", "qhagamshelana@example.org"],CODE
LOWopenmed/core/pii_i18n.py11106 "EMAIL": ["patient@example.se", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11121 "EMAIL": ["patient@example.dk", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11136 "EMAIL": ["pasient@example.no", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11156 "EMAIL": ["benhnhan@example.vn", "lienhe@example.org"],CODE
LOWopenmed/core/pii_i18n.py11179 "EMAIL": ["patient@example.th", "contact@example.org"],CODE
LOWopenmed/core/pii_i18n.py11197 "EMAIL": ["pacients@example.lv", "kontakts@example.org"],CODE
LOWopenmed/core/pii_i18n.py11217 "EMAIL": ["pacient@example.sk", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11283 "EMAIL": ["pacient@example.ru", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11298 "EMAIL": ["potilas@example.fi", "yhteys@example.org"],CODE
LOWopenmed/core/pii_i18n.py11313 "EMAIL": ["patsient@example.bg", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11328 "EMAIL": ["pacijent@example.hr", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11343 "EMAIL": ["pacijent@example.rs", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11358 "EMAIL": ["beteg@example.hu", "kapcsolat@example.org"],CODE
LOWopenmed/core/pii_i18n.py11373 "EMAIL": ["patsient@example.ee", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11388 "EMAIL": ["patsiient@example.ua", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11403 "EMAIL": ["pacient@example.cz", "kontakt@example.org"],CODE
LOWopenmed/core/pii_i18n.py11423 "EMAIL": ["asthenis@example.gr", "epikoinonia@example.org"],CODE
LOWopenmed/core/pii_i18n.py11443 "EMAIL": ["majiyyaci@example.ng", "tuntuɓa@example.org"],CODE
LOWopenmed/core/pii_i18n.py11463 "EMAIL": ["onyeoria@example.ng", "uloogwu@example.org"],CODE
LOWopenmed/core/pii_i18n.py11483 "EMAIL": ["alaisan@example.ng", "iwosan@example.org"],CODE
LOWopenmed/core/pii_i18n.py11498 "EMAIL": ["patient@example.cn", "contact@example.org"],CODE
LOWopenmed/core/pii.py3125# Canonical labels that don't have a fake-data key fall through to theCOMMENT
LOWopenmed/core/pii.py3179 fake_data = LANGUAGE_FAKE_DATA.get(lang, LANGUAGE_FAKE_DATA["en"])CODE
LOWopenmed/core/pii.py3182 if key in fake_data:CODE
LOWopenmed/core/pii.py3183 return random.choice(fake_data[key])CODE
LOWopenmed/core/pii.py18 ... {"[NAME]": "Casey Example", "[PHONE]": "555-0100"},STRING
LOWopenmed/core/anonymizer/format_preserve.py106def preserve_email_pattern(original: str, fake_email: str) -> str:CODE
LOWopenmed/core/anonymizer/format_preserve.py107 """Use ``fake_email``'s local part with ``original``'s domain.STRING
LOWopenmed/core/anonymizer/format_preserve.py111 the local part. Falls back to ``fake_email`` verbatim if either sideSTRING
LOWopenmed/core/anonymizer/format_preserve.py114 if "@" not in original or "@" not in fake_email:CODE
LOWopenmed/core/anonymizer/format_preserve.py115 return fake_emailCODE
LOWopenmed/core/anonymizer/format_preserve.py116 fake_local = fake_email.split("@", 1)[0]CODE
LOWopenmed/core/anonymizer/engine.py73 consistency (so "John Doe" appearing twice gets one surrogate).STRING
LOWopenmed/processing/display.py361 >>> "PERSON" in html and "John Doe" in htmlSTRING
LOWopenmed/interop/retrieval/redacted_index.py55 "placeholder": self.placeholder,CODE
LOWopenmed/interop/retrieval/redacted_index.py67 "placeholder",CODE
LOWopenmed/interop/retrieval/redacted_index.py75 placeholder=str(payload["placeholder"]),CODE
LOWopenmed/eval/determinism.py257 "casey.example@example.org",CODE
LOWopenmed/mlx/inference.py195 "word": "John Doe", "start": 8, "end": 16}, ...]STRING
607 more matches not shown…
Modern Structural Boilerplate726 hits · 726 pts
SeverityFileLineSnippetContext
LOWpackaging/standalone_manifest.py892__all__ = [CODE
LOWopenmed/__init__.py260logger = logging.getLogger(__name__)CODE
LOWopenmed/__init__.py853__all__ = [CODE
LOWopenmed/aio.py310__all__ = ["aextract_pii", "adeidentify", "aanalyze_text", "abatch"]CODE
LOWopenmed/traces/audit.py1080__all__ = [CODE
LOWopenmed/traces/discovery.py374__all__ = [CODE
LOWopenmed/traces/transaction.py29__all__ = [CODE
LOWopenmed/traces/__init__.py72__all__ = [CODE
LOWopenmed/traces/jsonl.py51__all__ = [CODE
LOWopenmed/traces/jsonl.py463def _set_path(record: dict[str, Any], path: JsonPath, value: str) -> None:CODE
LOWopenmed/traces/fidelity.py1139__all__ = [CODE
LOWopenmed/traces/streaming.py1106__all__ = [CODE
LOWopenmed/traces/parallel.py689__all__ = [CODE
LOWopenmed/traces/tool_calls.py543__all__ = [CODE
LOWopenmed/traces/schemas/preference.py1002__all__ = [CODE
LOWopenmed/traces/schemas/columnar.py23__all__ = [CODE
LOWopenmed/traces/schemas/registry.py1026__all__ = [CODE
LOWopenmed/traces/schemas/__init__.py21__all__ = [CODE
LOWopenmed/traces/schemas/chat.py965__all__ = [CODE
LOWopenmed/core/safety_sweep.py271__all__ = [CODE
LOWopenmed/core/repro_hash.py589__all__ = [CODE
LOWopenmed/core/document_stream.py38__all__ = [CODE
LOWopenmed/core/labels.py2100__all__ = [CODE
LOWopenmed/core/quality_gates.py23logger = logging.getLogger(__name__)CODE
LOWopenmed/core/quality_gates.py189def _set_span_valid(entity: Any, valid: bool) -> None:CODE
LOWopenmed/core/config.py688def set_config(config: OpenMedConfig) -> None:CODE
LOWopenmed/core/audit.py1355__all__ = [CODE
LOWopenmed/core/export_naming.py573__all__ = [CODE
LOWopenmed/core/lang_id_codemix.py357__all__ = [CODE
LOWopenmed/core/models.py12logger = logging.getLogger(__name__)CODE
LOWopenmed/core/config_provenance.py535__all__ = [CODE
LOWopenmed/core/surrogate_vault.py391 def set_epoch_manager(self, epoch_manager: _EpochManager) -> None:CODE
LOWopenmed/core/surrogate_vault.py411 def set_name_matching_metadata(self, metadata: Mapping[str, Any]) -> None:CODE
LOWopenmed/core/surrogate_vault.py1881__all__ = [CODE
LOWopenmed/core/baseline.py320__all__ = [CODE
LOWopenmed/core/model_cache_policy.py31logger = logging.getLogger(__name__)CODE
LOWopenmed/core/model_cache_policy.py1045__all__ = [CODE
LOWopenmed/core/manifest.py594__all__ = [CODE
LOWopenmed/core/thresholds.py580__all__ = [CODE
LOWopenmed/core/locale_formats.py960__all__ = [CODE
LOWopenmed/core/date_shift.py92__all__ = [CODE
LOWopenmed/core/hf_hub.py38__all__ = [CODE
LOWopenmed/core/hf_hub.py649 def update_transfer(self, byte_count: int | float | None = 1) -> None:CODE
LOWopenmed/core/hf_hub.py668 def set_description(self, *args: Any, **kwargs: Any) -> None:CODE
LOWopenmed/core/hf_hub.py671 def set_postfix_str(self, *args: Any, **kwargs: Any) -> None:CODE
LOWopenmed/core/hf_hub.py674 def set_transfer_postfix_str(self, *args: Any, **kwargs: Any) -> None:CODE
LOWopenmed/core/local_identifiers.py200__all__ = [CODE
LOWopenmed/core/budget.py51__all__ = [CODE
LOWopenmed/core/review_workflow.py69__all__ = [CODE
LOWopenmed/core/language_pack_catalog.py675__all__ = [CODE
LOWopenmed/core/language_pack_coherence.py326__all__ = [CODE
LOWopenmed/core/arbitration.py491__all__ = [CODE
LOWopenmed/core/policy.py961__all__ = [CODE
LOWopenmed/core/__init__.py161__all__ = [CODE
LOWopenmed/core/telemetry.py232 def _set_attributes(self, attributes: Mapping[str, Any]) -> None:CODE
LOWopenmed/core/telemetry.py238 def set_span_count(self, count: int) -> None:CODE
LOWopenmed/core/telemetry.py243 def set_entity_count(self, count: int) -> None:CODE
LOWopenmed/core/telemetry.py248 def set_labels(self, labels: Sequence[str]) -> None:CODE
LOWopenmed/core/telemetry.py252 def set_input_length(self, length: int) -> None:CODE
LOWopenmed/core/telemetry.py262 def set_redacted_length(self, length: int) -> None:CODE
666 more matches not shown…
Excessive Try-Catch Wrapping558 hits · 586 pts
SeverityFileLineSnippetContext
LOWopenmed/__init__.py565 except Exception:CODE
LOWopenmed/__init__.py570 except Exception:CODE
LOWopenmed/__init__.py802 except Exception as exc: # pragma: no coverCODE
LOWopenmed/aio.py264 except Exception:CODE
LOWopenmed/traces/audit.py62 except Exception: # noqa: BLE001 - untrusted metadata must fail closedCODE
LOWopenmed/traces/audit.py69 except Exception: # noqa: BLE001 - untrusted metadata must fail closedCODE
LOWopenmed/traces/audit.py119 except Exception: # noqa: BLE001 - input may expose PHI in errorsCODE
LOWopenmed/traces/audit.py126 except Exception: # noqa: BLE001 - input may expose PHI in errorsCODE
LOWopenmed/traces/audit.py141 except Exception: # noqa: BLE001 - mapping errors may contain PHICODE
LOWopenmed/traces/audit.py171 except Exception: # noqa: BLE001 - untrusted metadata must fail closedCODE
LOWopenmed/traces/audit.py507 except Exception: # noqa: BLE001 - report inputs may contain PHICODE
MEDIUMopenmed/traces/audit.py493def __post_init__(self) -> None:CODE
LOWopenmed/traces/transaction.py330 except Exception: # noqa: BLE001 - path-like errors may contain PHICODE
LOWopenmed/traces/transaction.py341 except Exception: # noqa: BLE001 - callback text may contain PHICODE
LOWopenmed/traces/jsonl.py300 except Exception: # noqa: BLE001 - path errors may contain PHICODE
LOWopenmed/traces/jsonl.py318 except Exception: # noqa: BLE001 - I/O errors may contain PHI pathsCODE
LOWopenmed/traces/jsonl.py331 except Exception: # noqa: BLE001 - stream errors may contain PHICODE
LOWopenmed/traces/jsonl.py480 except Exception:CODE
LOWopenmed/traces/jsonl.py558 except Exception: # noqa: BLE001 - path errors may contain PHICODE
LOWopenmed/traces/jsonl.py575 except Exception: # noqa: BLE001 - path errors may contain PHICODE
LOWopenmed/traces/jsonl.py592 except Exception: # noqa: BLE001 - path errors may contain PHICODE
LOWopenmed/traces/jsonl.py607 except Exception: # noqa: BLE001 - stream errors may contain PHICODE
LOWopenmed/traces/jsonl.py614 except Exception: # noqa: BLE001 - stream errors may contain PHICODE
LOWopenmed/traces/fidelity.py250 except Exception: # noqa: BLE001 - report inputs may contain PHICODE
LOWopenmed/traces/fidelity.py524 except Exception: # noqa: BLE001 - trace errors may contain sensitive valuesCODE
LOWopenmed/traces/fidelity.py810 except Exception: # noqa: BLE001 - configuration may contain PHICODE
LOWopenmed/traces/fidelity.py833 except Exception: # noqa: BLE001 - configuration may contain PHICODE
LOWopenmed/traces/fidelity.py848 except Exception: # noqa: BLE001 - configuration may contain PHICODE
LOWopenmed/traces/fidelity.py855 except Exception: # noqa: BLE001 - configuration may contain PHICODE
LOWopenmed/traces/fidelity.py1025 except Exception:CODE
LOWopenmed/traces/fidelity.py1036 except Exception:CODE
LOWopenmed/traces/fidelity.py1047 except Exception:CODE
LOWopenmed/traces/fidelity.py1103 except Exception: # noqa: BLE001 - direct report input may contain PHICODE
LOWopenmed/traces/fidelity.py1121 except Exception: # noqa: BLE001 - trace metadata may contain PHICODE
MEDIUMopenmed/traces/fidelity.py238def __post_init__(self) -> None:CODE
LOWopenmed/traces/streaming.py477 except Exception:CODE
LOWopenmed/traces/streaming.py487 except Exception:CODE
LOWopenmed/traces/streaming.py494 except Exception:CODE
LOWopenmed/traces/streaming.py832 except Exception:CODE
LOWopenmed/traces/streaming.py838 except Exception:CODE
LOWopenmed/traces/streaming.py846 except Exception:CODE
LOWopenmed/traces/streaming.py854 except Exception:CODE
LOWopenmed/traces/streaming.py577 except Exception:CODE
LOWopenmed/traces/streaming.py600 except Exception:CODE
LOWopenmed/traces/streaming.py623 except Exception:CODE
LOWopenmed/traces/streaming.py635 except Exception:CODE
LOWopenmed/traces/streaming.py662 except Exception:CODE
LOWopenmed/traces/streaming.py774 except Exception:CODE
LOWopenmed/traces/parallel.py102 except Exception:CODE
LOWopenmed/traces/parallel.py110 except Exception: # pragma: no cover - hostile exception metaclassCODE
LOWopenmed/traces/parallel.py126 except Exception:CODE
LOWopenmed/traces/parallel.py154 except Exception:CODE
LOWopenmed/traces/parallel.py368 except Exception:CODE
LOWopenmed/traces/parallel.py376 except Exception:CODE
LOWopenmed/traces/parallel.py400 except Exception:CODE
LOWopenmed/traces/parallel.py412 except Exception:CODE
LOWopenmed/traces/parallel.py428 except Exception as exc:CODE
LOWopenmed/traces/parallel.py492 except Exception:CODE
LOWopenmed/traces/parallel.py506 except Exception:CODE
LOWopenmed/traces/parallel.py513 except Exception:CODE
498 more matches not shown…
Deep Nesting480 hits · 452 pts
SeverityFileLineSnippetContext
LOWopenmed/__init__.py272CODE
LOWopenmed/__init__.py399CODE
LOWopenmed/__init__.py711CODE
LOWopenmed/traces/audit.py682CODE
LOWopenmed/traces/audit.py983CODE
LOWopenmed/traces/discovery.py290CODE
LOWopenmed/traces/discovery.py335CODE
LOWopenmed/traces/jsonl.py413CODE
LOWopenmed/traces/jsonl.py550CODE
LOWopenmed/traces/fidelity.py800CODE
LOWopenmed/traces/fidelity.py1077CODE
LOWopenmed/traces/streaming.py1059CODE
LOWopenmed/traces/streaming.py462CODE
LOWopenmed/traces/parallel.py478CODE
LOWopenmed/traces/parallel.py559CODE
LOWopenmed/traces/tool_calls.py237CODE
LOWopenmed/traces/tool_calls.py480CODE
LOWopenmed/traces/schemas/preference.py437CODE
LOWopenmed/traces/schemas/preference.py588CODE
LOWopenmed/traces/schemas/columnar.py248CODE
LOWopenmed/traces/schemas/registry.py137CODE
LOWopenmed/traces/schemas/registry.py157CODE
LOWopenmed/traces/schemas/chat.py213CODE
LOWopenmed/core/result_cache.py60CODE
LOWopenmed/core/document_stream.py433CODE
LOWopenmed/core/config.py559CODE
LOWopenmed/core/audit.py208CODE
LOWopenmed/core/audit.py647CODE
LOWopenmed/core/export_naming.py433CODE
LOWopenmed/core/surrogate_vault.py1107CODE
LOWopenmed/core/model_cache_policy.py279CODE
LOWopenmed/core/model_cache_policy.py583CODE
LOWopenmed/core/model_cache_policy.py717CODE
LOWopenmed/core/policy.py571CODE
LOWopenmed/core/model_integrity.py327CODE
LOWopenmed/core/text_normalize.py155CODE
LOWopenmed/core/pii_entity_merger.py602CODE
LOWopenmed/core/pii_entity_merger.py716CODE
LOWopenmed/core/pii_entity_merger.py780CODE
LOWopenmed/core/custom_recognizer.py819CODE
LOWopenmed/core/script_detect.py797CODE
LOWopenmed/core/script_detect.py857CODE
LOWopenmed/core/registry_service.py98CODE
LOWopenmed/core/registry_service.py471CODE
LOWopenmed/core/registry_service.py513CODE
LOWopenmed/core/policy_lint.py252CODE
LOWopenmed/core/attestation.py491CODE
LOWopenmed/core/hf_publish.py167CODE
LOWopenmed/core/africa_context.py139CODE
LOWopenmed/core/indic_name_match.py331CODE
LOWopenmed/core/indic_name_match.py423CODE
LOWopenmed/core/indic_name_match.py563CODE
LOWopenmed/core/pii_i18n.py2298CODE
LOWopenmed/core/pii_i18n.py2806CODE
LOWopenmed/core/manifest_schema.py228CODE
LOWopenmed/core/manifest_schema.py550CODE
LOWopenmed/core/manifest_schema.py925CODE
LOWopenmed/core/pii.py479CODE
LOWopenmed/core/pii.py2431CODE
LOWopenmed/core/pii.py2890CODE
420 more matches not shown…
Cross-File Repetition32 hits · 160 pts
SeverityFileLineSnippetContext
HIGHopenmed/traces/transaction.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/traces/fidelity.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/traces/parallel.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/traces/schemas/preference.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/traces/schemas/columnar.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/traces/schemas/registry.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/traces/schemas/chat.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHscripts/skills/build_packs.py0copy a string into a base ``str`` without calling subclass hooks.STRING
HIGHopenmed/processing/advanced_ner.py0return the character-offset identity for this span.STRING
HIGHopenmed/clinical/decision_support.py0return the character-offset identity for this span.STRING
HIGHopenmed/clinical/relations/candidate.py0return the character-offset identity for this span.STRING
HIGHopenmed/interop/elasticsearch.py0internal marker for a rejected untrusted input boundary.STRING
HIGHopenmed/interop/opensearch.py0internal marker for a rejected untrusted input boundary.STRING
HIGHopenmed/interop/beam.py0internal marker for a rejected untrusted input boundary.STRING
HIGHopenmed/interop/llamaindex.py0runtime options forwarded to openmed's de-identification engine.STRING
HIGHopenmed/interop/langchain.py0runtime options forwarded to openmed's de-identification engine.STRING
HIGHopenmed/interop/duckdb_udf.py0runtime options forwarded to openmed's de-identification engine.STRING
HIGHopenmed/interop/llamaindex.py0return keyword arguments for ``openmed.core.pii.deidentify``.STRING
HIGHopenmed/interop/langchain.py0return keyword arguments for ``openmed.core.pii.deidentify``.STRING
HIGHopenmed/interop/duckdb_udf.py0return keyword arguments for ``openmed.core.pii.deidentify``.STRING
HIGHopenmed/clinical/grounding/loaders/rxnorm_loader.py0alias for :meth:`resolve`, matching the shared matcher vocabulary.STRING
HIGHopenmed/clinical/grounding/loaders/loinc_loader.py0alias for :meth:`resolve`, matching the shared matcher vocabulary.STRING
HIGHopenmed/clinical/grounding/loaders/icd10cm_loader.py0alias for :meth:`resolve`, matching the shared matcher vocabulary.STRING
HIGHopenmed/clinical/grounding/loaders/rxnorm_loader.py0return the best match for ``query`` or ``none`` when unresolved.STRING
HIGHopenmed/clinical/grounding/loaders/loinc_loader.py0return the best match for ``query`` or ``none`` when unresolved.STRING
HIGHopenmed/clinical/grounding/loaders/icd10cm_loader.py0return the best match for ``query`` or ``none`` when unresolved.STRING
HIGHopenmed/eval/utility.py0return a json-serializable report dictionary with stable keys.STRING
HIGHopenmed/eval/error_analysis.py0return a json-serializable report dictionary with stable keys.STRING
HIGHopenmed/eval/report.py0return a json-serializable report dictionary with stable keys.STRING
HIGHopenmed/eval/datasets/pharmaconer.py0load deft records from an explicit local path. openmed does not bundle deft corpus text. pass a local path to data you aSTRING
HIGHopenmed/eval/datasets/cantemist.py0load deft records from an explicit local path. openmed does not bundle deft corpus text. pass a local path to data you aSTRING
HIGHopenmed/eval/datasets/deft.py0load deft records from an explicit local path. openmed does not bundle deft corpus text. pass a local path to data you aSTRING
AI Structural Patterns167 hits · 150 pts
SeverityFileLineSnippetContext
LOWopenmed/__init__.py399CODE
LOWopenmed/aio.py60CODE
LOWopenmed/aio.py111CODE
LOWopenmed/aio.py186CODE
LOWopenmed/traces/audit.py983CODE
LOWopenmed/traces/transaction.py131CODE
LOWopenmed/traces/streaming.py672CODE
LOWopenmed/traces/streaming.py722CODE
LOWopenmed/traces/streaming.py778CODE
LOWopenmed/traces/streaming.py376CODE
LOWopenmed/traces/schemas/preference.py437CODE
LOWopenmed/core/document_stream.py367CODE
LOWopenmed/core/export_naming.py433CODE
LOWopenmed/core/config_provenance.py201CODE
LOWopenmed/core/manifest.py136CODE
LOWopenmed/core/hf_hub.py159CODE
LOWopenmed/core/arbitration.py222CODE
LOWopenmed/core/pipeline.py256CODE
LOWopenmed/core/pipeline.py388CODE
LOWopenmed/core/model_search.py53CODE
LOWopenmed/core/hf_publish.py226CODE
LOWopenmed/core/streaming.py56CODE
LOWopenmed/core/pii.py1155CODE
LOWopenmed/core/pii.py1372CODE
LOWopenmed/core/pii.py2122CODE
LOWopenmed/core/pii.py2431CODE
LOWopenmed/core/pii.py2599CODE
LOWopenmed/core/cascade.py54CODE
LOWopenmed/core/anonymizer/engine.py109CODE
LOWopenmed/ner/infer.py118CODE
LOWopenmed/onnx/maple_bundle.py75CODE
LOWopenmed/onnx/maple_bundle.py135CODE
LOWopenmed/onnx/convert.py338CODE
LOWopenmed/onnx/convert.py827CODE
LOWopenmed/onnx/tensorrt_export.py306CODE
LOWopenmed/onnx/gguf_int4_export.py273CODE
LOWopenmed/onnx/transformersjs.py74CODE
LOWopenmed/processing/object_storage.py92CODE
LOWopenmed/processing/resume.py298CODE
LOWopenmed/processing/batch.py1746CODE
LOWopenmed/processing/batch.py812CODE
LOWopenmed/processing/batch.py981CODE
LOWopenmed/processing/batch.py1025CODE
LOWopenmed/processing/batch.py1093CODE
LOWopenmed/processing/batch.py1307CODE
LOWopenmed/processing/kafka_connector.py92CODE
LOWopenmed/training/distill.py356CODE
LOWopenmed/training/distill.py609CODE
LOWopenmed/training/synthetic/translation_augment.py190CODE
LOWopenmed/interop/elasticsearch.py131CODE
LOWopenmed/interop/elasticsearch.py359CODE
LOWopenmed/interop/airflow.py134CODE
LOWopenmed/interop/airflow.py556CODE
LOWopenmed/interop/graph_orchestration.py40CODE
LOWopenmed/interop/tools.py494CODE
LOWopenmed/interop/tools.py551CODE
LOWopenmed/interop/postgres.py315CODE
LOWopenmed/interop/postgres.py149CODE
LOWopenmed/interop/spark.py124CODE
LOWopenmed/interop/beam.py947CODE
107 more matches not shown…
Cross-Language Confusion17 hits · 78 pts
SeverityFileLineSnippetContext
HIGHopenmed/interop/elasticsearch.py432 Missing, null, and empty selected fields are counted as skipped. ASTRING
HIGHopenmed/interop/llamaindex.py419 "null, mappings, lists, or tuples when redact_metadata=True"CODE
HIGHopenmed/integrations/dataflow_tool_processor.py115 detected-entity counts. Missing, null, empty, and non-string configuredSTRING
HIGHopenmed/structured/synth.py355 "DP synthesis supports only null, boolean, finite numeric, and string cells"CODE
HIGHopenmed/structured/table_io.py289 "CSV/TSV release output supports scalar values only: null, boolean, "CODE
HIGHopenmed/eval/leaderboard.py319 " const matches = !query || normalize(row.dataset.search).includes(query);\n"CODE
HIGHopenmed/eval/leaderboard.py335 " if (query && matchCount > 0 && selected) {\n"CODE
HIGHopenmed/eval/quant_delta.py412 """Return KL(reference || candidate) over fixed-seed token frequencies."""STRING
HIGHopenmed/eval/provenance_ledger.py713 f"{path} must be numeric, boolean, null, nested metadata, or a sha256 digest"CODE
HIGHopenmed/risk/release.py2125 "Missing, null, and empty quasi-identifier states are treated as "CODE
HIGHtests/unit/test_publish_workflow_version.py143 "group": "publish-openmed-${{ inputs.tag || github.ref_name }}",CODE
HIGHtests/unit/test_publish_workflow_version.py198 assert npm_verify["steps"][0]["with"]["ref"] == ("${{ inputs.tag || github.ref }}")CODE
HIGHtests/unit/test_publish_workflow_version.py228 assert npm_publish["steps"][0]["with"]["ref"] == ("${{ inputs.tag || github.ref }}")CODE
HIGHtests/unit/traces/schemas/test_columnar.py128 assert first.equals(second)CODE
HIGHtests/unit/traces/schemas/test_columnar.py207 assert adapted.schema.equals(batch.schema, check_metadata=True)CODE
HIGHtests/unit/release/test_provenance_workflow.py93 assert provenance["with"]["release-tag"] == ("${{ inputs.tag || github.ref_name }}")CODE
HIGHskills/build_catalog.py194 "git clone https://github.com/maziyarpanahi/openmed && cd openmed\n"CODE
Modern AI Meta-Vocabulary17 hits · 51 pts
SeverityFileLineSnippetContext
MEDIUMCHANGELOG.md1493- [#1885](https://github.com/maziyarpanahi/openmed/pull/1885) feat: add procedures zero-shot domain and DEVICE canonicalCODE
MEDIUMCHANGELOG.md1544- [#1866](https://github.com/maziyarpanahi/openmed/pull/1866) docs: one-command multi-agent install and quickstart for tCODE
MEDIUMCHANGELOG.md1549 - `7d592dd86b3f` Merge pull request #1866 from maziyarpanahi/feature/skills-multi-agent-readmeCODE
MEDIUMopenmed/core/review_workflow.py384 # Collect every span up front so a context window can mask *other* nearbyCOMMENT
MEDIUMopenmed/core/pii_entity_merger.py580 # Extract context windowCOMMENT
MEDIUMopenmed/mcp/server.py517 # length/size/encoding guardrails as the library and REST entry points.COMMENT
MEDIUMopenmed/cli/typer_app.py349 # zero-shot (GLiNER/GLiNER2)COMMENT
MEDIUMopenmed/clinical/relations_lite.py92# keep the scaffold compatible with those model outputs without broadeningCOMMENT
MEDIUMopenmed/clinical/validation/protocol.py27#: validation scaffold measures de-identification quality against user-suppliedCOMMENT
MEDIUMopenmed/clinical/validation/protocol.py77#: Default acceptance thresholds. These are conservative scaffold defaults; aCOMMENT
MEDIUMopenmed/service/schemas.py51 # guardrails. Errors never echo the (possibly PHI) text.COMMENT
MEDIUMtests/run-tests.sh13# Core test suite without slow markers (collect coverage for zero-shot modules)COMMENT
MEDIUMtests/unit/ner/__init__.py1# Unit tests for the zero-shot NER toolkit.COMMENT
MEDIUMtests/unit/cli/test_false_negative_explorer_cli.py165 # Span text and a surrounding-context window are surfaced from the fixture.COMMENT
MEDIUMdocs/cli/openmed-init.md1# Project scaffolding with `openmed init`COMMENT
MEDIUMskills/building-gold-corpus/SKILL.md54## Quick start — scaffold the projectCOMMENT
MEDIUMskills/running-zeroshot-ner/SKILL.md56# 2) Run zero-shot NER with your OWN labels (comma-separated)COMMENT
AI Slop Vocabulary11 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMgates/target_leakage.yaml3# Signed floors keyed by (family, tier, format). The ReleaseGate harnessCOMMENT
MEDIUMopenmed/eval/determinism.py55# Public API entrypoints exercised by the harness.COMMENT
MEDIUMopenmed/eval/__init__.py927 # Determinism regression harness (OM-822).COMMENT
MEDIUMopenmed/eval/suites/multimodal_dicom.py72#: Device tier reported for pixel-space (image) PHI in the harness slices.COMMENT
LOWtests/unit/core/test_anonymizer.py202 # If the original isn't an email, just return the fake.COMMENT
MEDIUM…ts/unit/processing/test_zh_segmentation_conformance.py380# --- Layer A: the harness accepts a conforming backend ---------------------COMMENT
MEDIUMtests/unit/processing/test_zh_segmentation_docs.py951 # The superseded claim that these crash the harness must be gone.COMMENT
MEDIUMtests/unit/eval/test_multimodal_dicom_suite.py270 # Report renders to the harness's Markdown/JSON surfaces.COMMENT
MEDIUMtests/unit/eval/test_determinism_harness.py38# Keep the reference corpus well under the 60s CI budget: the harness is theCOMMENT
MEDIUMtests/unit/service/test_redaction_app.py99 # AnyIO starts TestClient's event loop. That is test-harness plumbing,COMMENT
MEDIUMtests/fuzz/fuzz_deidentify.py252if __name__ == "__main__": # pragma: no cover - exercised as a local harness.CODE
Over-Commented Block19 hits · 18 pts
SeverityFileLineSnippetContext
LOWinstall-skills.sh1#!/usr/bin/env bashCOMMENT
LOWCHANGELOG.md621 #1919, #1920, #1921, #1922, #1923, #1924, #1925, #1926, #1928, #1929,COMMENT
LOWopenmed/core/name_order.py41COMMENT
LOWopenmed/core/anonymizer/providers/clinical_ids.py3341 digit *= 2COMMENT
LOWopenmed/core/data/clinical_protect_terms.txt1# OpenMed clinical protection terms v1COMMENT
LOWopenmed/structured/hierarchies/functions.py481# --------------------------------------------------------------------------- #COMMENT
LOWopenmed/clinical/experiencer.py101 "neighbour",COMMENT
LOWopenmed/clinical/context.py121# Ported ConText temporal lexicon. Cues are matched case-insensitively and onCOMMENT
LOWopenmed/clinical/normalization/ranker.py41#: Reciprocal-rank-fusion damping constant. The documented default follows theCOMMENT
LOWopenmed/clinical/lexicons/context_cues.py461)COMMENT
LOWopenmed/clinical/data/context_rules.yaml1# OpenMed's starter ConText rule set.COMMENT
LOWjs/openmedkit-flutter/native/openmed_ffi.h1#ifndef OPENMED_FFI_HCOMMENT
LOWjs/openmedkit-flutter/native/openmed_ffi.c1#include "openmed_ffi.h"COMMENT
LOWdocs/profiling.md201COMMENT
LOWdocs/security/pip-audit-ignore.toml1# Time-boxed pip-audit ignores.COMMENT
LOWdocs/clinical/temporal-normalization.md21 spans,COMMENT
LOW…OpenMedKit/Tests/OpenMedKitTests/OpenMedMLXTests.swift321 // Nemotron-PII fine-tunes set ``classifier_bias: true`` so theCOMMENT
LOWswift/OpenMedKit/Sources/OpenMedKit/OpenMedKit.swift1#if canImport(MLX) && canImport(Tokenizers) && !os(watchOS) && !os(visionOS)COMMENT
LOWskills/exporting-bulk-fhir/SKILL.md41# 1) Kickoff (async). Ask for clinical-note-bearing resource types.COMMENT
Magic Placeholder Names2 hits · 12 pts
SeverityFileLineSnippetContext
HIGHtests/unit/core/test_secrets.py139 'OPENMED_API_KEY="your-api-key"; 'CODE
HIGHdocs/security/secret-detection.md45Explicit placeholders such as `<TOKEN>`, `your-api-key`, `replace-me`, andCODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWopenmed/core/models.py670 # Check if it's a registry keyCOMMENT
LOWopenmed/core/models.py675 # Check if it needs org prefixCOMMENT
LOWopenmed/processing/advanced_ner.py629 # Check if same entity type and close proximityCOMMENT
LOWopenmed/processing/advanced_ner.py685 # Check if we have token-level data (no aggregation_strategy used)COMMENT
LOWopenmed/processing/outputs.py353 # Check if entities are adjacent and same labelCOMMENT
Dead Code4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/traces/test_audit.py180CODE
MEDIUMtests/unit/traces/test_audit.py239CODE
MEDIUMtests/unit/traces/test_fidelity.py283CODE
MEDIUMtests/unit/interop/test_spark.py295CODE
Verbosity Indicators3 hits · 7 pts
SeverityFileLineSnippetContext
LOWopenmed/processing/advanced_ner.py683 # Step 1: Smart grouping if requested and we have token-level outputCOMMENT
LOWopenmed/processing/advanced_ner.py705 # Step 2: Advanced filteringCOMMENT
LOWopenmed/processing/advanced_ner.py708 # Step 3: Merge adjacent entities if enabledCOMMENT
Structural Annotation Overuse3 hits · 7 pts
SeverityFileLineSnippetContext
LOWopenmed/processing/advanced_ner.py683 # Step 1: Smart grouping if requested and we have token-level outputCOMMENT
LOWopenmed/processing/advanced_ner.py705 # Step 2: Advanced filteringCOMMENT
LOWopenmed/processing/advanced_ner.py708 # Step 3: Merge adjacent entities if enabledCOMMENT
Self-Referential Comments1 hit · 4 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/test_profiles.py148 # Create a custom profileCOMMENT
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_profiling.py282 def my_function():CODE
LOWtests/unit/skills/test_bundle_verify.py451 "utils.py": "def helper():\n pass\n",CODE
LOWtests/unit/skills/test_bundle_verify.py469 "utils.py": "def helper():\n pass\n",CODE
LOWtests/unit/service/test_rest_client.py41 def handle_request(self, request: httpx.Request) -> httpx.Response:CODE
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippetContext
MEDIUMopenmed/interop/icd11_api.py77 """Raised when the WHO ICD-API cannot provide a valid response."""STRING
MEDIUMskills/build_catalog.py39 r"written by (?:claude|codex|gpt)|as an ai language model)",CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWinstall-skills.sh10# Usage:COMMENT