this.selectedAttributeName = selectedAttributeName;
}
private HashSet<String> prepareStopwords() {
// initialize stopwords
Stopwords stops = new Stopwords();
if (getStopList() != null) {
try {
if (getStopList().exists() && !getStopList().isDirectory()) {
stops.read(getStopList());
}
} catch (Exception e) {
e.printStackTrace();
}
}
HashSet<String> result = new HashSet<String>();
Enumeration<String> words = (Enumeration<String>)stops.elements();
while (words.hasMoreElements()) {
result.add(words.nextElement());
}
return result;
}