简体   繁体   中英

List of stop words for Ruby

I am writing a search engine using the Lucene Java framework .

What I want to do is to create an index of Ruby source code files. For that I would like to have the option of using a stop word filter, ie I want the stop words of the ruby language be ignored when indexing the files.

--> Does anyone know of a nice complete list of Ruby stop words? (eg def, end, module, ...)

Surprisingly enough, Google did not provide me with an answer... So any help would be appreciated!

alias   and     BEGIN   begin   break   case    class   def     defined?
do      else    elsif   END     end     ensure  false   for     if 
in      module  next    nil     not     or      redo    rescue  retry 
return  self    super   then    true    undef   unless  until   when 
while   yield

From Ruby QuickRef .

For what it's worth, these are generally called "reserved words" - and I found this list by Googling for Ruby reserved words .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM