01: /*
02: * StopTable.java
03: *
04: * Created on 23. Juli 2003, 19:20
05: */
06:
07: package org.contineo.core.text.analyze;
08:
09: import java.util.Hashtable;
10:
11: /**
12: * This class creates a hashtable filled with stop words.
13: * @author Michael Scholz
14: * @version 1.0
15: */
16: public class StopTable {
17: /**
18: * This method transforms the array of stop words into a hashtable of stop words.
19: * @param stopwords - Array of stop words.
20: */
21: public final static Hashtable setStopWords(String[] stopwords) {
22: Hashtable<String, String> stoptable = new Hashtable<String, String>(
23: stopwords.length);
24:
25: for (int i = 0; i < stopwords.length; i++) {
26: stoptable.put(stopwords[i], stopwords[i]);
27: }
28:
29: return stoptable;
30: } // end method setStopWords
31:
32: } // end class StopTable
|