"Uncategorized" tagging after import from LR

First post here, and new user to DT (3.0.1). As many have found, it is time to start the process of migrating from LR 5 to something else, and it looks like DT will be it. Of course it will be a long process.
I was never a serious user of LR, but it was free from my employer. But now being retired, no more updates, let alone a subscription.
To get ready for the jump, I sorted all 8K images into year folders, and within into months.
Then spent the hours tagging all the images.

Used a structure like:

Dogs

  • Rover
  • Spot
  • Fluffy

Great, now in LR I could search for “Dogs”, or just “Rover”, or “Rover” and “Fluffy”.
And I more or less have a sense of how to do similar using “Collect Images” in lighttable after exporting to xmp’s, and importing everything into DT.

But now I also have several thousand tags showing up as “Uncategorized” under their top level headings.

Like:

Uncategorized

  • Dogs
  • Rover
  • Spot
  • Fluffy

Yet they also appear under their appropriate subheadings, and in their correct subcategories further down the tags listings.

In LR, the tags just appear as, say, “Rover”, and it just knows that Rover is a subcategory of “Dogs”

DT metadata in lighttable shows: “Dogs”,“Rover”. It too seems to just know that Rover is a subcategory of Dogs…but apparently is also picking up on the individual tags, and therefore classifying the tag of “Dogs” (and the others) as uncategorized.

Is there a way to clean this up? Or do I just ignore the “Uncategorized” results in Collect Images"?

(Yes, I will eventually offload tagging to Digikam…but not quite ready for that additional learning curve…)

I am not sure if this is a side effect of how lightroom stores tags, however, there are probably several ways to achieve what you want. One method is to remove the superfluous tags from the images (mark all images and then double click the tag in the tagging module) and then apply the lua script here Is there a method to remove unused Tags please? to remove the then unused tags.

Another method would be to directly alter the data base, but it might be more dangerous.

Furthermore, recent additions to darktable include better tag handling. There is a method to rename tags globally which is not in the user manual yet, probably there is a method to remove tags entirely as well, but I cannot check as I am not on my computer.

Uncategorized in collection just means that the listed tags are first level tags (no hierarchy).

During the import dt imports Xmp.dc.Subject and Xmp.lr.hierarchicalSubject. The first ones are candidate for Uncategorized.

I don’t remember if that helps but you could try to first export the tags form lr (text file), import it in dt (tagging module), and then import the images from lightroom. This gives a chance to dt to skip a single tag if it already exists in the hierarchy, but I’m not sure it is effective.

In tagging module you can list the tags as a flat list or as a tree list. In both you see the number of images which are attached to them and clean up (delete not wished tags) as you need.

Looked at the xmp files. Using a real world example for one photo:
("<" removed, as the editor thought I was posting a ton of html links!)

Lightroom:
dc:subject>
rdf:Bag>
rdf:li>Dogs/rdf:li>
rdf:li>Events/rdf:li>
rdf:li>Loki/rdf:li>
rdf:li>Loki First Days/rdf:li>
rdf:li>Puppies/rdf:li>
/rdf:Bag>
/dc:subject>

lr:hierarchicalSubject>
rdf:Bag>
rdf:li>Dogs|Loki/rdf:li>
rdf:li>Dogs|Puppies/rdf:li>
rdf:li>Events|Loki First Days/rdf:li>
/rdf:Bag>
/lr:hierarchicalSubject>

darktable:
dc:subject>
rdf:Bag>
rdf:li>Dogs/rdf:li>
rdf:li>Events/rdf:li>
rdf:li>Loki/rdf:li>
rdf:li>Loki First Days/rdf:li>
rdf:li>Puppies/rdf:li>
/rdf:Bag>
/dc:subject>

lr:hierarchicalSubject>
rdf:Bag>
rdf:li>Dogs/rdf:li>
rdf:li>Dogs|Loki/rdf:li>
rdf:li>Dogs|Puppies/rdf:li>
rdf:li>Events/rdf:li>
rdf:li>Events|Loki First Days/rdf:li>
rdf:li>Loki/rdf:li>
rdf:li>Loki First Days/rdf:li>
rdf:li>Puppies/rdf:li>
/rdf:Bag>
/lr:hierarchicalSubject>

It looks like DT added all the subject tags (in italics) to the hierarchicalSubject

Any thoughts on how (and which entries?) to clean it up, but not lose ability to sort?
Have only fired up DigiKam once - reimport via that, then to DT?
Write a lua (which I might be able to do) to cut out all the Subjects from the xmps?
Or, harder, write a lua to cut out the seconds in hierarchicalSubject?