Skip to content

japborst/dart_stemmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stemmer

This package implements a stemming algorithm in Dart. Currently, it supports PorterStemmer and SnowballStemmer. It is a port of the exceptional Python NLTK library.

About

This package allows for stemming of words. This process reduces a word to their base form. In many cases, the word will not even be recognisable. Where, for example, running would be stemmed to run, which is still a valid word, yet agreed would be stemmed to agre.

Example

PorterStemmer

import 'package:stemmer/stemmer.dart';

PorterStemmer stemmer = PorterStemmer();
stemmer.stem('running'); // outputs: run

SnowballStemmer

import 'package:stemmer/stemmer.dart';

SnowballStemmer stemmer = SnowballStemmer();
stemmer.stem('running'); // outputs: run

Case sentitive stemming

The default behaviour is to always return lowercase stemmed words. However, if you wish you can keep the original casing.

import 'package:stemmer/stemmer.dart';

SnowballStemmer stemmer = PorterStemmer();
stemmer.stem('Running'); // outputs: Run

About

A NLTK-port to do stemming in Dart / Flutter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages