Пример #1
0
 public StopWordsRemover(
     boolean useScientificStopWords, int minWordLength, String lang, boolean local) {
   this.useScientificStopWords = useScientificStopWords;
   this.local = local;
   this.lang = lang;
   this.minWordLength = minWordLength;
   this.stopwordsForOneLanguage = new ArrayList(Stopwords.getStopWords(lang, local));
   nbStopWordsShort = Math.min(200, Math.max(0, (stopwordsForOneLanguage.size() - 1)));
   nbStopWords = Math.min(5000, Math.max(0, (stopwordsForOneLanguage.size() - 1)));
   try {
     init();
   } catch (IOException ex) {
     Logger.getLogger(StopWordsRemover.class.getName()).log(Level.SEVERE, null, ex);
   }
 }