View Single Post
Old 04-17-2022, 12:22 PM   #146
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,805
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
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.

Last edited by geek1011; 04-17-2022 at 03:29 PM.
geek1011 is offline   Reply With Quote