org.basex.util.ft
Class StopWords

java.lang.Object
  extended by org.basex.util.hash.ASet
      extended by org.basex.util.hash.TokenSet
          extended by org.basex.util.ft.StopWords
All Implemented Interfaces:
java.lang.Iterable<byte[]>

public final class StopWords
extends TokenSet

Simple stop words set for full-text requests.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.util.hash.TokenSet
keys
 
Fields inherited from class org.basex.util.hash.ASet
bucket, next, size
 
Constructor Summary
StopWords()
          Default constructor.
StopWords(Data data, java.lang.String file)
          Constructor, reading stopword list from disk.
 
Method Summary
 void comp(Data data)
          Compiles the stop word list.
 boolean read(IO file, boolean exclude)
          Reads a stop words file.
 
Methods inherited from class org.basex.util.hash.TokenSet
add, add, clear, contains, delete, hash, id, iterator, key, put, read, rehash, toString, write
 
Methods inherited from class org.basex.util.hash.ASet
checkSize, isEmpty, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StopWords

public StopWords()
Default constructor.


StopWords

public StopWords(Data data,
                 java.lang.String file)
          throws java.io.IOException
Constructor, reading stopword list from disk. And creating database stopword file.

Parameters:
data - data reference
file - stopword list file
Throws:
java.io.IOException - I/O exception
Method Detail

comp

public void comp(Data data)
Compiles the stop word list.

Parameters:
data - data reference

read

public boolean read(IO file,
                    boolean exclude)
Reads a stop words file.

Parameters:
file - file reference
exclude - exclude stop words
Returns:
success flag