Removing names from a CDB concept


I’m trying to use cdb.remove_names to remove the name ‘hearing’ from the concept ‘hearing loss’ in my cdb. The help page says the names should be in the format: {'name': {'tokens': tokens, 'snames': snames, 'raw_name': raw_name}, ...}. Please could you advise on what this means?

I tried the following which didn’t work:
cdb.remove_names(cui=‘15188001’, names={‘hearing’: {}})


Have you tried any of the following:

Alternatively to remove more than one concept name:
cdb.cui2names['15188001'].difference_update({'hear', 'hearing'})

1 Like

The first option worked, thanks.

However, every time I run ‘supervised training’ the name is re-added to the CDB.

I’ve tried to unlink the concept (hearing loss) and name (hearing) using: cat.unlink_concept_name(‘15188001’,‘hearing’, False), but I’m still getting false positives

Can you check the labels in your annotation dataset (used for supervised training). The word “hearing” is labelled as the hearing loss snomed CT code.

If you don’t want to fix your labelled dataset. Train and then remove from the snames. Then run

Thanks, I’ve now found the erroneous label and removed it.

Glad your issue has been resolved!