[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Readability" feature in eww

From: Lars Magne Ingebrigtsen
Subject: "Readability" feature in eww
Date: Mon, 03 Nov 2014 01:41:14 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

It occurred to me that it would probably make sense for eww to have a
"readability" feature a couple of hours ago, so I implemented a take on
it and committed it.

The `R' command in eww will try to find the parts of the current page
where most of the text is, and only display that part.  This makes all
the menus and stuff disappear, and you don't have to page forever to
find the actual article on newspaper sites.

This is a heuristic, of course, so it can be tweaked endlessly.  The
current algorithm just gives most words a positive score, HTML markup a
negative score, and words inside <a> tags a negative score.  For such a
simple algorithm, it seems to give pretty good results.

But tweaking is necessary for it to be ... better.  If anybody has ideas
for tweaks or better algorithms, please be my guest and have at it.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]