Anyone having any leads on a 'reading time algorithm'?

后端 未结 3 1405
甜味超标
甜味超标 2021-01-19 18:48

Just curious how to calculate the length of time it would take someone to read a paragraph with x characters and/or y words. Any thoughts on this?

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-19 18:55

    Let’s say it’s 938 words. or if you use JavaScript you can do this

    const blogPost = "article or blog post if its in a variable like this"
    
    // get number of words in blogpost
    const wordCount = blogPost.split(" ").length
    
    1. Divide your total word count by 200.

    2. You’ll get a decimal number, in this case, 4.69. The first part of your decimal number is your minute. In this case, it’s 4.

    3. Take the second part — the decimal points — and multiply that by 0.60. Those are your seconds. Round up or down as necessary to get a whole second. In this case, 0.69 x 0.60 = 0.414. We’ll round that to 41 seconds.

    4. The result? 938 words = a 4 minute, 41 second read.

    5. But that’s really specific. Why not round that time to make things simpler for your reader? Anything less than 30 seconds gets ignored; anything more than 30 seconds gets rounded up to the next minute.

    6. that rounding makes your 938-word article a 5-minute read.

提交回复
热议问题