Giter Club home page Giter Club logo

boilerpipe-clj's Introduction

boilerpipe-clj

A simple wrapper around the Boilerpipe text extraction library.

Artifacts

boilerpipe-clj is released on Clojars.

The Most Recent Release

With Leiningen, add it to the dependencies in project.clj:

[io.curtis/boilerpipe-clj "0.3.0"]

Usage

Core Functionality - boilerpipe-clj.core

The main namespace for Boilerpipe operations in the Clojure wrapper is boilerpipe-clj.core.

user=> (use 'boilerpipe-clj.core)

The main function for extracting human-readable text from an HTML document is get-text.

user=> (def article (slurp "https://help.github.com/articles/open-source-licensing"))
#'user/article
user=> (get-text article)
"all\nPublic repositories on GitHub are often used to share open source software. Open source software is software that is licensed so that others are free to use, change, [...]"

It expects HTML as a String for its first argument, but you can also opt to use different strategies for extracting text by passing it an extractor instance as the second arg.

user=>  (get-text article boilerpipe-clj.extractors/default-extractor)
"Open source licensing\nWhich license is right for me?!\nDon't fret! Choosing an open source license can be confusing. That's why we created choosealicense.com , a website that helps you make decisions about how to license your code. [...]"

Extraction Strategies - boilerpipe-clj.extractors

The most frequently used extraction strategies are definied in boilerpipe-clj.extractors. These are

  • ArticleExtractor - Default
  • DefaultExtractor
  • ArticleSentenceExtractor

Defining your own strategies is not currently possible from Clojure. Please refer to the Boilerpipe documentation for more info on implementing them in Java.

Contributors

License

Copyright © 2013 Curtis Gagliardi Copyright © 2013 Nick Barnwell

boilerpipe-clj is provided under the ASL 2.0 license.

The full license is available in LICENSE.md

Changes

0.3.0

Remove util namespace, it's outside the scope of this library. It only made it in here due to lazyness when pulling this code out of another project. I suspect no one but me was using them anyway.

boilerpipe-clj's People

Contributors

cgag avatar

Watchers

 avatar  avatar  avatar

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.