/** * Returns a lower case list of stopwords loaded by this resource, using the specified stopword * list */ public Collection<String> getStopwords(StopwordList list) throws IOException { if (list == StopwordList.FOX) { return loadStoplist("FoxStoplist.txt"); } else if (list == StopwordList.RANKS_NL) { return loadStoplist("RanksNlStoplist.txt"); } else if (list == StopwordList.LONG) { return loadStoplist("LongStoplist.txt"); } else if (list == StopwordList.MYSQL) { return loadStoplist("MySqlStoplist.txt"); } return stopwords; }
/** * Returns a lower case list of stopwords loaded by this resource, using the specified stopword * list */ public Collection<String> getStopwords(StopwordList list) throws IOException { if (list == StopwordList.FOX) { return loadStoplist("FoxStoplist.txt"); } else if (list == StopwordList.RANKS_NL) { return loadStoplist("RanksNlStoplist.txt"); } else if (list == StopwordList.LONG) { return loadStoplist("LongStoplist.txt"); } else if (list == StopwordList.MYSQL) { return loadStoplist("MySqlStoplist.txt"); } return stopwords; }
@Override protected boolean doInitialize(ResourceSpecifier specifier, Map<String, Object> additionalParams) throws ResourceInitializationException { try { stopwords = loadStoplist("SmartStoplist.txt"); } catch (IOException ioe) { getMonitor().error("Unable to read default stop words from SmartStoplist.txt", ioe); throw new ResourceInitializationException(ioe); } return true; }
@Override protected boolean doInitialize(ResourceSpecifier specifier, Map<String, Object> additionalParams) throws ResourceInitializationException { try { stopwords = loadStoplist("SmartStoplist.txt"); } catch (IOException ioe) { getMonitor().error("Unable to read default stop words from SmartStoplist.txt", ioe); throw new ResourceInitializationException(ioe); } return true; }