stem-search


Ⅰ. 插件描述

Reverse stemming search for vim.

Ⅱ. 基本信息

创建日期:  2010-05-06
使用用户:  1
Github星:  2
插件作者:  Mitchell Bowden

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'msbmsb/stem-search'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'msbmsb/stem-search'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'msbmsb/stem-search'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://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
  1. match any of:
  • search, searching, searches, searchers, searched, ...
  1. a string of words will work as well, matching in order:
  • :StmSrch thieves are running from bunnies
  1. 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.


Mitchell Bowden
mitchellbowden -at- gmail -.com-

添加新评论