Go to file
Oscar 5e90cdbc37
Merge pull request #1 from MaximKotliar/master
SPM package missing dependency fix.
2023-02-16 09:40:03 -08:00
Example Used Macro to import library in case client uses SPM 2018-10-19 19:58:35 -07:00
PorterStemmer2 Used Macro to import library in case client uses SPM 2018-10-19 19:58:35 -07:00
.gitignore Used Macro to import library in case client uses SPM 2018-10-19 19:59:58 -07:00
.travis.yml patched travis 2018-10-16 15:19:41 -07:00
LICENSE Initial commit 2018-10-15 22:15:01 -07:00
Package.swift SPM package missing dependency fix. 2021-08-14 15:02:22 +03:00
PorterStemmer2.podspec Version 0.1.1 supports SPM 2018-10-19 20:06:59 -07:00
README.md Updated readme with an example for SPM installs 2018-10-19 20:17:27 -07:00
_Pods.xcodeproj Initial commit 2018-10-15 22:15:01 -07:00

README.md

PorterStemmer2 (Swift)

CIStatus Platform Swift 4 support

A Swift wrapper over the Porter Stemmer 2 stemming algorithm, using the official C-ANSI libstemmer library. This offers stemming with every language supported by the libstemmer library and its algorithms.

For more info regarding Porter Stemmer, visit :

📦 Installation

This project is compatible with Swift 4.2, iOS/macOS.

Using the Swift-Package-Manager:

Add this repo as a dependency in your Package.swift file.

Example:
import PackageDescription

let package = Package(
    name: "MyApp",
    dependencies: [
	.package(url: "https://github.com/scaraux/Swift-Porter-Stemmer-2.git", from: "0.1.1"),
    ],
    targets: [
       .target(
            name: "MyApp",
            dependencies: ["PorterStemmer2"]),
    ]
)

Using CocoaPods

Add the following line to your Podfile, and run pod install.

 'PorterStemmer2'

😏 Usage

if  let stemmer = PorterStemmer(withLanguage: .English) {
   let stem:  String  = stemmer.stem("engineering")
}

😍 Credits

The libstemmer library, Snowball, Porter Stemmer and Porter Stemmer 2 are open-source libraries that have been developed by Martin Porter. For more information visit http://snowball.tartarus.org. This project is only a wrapper that makes compiling and using the Stemmer algorithm with a Swift environment.

🚔 License

Swift-Porter-Stemmer-2 is available under the MIT license. See the LICENSE file for more info.