Skip to content

The Porter stemming algorithm is a process for removing the more common morphological and inflexional endings from words in English. A Swift wrapper around Martin Porter's algorithm.

Notifications You must be signed in to change notification settings

vincent-coetzee/PorterStemmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PorterStemmer

This library wraps the original Porter Stemming Algorithm implementation from Martin Porter, and makes it available as a Swift package.

For more information on the Porter Stemming Algorithm please refer to

https://www.tartarus.org/~martin/PorterStemmer

The package is very simple to use, import version 1.0.0 of the package in your Swift Package file, and then import PorterStemmer.

To use the stemmer in your code, create an instance of the PorterStemmer class, and ask it to stem the word.

import PorterStemmer

if let stemmer = PorterStemmer()
	{
	let inputWord = "convenience"
	let stemmedWord = stemmer.stem(inputWord)
	print(stemmedWord)
	}

The implementation has been succesfully tested using the sample words generated by Martin Porter. This framwork has been tested on both Linux and macOS.

About

The Porter stemming algorithm is a process for removing the more common morphological and inflexional endings from words in English. A Swift wrapper around Martin Porter's algorithm.

Resources

Stars

Watchers

Forks

Packages

No packages published