04-29-2011, 07:05 AM | #1 |
Junior Member
Posts: 5
Karma: 12
Join Date: Apr 2011
Device: Kindle 3
|
Mass delete of unpopular tags
Hi all. I've searched somewhat, but cannot seem to find an answer to this one:
I've got a large collection that I've imported a lot of social metadata for. I've ended up with around 3000 odd tags, the majority (>2500) of which are only applied to a few books. I'd like to delete all unpopular tags, say all those that occur on less than 10 books. I can't find a way to do this though the Calibre UI without clicking "delete tag" 2500 times. Any suggestion? Much appreciated. |
04-29-2011, 09:16 AM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
You can use bulk metadata edit for editing the tags or doing a search & replace on the tags field. That will cut down the editing required a little, but I don't know of a way to delete all tags that are applied to less than X books.
The quality check plugin may be of interest to you, although that too will only select books based on tag count. |
Advert | |
|
04-29-2011, 10:58 PM | #3 | |
Junior Member
Posts: 5
Karma: 12
Join Date: Apr 2011
Device: Kindle 3
|
I found a way to do this. I did the following
1) Backed up the calibre database (metadata.db) 2) Downloaded SQLite Administrator 3) Ran the following SQL against the database: Quote:
|
|
07-21-2011, 11:06 AM | #4 | |
Member
Posts: 10
Karma: 94
Join Date: Jun 2011
Location: Odense, DK
Device: Kindle
|
Quote:
You sir are a genius. |
|
07-21-2011, 01:45 PM | #5 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
That deletes the tags from the books (link) What cleans up the tags table? |
|
Advert | |
|
07-21-2011, 04:30 PM | #6 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
07-21-2011, 04:54 PM | #7 | |
Member
Posts: 10
Karma: 94
Join Date: Jun 2011
Location: Odense, DK
Device: Kindle
|
Quote:
My tags count went from 4500 something to approx. 350 and I only deleted tags used fewer than 6 times. Btw I found that doing a: Code:
SELECT COUNT(DISTINCT tag) FROM books_tags_link done (for some reason SQLite Administrator doesn’t). |
|
07-22-2011, 09:44 AM | #8 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
So you kept the "Fiction" tag found on 1200 books and threw away the "Fiction - American Pre-Revolutionary War" tag found on only 4 books.
Personally, I'd have done it the other way - thrown away all general tags found on more than 6 books and kept the useful specific tags I love wandering through my tag list and finding hidden bits of subject matter that some helpful librarian, author or publisher spent the time to tag for me. Different strokes for different folks! |
07-22-2011, 10:04 AM | #9 |
Grand Sorcerer
Posts: 19,226
Karma: 67780237
Join Date: Jul 2011
Device: none
|
^This is really a question of indexing exhaustivity versus term specificity. Both sets of tags (frequent and infrequent) have their uses. Now if everything has the tag of book then it is useless.
My own opinion is that removing less frequent tags completely negates the importance of the long tail. |
07-22-2011, 10:48 AM | #10 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Instead of throwing away the long tail, there were other options. They could have copied the tags into a custom tag-type column and thrown away the tail from that column. That way, a tag on 5 books might later have made it past the 6 book threshold when another book with that tag arrived and they ran the process again (copy all tags to a custom column and delete the long tail from the custom column). Data is so hard to come by that throwing it away seems a crime. |
|
07-27-2011, 05:21 PM | #11 |
Enthusiast
Posts: 37
Karma: 8276
Join Date: Sep 2010
Device: Kindle Paperwhite 2, iPad, Marvin 3, Mapleread
|
Is there any way the genius above could give me a way to import / copy all the values/data in my Genres column into the Tags column? I want to delete the tags data and substitute it for genre data so that the catalogue function will show my genres....
|
07-27-2011, 05:47 PM | #12 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
07-29-2011, 07:46 AM | #13 | |
Member
Posts: 10
Karma: 94
Join Date: Jun 2011
Location: Odense, DK
Device: Kindle
|
Quote:
misspelled/malformed tags, is not my idea of "data". You mention librarians above…trust me, no sober librarian would have added the tags I deleted hehe But as you say, of course YMMV and it seems it does Btw my approach above combined with the GoodReads plugin + dwanthny's customization and the BISAC Subject list has worked wonders in my library. Last edited by Arkivaren; 07-29-2011 at 08:03 AM. |
|
07-29-2011, 10:28 AM | #14 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
There's a difference between fixing errors/making the tags consistent versus throwing away all data that applies to six or fewer books. As you say YMMV.
|
07-29-2011, 10:45 AM | #15 | |
Grand Sorcerer
Posts: 19,226
Karma: 67780237
Join Date: Jul 2011
Device: none
|
Quote:
My own tagging is a mess sometimes. Some days I'll be a lumper and some days a splitter. Tags are an evolving beast with me. |
|
Tags |
tags |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is the 6th Mass Extinction already under way? | kennyc | Lounge | 15 | 03-06-2011 06:41 AM |
Convert/Delete Tags Automatically | iridius | Library Management | 2 | 02-23-2011 09:47 AM |
hiya from Mass. | BladeRun44 | Introduce Yourself | 12 | 12-11-2010 03:34 PM |
Delete files in PC not equal to delete in Sony reader 505 | sheilalayoli | Sony Reader | 5 | 07-12-2009 03:13 PM |
Hello from Western Mass | Oldvjp1 | Introduce Yourself | 5 | 03-12-2009 12:46 PM |