View Single Post
Old 04-19-2022, 04:19 PM   #2720
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,143
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by chaley View Post
Perhaps, if you figure out what the formula is and where it gets the input numbers.
Here is the post where I saw the formula.

Quote:
Originally Posted by geek1011 View Post
BTW, the algorithm kobo.com uses for calculating the read time range is:

Code:
HoursMax = round(WordCount / 200 / 60)
HoursMin = HoursMax - 1
if (HoursMax >= 10) {
        HoursMax += round((HoursMax + .5) / 10) - 1)
}
The word count and page number are from https://kobostats.azurewebsites.net/bookstats/{ISBN}. The word count seems to exclude front/back matter (but it includes tables and code blocks) (I'll try to figure out the details of this later), and the page count seems to have a linear relationship with the word count. Based on the data from a few hundred books, it seems to be the floor of the word count divided by 272 (this is perfect for nearly all of the books, and ~20-40 pages too large for some older ones, which makes me think they were either calculated differently at that time or manually overridden).

___

The device (i.e., storeapi) seems to use the same algorithm, except that the max hour adjustment is floored instead of rounded (is this a bug?):

Code:
HoursMax = round(WordCount / 200 / 60)
HoursMin = HoursMax - 1
if (HoursMax >= 10) {
        HoursMax += floor((HoursMax + .5) / 10) - 1)
}
Also note that the on-device KEPUB word counter (i.e., HtmlUtility::countWords) counts differently than the Kobo Store.
JSWolf is offline   Reply With Quote