Untagger

Untagger is a removal and full text extraction of HTML written in Swift heavily inspired by Boilerpipe. Like Boilerpipe, Untagger provides algorithms to detect and remove the surplus "clutter" (boilerplate, templates) around the main textual content of a web page.

The algorithms used by the library are based on concepts of the paper "Boilerplate Detection using Shallow Text Features" by Christian Kohlschütter et al., presented at WSDM 2010 -- The Third ACM International Conference on Web Search and Data Mining New York City, NY USA.

wcgrayUntagger

Installation

Use CocoaPods:

platform :ios, '8.0'
use_frameworks!
pod 'Untagger'

Or drag the Untagger project into your xcodeproj and make Untagger a target dependency.

Usage

Import Untagger:

import Untagger

Then use it:

UntaggerManager.sharedInstance.getText(url: url) { (title, body, source, error) in
            if error == nil {
                print("Article title: \(title!)")
                print("Article body: \(body!)")
            }

            if let error = error {
                print("Error: \(error.message)")
            }
        }

GitHub