sponsor Vim development Vim logo Vim Book Ad

stem-search : StmSrch is a reverse-stem searching script

 script karma  Rating 6/3, Downloaded by 391  Comments, bugs, improvements  Vim wiki

created by
Mitchell Bowden
 
script type
utility
 
description
Source and associated data files for testing hosted at:
http://github.com/msbmsb/stem-search.vim

StmSrch is a reverse-stem searching script. It implements the Porter stemming algorithm, by Martin Porter. It also handles irregular verbs and noun pluralizations.

This script can be useful for searching or scanning through corpus files.

Each word input to the :StmSrch command will be stemmed and then formulated in such a way as to match possible conjugations or pluralizations. Without any word given for input, it will attempt to stem the current word under the cursor. The matching is done using word boundaries so not just any substring will match.

For example:
- :StmSrch search
will match any of:
- search, searching, searches, searchers, searched, ...
and a string of words will work as well, matching in order:
- :StmSrch thieves are running from bunnies
will match strings of words like:
- thief was ran from bunny
- thieves be run from bunnies

Search hits are highlighted, and the highlight color can be modified by
editing the color in the s:StmSrchInit() function. The matches will stay
highlighted even if you search again using the normal '/' key. This is
useful for cases where you are browsing through a large corpus file, for
example and want to see the relative location of matches.

Use :ClrStmSrch to clear the highlighting for the StmSrch group.

For stemmed words, the search is greedy and may over match. This was useful
for my purposes. If more exact word endings are required, this can be added.

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

See doc/stem-search.vim.txt for more information about the script.

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

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
stem-search.vim 0.1 2010-09-04 6.0 Mitchell Bowden Initial upload
ip used for rating: 3.139.70.131

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github