0.01
No commit activity in last 3 years
No release in over 3 years
Contains stop words lists and methods to extract keywords from strings.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
>= 0
>= 0
>= 0
>= 0

Runtime

 Project Readme

Vidibus::Words Build Status

This gem provides handling of words. It ships with a list of stop words in English, German, and Spanish and allows extraction of keywords from a string.

This gem is part of Vidibus, an open source toolset for building distributed (video) applications.

Installation

Add gem 'vidibus-words' to your Gemfile. Then call bundle install on your console.

Usage

Extracting keywords

To return a list of keywords from a given text, ordered by occurrence, enter:

input = Vidibus::Words.new('To tell a long story short, it\'s necessary to tell it briefly without fluff!')
input.keywords
 => ["tell", "long", "story", "short", "necessary", "briefly", "fluff"]

To return keywords of a certain locale only, you may set it as filter:

input = Vidibus::Words.new('To tell a long story short, it\'s necessary to tell it briefly without fluff!')
input.locale = :de
input.keywords
 => ["to", "tell", "a", "long", "story", "short", "it's", "necessary", "it", "briefly", "without", "fluff"] 

Stopwords lists

You may obtain stopwords easily:

Vidibus::Words.stopwords      # => Stopwords for all available locales
Vidibus::Words.stopwords(:en) # => English stopwords only

Copyright

© 2010-2012 Andre Pankratz. See LICENSE for details.