/** * Returns true if the given string is a stop word. * * @param word the word to test * @return true if the word is a stopword */ @Override protected boolean is(String word) { boolean result; result = false; for (StopwordsHandler handler: m_Stopwords) { if (handler.isStopword(word)) { result = true; break; } } return result; } }
/** * Returns true if the given string is a stop word. * * @param word the word to test * @return true if the word is a stopword */ @Override protected boolean is(String word) { boolean result; result = false; for (StopwordsHandler handler: m_Stopwords) { if (handler.isStopword(word)) { result = true; break; } } return result; } }
/** * Runs the stopwords algorithm over the given tokens and returns the result. * * @param tokens the tokens to analyze * @return the results for the tokens (stopwords yes/no) * @throws Exception if tokenization/analysis fails */ protected Boolean[] useStopwords(String[] tokens) throws Exception { Boolean[] result; int i; result = new Boolean[tokens.length]; for (i = 0; i < tokens.length; i++) result[i] = m_Stopwords.isStopword(tokens[i]); return result; }
/** * Runs the stopwords algorithm over the given tokens and returns the result. * * @param tokens the tokens to analyze * @return the results for the tokens (stopwords yes/no) * @throws Exception if tokenization/analysis fails */ protected Boolean[] useStopwords(String[] tokens) throws Exception { Boolean[] result; int i; result = new Boolean[tokens.length]; for (i = 0; i < tokens.length; i++) result[i] = m_Stopwords.isStopword(tokens[i]); return result; }
if (m_stopwordsHandler.isStopword(word)) { continue;
if (m_stopwordsHandler.isStopword(word)) { continue;
if (m_StopwordsHandler.isStopword(word)) { continue;
if (m_StopwordsHandler.isStopword(word)) { continue;
if (m_StopwordsHandler.isStopword(word)) { continue;
if (m_StopwordsHandler.isStopword(word)) { continue;
processed[n][i] = new boolean[data.length]; for (m = 0; m < data.length; m++) processed[n][i][m] = m_Stopwords.isStopword(data[m]); } catch (Exception e) { processed[n][i] = new boolean[]{false};
processed[n][i] = new boolean[data.length]; for (m = 0; m < data.length; m++) processed[n][i][m] = m_Stopwords.isStopword(data[m]); } catch (Exception e) { processed[n][i] = new boolean[]{false};