Help language development. Donate to The Perl Foundation

Lingua::Stopwords cpan:CHSANCH last updated on 2018-03-30


Build Status


Lingua::Stopwords - Stop words for several languages.


use Lingua::Stopwords;

# Get the stopwords list, the first parameter is the iso code language and the second is the list type
my $stopwords = get-stopwords('en', 'snowball');

my $text = "This is a test and it has some stopwords. This is a test for a Perl 6 module to extract them";

# It will return a Set of words without the stopwords
my $text-parsed = $text.subst(/<:punct>/, '', :g).words.grep: { !$stopwords{$_}};

say $text-parsed.join(' '); # OUTPUT: This test stopwords This test Perl 6 module extract

# $stopwords is a a SetHash, so you can add more words

$text-parsed = $text.subst(/<:punct>/, '', :g).words.grep: { !$stopwords{$_}};

say $text-parsed.join(' '); #OUTPUT: This test stopwords This test 6 module extract



This module provides Stopwords for several languages.

Supported languages

For each language, this module provides Stopwords list from different sources. The all type list contained all the list available for the language.

Language ISO code List type
Catalan ca ranks-nl
Danish da snowball, ranks-nl, all
Dutch nl snowball, ranks-nl, all
English en snowball, ranks-nl, all
Finnish fi snowball, ranks-nl, all
French fr snowball, ranks-nl, all
Galician gl ranks-nl
German de snowball, ranks-nl, all
Hebrew he ranks-nl
Hungarian hu snowball, ranks-nl, all
Italian it snowball, ranks-nl, all
Norwegian no snowball, ranks-nl, all
Portuguese pt snowball, ranks-nl, all
Russian ru snowball, ranks-nl, all
Spanish es snowball, ranks-nl, all
Swedish sv snowball, ranks-nl, all


Fork this module on GitHub:


To report bugs or request features, please use


This module was inspired by Perl 5's module Lingua::Stopwords.

The snowball stoplists by this module were created as part of the [Snowball project](see

The Ranks NL stoplists by this module were created by Ranks NL.

Christian Sánchez [email protected].


You can use and distribute this module under the terms of the The Artistic License 2.0. See the LICENSE file included in this distribution for complete details.

The META6.json file of this distribution may be distributed and modified without restrictions or attribution.