protected void configureStopWords ( String stopWords ) { List < String > patterns = Lists . newArrayList ( ) ; for ( StringTokenizer st = new StringTokenizer ( stopWords ) ; st . hasMoreTokens ( ) ; ) { patterns . add ( getStopWordRegexp ( st . nextToken ( ) ) ) ; } String pattern = patterns . isEmpty ( ) ? ".\\A" // matches nothing : "(" + Joiner . on ( ' ' ) . join ( patterns ) + ")" ; setStopPattern ( pattern ) ; }
Configure the words that will stop .