Implementation of Porter stemming algorithm in vim script
Vim script
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
doc
plugin
.gitignore
README

README

PorterStem is a vim script that implements the Porter stemming algorithm, by Martin Porter, details of which can be found at: http://tartarus.org/~martin/PorterStemmer/

The main function outputs the single string of the stem, and the script only
echoes the output to the screen. This script, while it can be used as-is
if you want to know what the stem for a word is, is mostly a container for 
the algorithm implementation in vim script.

PorterStem command syntax:
-  :PorterStem (<word>)*

Each word input to the :PorterStem command will be stemmed and processed by
the ProcessStem function, that by default simply echoes to the screen.
Without any word given for input, it will attempt to stem the current word 
under the cursor via expand('<cword>').

For example:
-  :PorterStem searching
will output:
-  search
and a string of words will work as well, matching in order:
-  :PorterStem thieves are running from the bunny
will output:
-  thiev are run from bunni

Running :PorterTest <test-file> <expected-results-file> will run each 
word in <test-file> and match the stem result to the same line in the 
<expected-results-file>, showing if any are incorrect stem matches.
Provided in the github repository are two files voc.txt and output.txt 
from Martin Porter's site providing a set of test words.

----
To use this vim script, add it to ~/.vim/plugin/

See doc/porter-stem.vim.txt for more information about the script.
See http://github.com/msbmsb/stem-search.vim for a script that uses this method for reverse-stem searching in a file.

----