Skip to content

ptrejo1/SwiftSnowball

Repository files navigation

SwiftSnowball

Swift 5.0 License MIT CircleCI codecov

A Swift implementation of the Snowball stemmer

For more info on algorithm:

Currently English is the only supported language, there are plans for more. Help is always appreciated!

Installation

Swift Package Manager

.package(url: "https://github.com/ptrejo1/SwiftSnowball.git", .exact("1.0.0"))

Usage

Stem a word with the SnowballStemmer class and its stem method

import SwiftSnowball

let stemmer = SnowballStemmer(language: .english)
let stemmed = stemmer.stem("swiftly")
print(stemmed)      // prints swift