# Removing names from a CDB concept

**URL:** <https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70>\
**Category:** MedCAT\
**Created:** [August 9, 2022, 4:33pm UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70 "2022-08-09T16:33:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoshi](https://avatars.discourse-cdn.com/v4/letter/y/aeb1de/32.png) [@Yoshi](https://discourse.cogstack.org/u/Yoshi)\
**Post date:** [August 9, 2022, 4:33pm UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/1 "2022-08-09T16:33:32Z")

</div>

Hi,

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’: {}})

Thanks!

 ![Screenshot 2022-08-09 at 17.29.23](https://europe1.discourse-cdn.com/flex017/uploads/cogstack/original/1X/300cc497a08317c4f8ecfa357e5439924fad57c7.png)

---

<div class="post-metadata">

**Author:** ![anthony.shek](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.shek](https://discourse.cogstack.org/u/anthony.shek)\
**Post date:** [August 9, 2022, 9:12pm UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/2 "2022-08-09T21:12:54Z")

</div>

Have you tried any of the following:  
`cdb.cui2names['15188001'].remove('hearing')`

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

---

<div class="post-metadata">

**Author:** ![Yoshi](https://avatars.discourse-cdn.com/v4/letter/y/aeb1de/32.png) [@Yoshi](https://discourse.cogstack.org/u/Yoshi)\
**Post date:** [August 10, 2022, 12:16pm UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/3 "2022-08-10T12:16:30Z")

</div>

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

 ![Screenshot 2022-08-10 at 13.15.59](https://europe1.discourse-cdn.com/flex017/uploads/cogstack/original/1X/3e7720e0e11eaf3999d22954a9604638205b4336.png)

---

<div class="post-metadata">

**Author:** ![anthony.shek](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.shek](https://discourse.cogstack.org/u/anthony.shek)\
**Post date:** [August 12, 2022, 1:18pm UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/4 "2022-08-12T13:18:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anthony.shek](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.shek](https://discourse.cogstack.org/u/anthony.shek)\
**Post date:** [August 12, 2022, 1:28pm UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/5 "2022-08-12T13:28:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yoshi](https://avatars.discourse-cdn.com/v4/letter/y/aeb1de/32.png) [@Yoshi](https://discourse.cogstack.org/u/Yoshi)\
**Post date:** [August 15, 2022, 9:54am UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/6 "2022-08-15T09:54:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anthony.shek](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anthony.shek](https://discourse.cogstack.org/u/anthony.shek)\
**Post date:** [August 15, 2022, 11:52am UTC](https://discourse.cogstack.org/t/removing-names-from-a-cdb-concept/70/7 "2022-08-15T11:52:53Z")

</div>

Glad your issue has been resolved!
