Giter VIP home page Giter VIP logo

Comments (3)

mitechie avatar mitechie commented on July 19, 2024

This isn't too bad to add in. So there's the method remove_unlikely_cadidates that cleans out some nodes, but it's not taking into account the link density. The link density is only considered with finding a candidate for the actual document. You'd have to add some work in there to check link density and determine if the node should be dropped.

You can see an example in my port that does this, I track not just candidates, but nodes that should be dropped after we've done the processing so that we only do the checks once.

https://github.com/mitechie/breadability/blob/master/src/breadability/readable.py#L383

and an example of the page parsed:

http://r.bmark.us/view/http%3A%2F%2Fwww.kwqc.com%2Fstory%2F19484184%2Fshots-fired-in-ill-school-2-students-in-custody

from python-readability.

nhnifong avatar nhnifong commented on July 19, 2024

Thank you for the help, your port looks great. Have you totally re-written the core readability parts?

from python-readability.

mitechie avatar mitechie commented on July 19, 2024

Yea, I tried to merge up this library with it's forks and decruft but failed and ended up just re-porting straight from the original readability js file from scratch trying to keep up better documentation and tests along the way.

from python-readability.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.