From 08b368cb94a856a53bde9985db3c58d40a98da05 Mon Sep 17 00:00:00 2001 From: Chessing234 Date: Wed, 15 Apr 2026 22:18:05 +0530 Subject: [PATCH] Fix with_more_than_one_type_count counting concepts with exactly one type export_umls_json.py prints per-concept summary statistics. The aliases block pairs 'one alias' (== 1) with 'more than one alias' (> 1). The types block pairs 'one type' (== 1) with 'more than one type' (>= 1), so every concept with >= 1 type is counted under both with_one_type_count and with_more_than_one_type_count, inflating the 'more than one type' statistic by the count of single-type concepts. Change >= 1 to > 1 to match the aliases pattern and the variable's name. --- scripts/export_umls_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/export_umls_json.py b/scripts/export_umls_json.py index 7991a9e8..0bb08800 100644 --- a/scripts/export_umls_json.py +++ b/scripts/export_umls_json.py @@ -49,7 +49,7 @@ def main( with_more_than_one_alias_count += 1 if len(concept['aliases']) > 1 else 0 without_type_count += 1 if len(concept['types']) == 0 else 0 with_one_type_count += 1 if len(concept['types']) == 1 else 0 - with_more_than_one_type_count += 1 if len(concept['types']) >= 1 else 0 + with_more_than_one_type_count += 1 if len(concept['types']) > 1 else 0 without_definition_count += 1 if 'definition' not in concept else 0 with_definition_pref_source_count += 1 if concept.get('is_from_preferred_source') == 'Y' else 0 with_definition_other_sources_count += 1 if concept.get('is_from_preferred_source') == 'N' else 0