dankito / Readability4J

A Kotlin port of Mozilla‘s Readability. It extracts a website‘s relevant content and removes all clutter from it.
Apache License 2.0
145 stars 22 forks source link

Question: how is isProbablyReaderable used? #13

Open ManuelaJL opened 3 years ago

ManuelaJL commented 3 years ago

Hi. I can't quite see if you've got a java version of isProbablyReaderable, and how to use it.

My code is
            Readability4J readability4J = new Readability4J(url, html);
            Article article = readability4J.parse();

and I see there is no Readability4J.isProbablyReaderable() - Method. Is the method somewhere else? Thanks

dankito commented 3 years ago

Hi @ManuelaJL,

sorry, i didn't implement this method.

Are you interested in implementing it and giving me a pull request?

ManuelaJL commented 3 years ago

Hm, I'll have to see if I have the time and skill for it. I don't know kotlin. Which of your implemented methods is the simplest to use as a model/example for learning how to port a method to java?

dankito commented 3 years ago

It now came to my mind why i didn't implement this method: As Readability4J is really fast!

So you have the already the result and know if it's actually readable, not if it's "probably readable".

diegode commented 3 years ago

Hi @dankito, thanks for this great library. The isProbablyReaderable method is not meant to be an optimization, but it's useful for cases in which automation is required, e.g. Firefox uses it to decide whether to show the "Toogle reader view" button.