Count of "languages of the book" is incorrect on statistics page

TalkBug Collectors

Join LibraryThing to post.

Count of "languages of the book" is incorrect on statistics page

This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.

1lorax
Sep 29, 2010, 8:51 am

On the main "Statistics/memes" page, where it lists "Languages of the book", mine shows 704 as having no language set (xxx). Inspection of my catalog shows that only 43 are unset (I will hold off on editing these for the time being.) It may be that this is counting the languages followed by a trailing comma (e.g. "English," as is or was set by Power Edit) as unset, but since the catalog does not sort them separately and the commas appear to be stripped on export I can't tell for sure.

2thorold
Sep 29, 2010, 10:11 am

I think it is counting books that have a space or something in the secondary language field. Certainly in my case I have at least one language set for each book in my library, but there are 75 listed as "(xxx)". I spotted a few in my list that have a trailing comma after the primary language, but nothing visible in the secondary language. Maybe it's historical debris from one of the periods when language data wasn't "sticking"?

3theapparatus
Edited: Sep 29, 2010, 10:18 am

This has been reported a couple of times now. We've had a missing field for a couple of months now. The xxx showed up a few days ago.

http://www.librarything.com/topic/97926

Closing the status as there's already a report on it.

4lorax
Sep 29, 2010, 10:22 am

This is not the same as that bug. I'm not talking about the existence of the field (which I understand is supposed to be for books without an assigned language, and I do not consider to be a bug), but of the numbers being wrong.

5pranogajec
Edited: Sep 29, 2010, 3:18 pm

Why in the world would the unassigned language category be "xxx" as if it's something naughty. It should say "no language assigned" or something like that, no? I too now have 400 books under the "xxx" category despite only a few actually having no primary language attached.

(I added my note to the other thread: http://www.librarything.com/topic/97926#2221288)

6vaneska
Sep 29, 2010, 3:36 pm

I haven't seen any evidence that it is unassigned language books. I think that was just one hypothesis.

v

7pranogajec
Sep 29, 2010, 3:44 pm

Well, whatever it is, XXX doesn't seem like it should apply to anything in terms of book statistics!

8lorax
Sep 29, 2010, 3:54 pm

5>

xxx is just a placeholder for the three-letter language code. They needed some three-letter sequence that doesn't correspond to a real language. xxx is as good as any other, and obviously fake.

9pranogajec
Edited: Sep 29, 2010, 4:02 pm

So, lorax, you claim the xxx does refer to unassigned languages, while vaneska thinks your idea is just a hypothesis and implies that's it's something else (but what?).

Which is correct?

If it is a placeholder, it's a particularly bad one--why not zzz or aaa or "no language selected"; moreover, it's one that doesn't seem to work since it's not recording accurate information.

10lorax
Sep 29, 2010, 4:14 pm

9>

Well, it can't be "no language selected" because it's taking the place occupied by the three-letter language code. As for why not "zzz", I don't know, ask Tim. I'd probably have used xxx in that case, too, though; it virtually screams 'placeholder for null value' to me, and gets used in contexts like that a lot.

I could be wrong, obviously, but while it's definitely not working -- which is why I opened this bug, in fact -- it seems that it's intended to refer to books with no language set (For one thing, there's no other place for them, and a NULL language field would produce the empty result observed before the parenthetical xxx.)

11pranogajec
Edited: Sep 29, 2010, 4:30 pm

But it *could* be "no language selected"--the three-letter codes are arbitrary and books without an assigned language could, I would guess, be coded to read "no language selected" or, even better, "none," just as easily as "xxx", no? Maybe it's more complicated than that, I don't know. But if the statistics page is meant to convey useful or at least interesting information about one's collection to the owner of that collection and to others interested in that collection, the way the information is conveyed should be obvious and not cryptic as I think the xxx is. My point is just that the way statistics information is conveyed (publicly) is important and xxx just doesn't convey something obvious. Yes, in context, one can easily figure that xxx looks like it's a placeholder for the language code, but it's an awfully inelegant way of doing it, I think. Coupled with the fact that it doesn't work is even more reason to rethink the whole thing.

12jjwilson61
Sep 29, 2010, 6:23 pm

lorax isn't arguing that it should work the way it does; she (if you go by the profile picture) added this bug report after all. She's just giving a guess as to what xxx might mean. I think she'd agree that the display should be fixed to something meaningful.

13vaneska
Sep 29, 2010, 6:34 pm

9: I haven't a clue what the xxx thing is - patently a bug. Several people have said that the xxx figure doesn't correspond with the number of books without a selected language in their library. All my books have a selected language yet I have 190 under xxx. So in my opinion that hypothesis is a red herring.

v

14pranogajec
Sep 29, 2010, 6:50 pm

Re 12: Yes, I understand lorax started this bug report, and I'm glad she did and I hope my posts have not come across as attacking her. I am just extending the criticism to include the fact that, to me at least, the xxx doesn't work no matter how you cut it. It's either a faulty count of no-language-assigned books with poor choice of abbreviation, or it's simply some glitch that needs to be removed altogether. Wonder why we've not heard from the LT people about this yet, as there seem to be several threads on this now.

15lorax
Sep 29, 2010, 8:47 pm

13>

Several people have said that the xxx figure doesn't correspond with the number of books without a selected language in their library.

Yes. Including me. Which is why I reported the discrepancy as a bug.

16keristars
Oct 25, 2010, 9:23 pm

The "xxx" language bug:

I discovered the other day that it comes up if you use the PowerEdit feature. I did NOT have an "xxx" language when this bug opened, and did not have it until AFTER I used PowerEdit to set the language of all my books.

I have set Original Language and Language of Book for every single book in my catalogue, and I did so using PowerEdit. Before I filled in the remaining books that were missing the Language just now, my statistics showed:

515 English (eng)
182 (xxx)
23 French (fre)
4 Japanese (jpn)
2 German (ger)

With the PowerEdit changes, they show:
532 English (eng)
200 (xxx)
23 French (fre)
5 Japanese (jpn)
2 German (ger)

The total number of books with language set increased by 18. At the same time, the XXX language also increased by 18.

Therefore, I'm fairly confident that the "xxx" is an artifact of using PowerEdit to set languages. I did not ever use PowerEdit before to do so, and the first time that I did, it appeared. The second time I did, it increased by the same number of books that had languages added.

17pranogajec
Oct 27, 2010, 10:51 pm

Interesting. I think you're right about the power edit. The "xxx" showed up for me at some point after I used the power edit for the first time (I didn't check the statistics right away, so I hadn't made that connection).

18lorax
Oct 28, 2010, 9:26 am

16>

Great diagnosis, thanks.

19lorax
Oct 28, 2010, 9:37 am

Further support for keristars' diagnosis:

We've known for some time that using Power Edit to set the "Language of the book" to a single language leaves a trailing comma (that is, the language will show up in your catalog as "English," rather than "English".) (Note to non-programmer Americans; I am using literal syntax here. Any punctuation inside the quotation marks belongs with the quoted material and is not an arbitrary and confusing insertion on my part.) I went through my catalog and individually edited a few "English," entries in the field to "English", just by re-saving the values, and the number under "xxx" dropped accordingly. I suspect that it's not finding "English," in the lookup and treating these as blank/unknown with the xxx, thus the inflated value of the number.

To reiterate:

The fact that there is an "xxx" option for languages is not a bug.

The fact that the placeholder value used to represent a missing language or one that does not appear in the lookup table is "xxx" is not a bug.

The fact that the number that appears here is artificially inflated over the expected value for unset languages due to Power Edit adding a trailing comma is a bug.

20keristars
Oct 28, 2010, 12:02 pm

I don't think that the "xxx" is for "English,". If you look at the numbers I posted, the "English" ones increased by 17 (and "Japanese" by 1) at the same time as "xxx" increased by 18, but I only edited 18 books.

I suspect, since I didn't notice the comma before, that "xxx" is for the blank language that the trailing comma says should be there.

So, yes, the trailing comma and incorrect language count is a bug. But I don't think the "xxx" is "English,". I think it's " " (empty value).

21lorax
Oct 28, 2010, 12:06 pm

20>

Good call.

22brightcopy
Edited: Nov 20, 2010, 3:48 am

Anyone logged that trailing comma bug? I don't see it anywhere using some cursory searches. Want to enter it, lorax?

23nathanm
Nov 21, 2010, 2:08 pm

I've also been wondering about this. After reading this thread, I did a little experimenting by changing the language of a few books alternately via Power Edit and other methods, then refreshing the Statistics/Memes page and watching the number of books with language (xxx). I verified the bug does work as hypothesized. Power Edit does add a trailing comma to the language if there's no secondary language. Then the Statistics/Memes page will list that many books with the language (xxx). As an interim fix, if you change the language of books somewhere else, the comma disappears, and the number of books with the language (xxx) will be reduced.

24jjmcgaffey
Nov 26, 2010, 6:12 pm

Another report of the same bug - http://www.librarything.com/topic/103184. One or the other of these should probably be closed - this one has more discussion (and is older), but that one has a clearer title...someone who's actually seen this bug might want to make that decision.

25jjmcgaffey
Jan 13, 2011, 4:52 am

OK, now I've seen it - I had a bunch of books with no language set, all of which were actually English. I used Power Edit to fix a couple, and no comma appeared, so I fixed all of them (572, it turned out). But when I checked Stats/Memes, I had 572 xxx language books, and when I clicked on the xxx I got to my library with the English, showing. Bah. I thought Tim had managed to fix the Power Edit problem and was going to congratulate him...

26jjmcgaffey
Edited: Feb 11, 2011, 12:38 am

Bump to first(?) mention of this problem - http://www.librarything.com/topic/55167 . I cross-linked them (linked this one there). I'll cross again to the third post. (no I won't, that one's closed.)

28jjmcgaffey
Mar 2, 2011, 3:42 pm

There's a workaround - if you do Power Edit on your xxx books, and set the secondary language to 'blank' rather than 'no change', the trailing comma goes away. Fix until Tim et al can figure out what's up with PE...

29pranogajec
Mar 2, 2011, 10:00 pm

28: Doesn't seem to work for me. I have 326 "xxx" books. I went into Power Edit, selected all books, selected Set Language, set secondary to "blank," but the language doesn't change. The only thing that seems to work is to go through each individually and resave the language.

30keristars
Mar 2, 2011, 10:12 pm

That's strange - when the fix was mentioned a week or so ago, several of us were able to make it do.

I did notice that it didn't look like it was fixed, but after clicking around a bit, it turned out that it had been changed. For whatever reason, the power edit didn't want to acknowledge that it had done anything.

31pranogajec
Mar 5, 2011, 9:23 pm

Thanks. I think you caught a window of opportunity that has expired. I tried the fix again and still nothing. I went back to check the stats page and it's still listing the xxx books under language. Just a minor annoyance.

32theapparatus
Mar 12, 2011, 2:48 pm

I just gave the workaround a try. I had to set the Original language option as well to get them out of the xxx listing.

So for me:

primary is set to no change

secondary is blank

original is set to English in most of my records.

Not sure if that's really a workaround but seems to be working for me.

33pranogajec
Edited: Mar 12, 2011, 7:14 pm

I tried the workaround again. This time, I scanned the list of 279 books that were in the xxx category, and all were primary language English, original language English. So I set primary to English, secondary to blank, and original to English, and now the commas are gone! So it seems like you have to set both primary and secondary languages for this patch to work.

34pranogajec
Mar 12, 2011, 7:17 pm

One other funny thing I noticed, which brings us back to the issue of using "xxx" as the placeholder. I noticed on my stats page that under Language of Review there are 4 that are not set to English (not sure how this is set in the first place). Here, instead of "xxx," the field shows up as "not set," which makes more sense to me. Why not use that in the language fields, too?

35jbd1
Sep 26, 2012, 10:16 am

I believe this was fixed as part of http://www.librarything.com/topic/103339 - if still an issue, can someone provide a good example? Thanks!

36kmgreen
Edited: Nov 14, 2012, 4:36 pm

Hey pranogajec, I ordered a book from you via Amazon.com. You haven't responded to my inquires. Where is it! Order ID 105-0732088-9899450:
1 of Art History, Combined Volume (4th Edition) ASIN: 0205744222

37merlin69
Nov 9, 2014, 11:43 am

>33 pranogajec: pranogajec this method worked for me also, thank you.