Tags are case sensitive some of the time, and case insensitive on other pages

DiscussionsBug Collectors

Rejoignez LibraryThing pour poster.

Tags are case sensitive some of the time, and case insensitive on other pages

1ArlieS
Modifié : Avr 16, 2023, 5:26 pm

I have somehow acquired 2 tags: "US politics" and "us politics". It offers me both on the add books page. The tags page in "your books" shows both. I presumed that tags were case sensitive, and clicked on the tag with fewer books associated it (only 1) to move those books from that tag to the other one.

I wound up on this page: https://www.librarything.com/catalog/ArlieS?tag=us%20politics

That page includes books with both tags.

I can kind of see the problem - URLs are generally not case sensitive. So if the tag is selected via a URL, you have to do a case insensitive match, unless you'd prefer to have some of the tagged books inaccessible via this path.

But that's from a programmer's point of view. From a user's point of view, this is crazy-making. I clicked on a specific tag, and got 20 extra matches.

From a user's point of view, there are three reasonable choices, listing best first:
- tags are case sensitive in all contexts. No exceptions. (This may be how file names work on Unix and possibly Linux.)
- tags are case insensitive in all contexts. When you create a tag, whatever combination of cases you use get converted to the normal display format, whether that's all-lower case, all-upper case, or even first character upper case and rest lower case. (IIRC, this is how file names work on Windows.)
- tags are case insensitive, with the initial case remembered. If you create "US politics", that's the tag you'll have. If you later type "us politics", "US POLITICS" and "us POLITICS" (e.g. in the "add books" screen) they all get converted to match the first way you typed it, except that you can edit the tag if you want to change it. (This, minus the ability to edit, is one of two choices for how file names work on MacOS.)

(Edited to add: I have now gotten rid of the all lower case version of this tag, so the page I linked won't be quite the same for you.)

2SandraArdnas
Avr 16, 2023, 7:03 pm

I can't comment on what capitalization is considered the same tag automatically, though I believe only initial capital letter triggers that, all caps not, but wanted to point out that when tags are combined, you will lend on the same tag page, but have two different tags personally. Say 'us politics' and 'US politics' were initially separate, but were combined by members, you will retain both as separate tags in your catalogue, but lend on the combined site-wide tag page. This is an intentional feature.

If you personally have tags that have several forms that should be turned into a single one, you can use edit on your personal tag page, accessed either from home page or from your catalogue by clicking on tags in the dropdown menu next to list/covers. Hovering over a tag there shows the edit link that enables you to change all of them at once.

3gilroy
Avr 17, 2023, 5:54 am

If you go to the US Politics tag page: https://www.librarything.com/tag/US%20politics
and look at the aliases of that tag: https://www.librarything.com/tag/detail/US%20politics#aliases

You'll notice that us politics and US politics have been combined into a single tag. This is not a case of case sensitivity.
What probably happened is you entered the tag both ways in your catalog at a time in the past, so both are offered in your add books page.
If YOU want a specific format, you can look up the ones that have the wrong format in your own catalog and power edit them all to the proper form.

I'm seeing this as NOT a bug, but will leave it to others to comment.

4ArlieS
Avr 17, 2023, 9:36 am

>3 gilroy: No, I can't look up the ones that have the wrong format. All I can get is a combined page with both formats together. I can search the resulting page, with the browser's in-page search, to find the few that need changing, and change them. (That's what I did yesterday.) But I started this thread because the lookup unexpectedly failed.

For the rest, I don't really understand the idea of system tags implied in your message. AFAICT, any random string of characters I type in the tags field will become a tag, whether or not anyone has ever used it before, but only those I've already used will be suggested when start typing in that field. I.e. my experience of the tags field makes it look as if I have my own set of tags. I can see other people's tags when looking at their library, and search within my recommendations based on tags other people have used for the books listed, but other than that tags field seem to act like it's a private field.

5lilithcat
Avr 17, 2023, 9:53 am

>3 gilroy:

If YOU want a specific format, you can look up the ones that have the wrong format in your own catalog and power edit them all to the proper form.


No, you can't. I somehow have both "art history" and "Art history" tags. If I look up "Art history", I also get all the books tagged "art history". Searching your catalog by tag ignores case. When I come across this, I just edit the tag on the tag list page.

6norabelle414
Avr 17, 2023, 9:53 am

Yeah this might be an RSI but I don't see anything that is not acting as intended. Tags are case-sensitive within one's own catalog and case-insensitive globally and when searching.

7ArlieS
Avr 17, 2023, 10:03 am

I just want to check one thing - what is supposed to happen if I have tags "foo" and "bar", and edit "foo" to become "bar" on the edit tags page? Is this the same as what is supposed to happen if I have "Bar" and "bar" and edit "Bar" to become "bar"? Has anyone tried either of these recently and can verify what actually happens?

Given the other weirdness, my expectation/fear was that I'd end up with two tags, "bar" and "bar" rather than the two tags being combined into one. There'd be no way for me to tell them apart, but there'd be lists where I had 17 of "bar" and 12 of "bar", two offerings when I started to type the tag name, and perhaps after some future changes to the code when I searched for items with tag "bar" I'd get either 17 or 12, not 29.

8SandraArdnas
Avr 17, 2023, 10:04 am

>5 lilithcat: On the tag page, not by searching the catalogue.

I just realized opening it from home page does not lead to the same thing and there is no edit option then. Only from catalogue, opening your tag page from the dropwdown in catalogue lists all of your tags alphabetically or by number of uses and has the option to edit any across catalogue. Sorting them by usage makes it easy to spot ones that have a typo for instance

9SandraArdnas
Avr 17, 2023, 10:05 am

>7 ArlieS: Two 'bar' tags become one

10norabelle414
Modifié : Avr 17, 2023, 10:28 am

>7 ArlieS: if you have 17 books with the tag "foo" and you edit "foo" to become "bar", and you already had 12 books tagged "bar" then you will have 29 books tagged "bar". Unless some of those books were tagged both "foo" and "bar", in which case the tag "foo" will just disappear from them because they were already tagged "bar".

I have not tried it recently but if something different happens for you then that would definitely be a bug.

11ArlieS
Avr 17, 2023, 10:22 am

>3 gilroy: >4 ArlieS: >8 SandraArdnas: I've just done a bit more exploring, and found the general tags pages, which I'd never noticed before. Apparently some of my tags are quite unique, such as "human perceptual distortions", while others have many aliases and even translations to many languages (e.g. "us politics").

Thank you all for inspiring me to look around and find this. It will be interesting to see more about how other people use tags.

12ArlieS
Avr 17, 2023, 10:28 am

>11 ArlieS: But sadly, I almost immediately found what looks like another variant of the spaces-in-tag problem.

Check out https://www.librarything.com/tag/human+biology - I got here via clicking on a link to the tag page of "human biology" found in some other tag page (https://www.librarything.com/tag/human%20perceptual%20distortions).

If I try to go to the tag page for "human biology" from the list of tags (https://www.librarything.com/tags/ArlieS, as reached from the main page), I get https://www.librarything.com/tag/human%20biology, which is correct.

13gilroy
Avr 17, 2023, 10:51 am

>4 ArlieS: >5 lilithcat: Sorry, that was pre caffeine and I said power edit when I meant the Your Books Tag Page.

14timspalding
Modifié : Avr 17, 2023, 12:03 pm

Sorry, but I don't think this is a bug. Here's the reasoning:

First, you get to tag your books as you like.

If you tag one "history" and later you tag one "History," what are we to do?

1. We could stop and scold you. ("ERROR: YOU HAVE USED A DIFFERENT CAPITALIZATION!")
2. We could silently correct you to the first version to used, which would lead to a hundred Talk topics where people said "I tagged the book France but it changed it to france—this program sucks!"
3. We could stubbornly refuse to combine them when you click a tag in your catalog. Do people REALLY want a search for France to not turn up france? No. Mostly people will want the system to be forgiving and return both.

So, yes, you can enter tags in different ways. They will show up as different tags in the tag list, but they will still be findable as if they were one tag. That's the best user-experience solution for a slightly fiddly situation.

Second, we combine tags on the global level. It's not only History and history that are combined on the global tag page. It's even histoire and Geschichte! This makes the site more usable and browseable for all. It's the right move.

15MarthaJeanne
Avr 17, 2023, 12:12 pm

Geschichte probably should not be combined in. While it can mean history, it is also the word for story, and I hardly think we would combine history with story.

16SandraArdnas
Avr 17, 2023, 12:32 pm

>12 ArlieS: That is recent bug, the link opening with + signs where spaces should be. It makes tag combination proposals meaningless ATM too. Hopefully, it will be fixed soon

17lilithcat
Avr 17, 2023, 12:33 pm

>15 MarthaJeanne:

And "histoire" can be either history or story. Sounds like some separation proposals are in order.

18Nicole_VanK
Modifié : Avr 17, 2023, 1:11 pm

The specific case : it just reminds you that you haven't been consistent (I think)

But histoire shouldn't be combined with either history or story. It carries both of those meanings.

19waltzmn
Modifié : Avr 17, 2023, 1:49 pm

>15 MarthaJeanne: Geschichte probably should not be combined in. While it can mean history, it is also the word for story, and I hardly think we would combine history with story.

also

>16 SandraArdnas: >17 lilithcat: >18 Nicole_VanK:

This is literary criticism, not bug reporting. :-) Probably doesn't belong here. I think Tim Spalding's explanation makes a great deal of sense. One may disagree with the decisions about what to combine, but that indeed is resolved by proposals to correct the tags.

The question (to which I do not know the answer, because I very rarely search on such non-specific tags as are being discussed here) is whether there is a bug in the algorithm as Tim Spalding defined it.

20timspalding
Avr 17, 2023, 4:47 pm

The question isn't whether it can mean something different, but if it's USED differently among LibraryThing tags.

21kristilabrie
Avr 18, 2023, 9:44 am

(Closing as determined not a bug.)