question: public void train ( Reader aReader ) throws IOException { BufferedReader in = new BufferedReader ( aReader ) ; String line = in . readLine ( ) ; while ( line != null ) { Matcher m = WORD_PATTERN . matcher ( line . toLowerCase ( ) ) ; while ( m . find ( ) ) { String word = m . group ( ) ; AtomicInteger count = nWords . get ( word ) ; if ( count == null ) { count = new AtomicInteger ( 0 ) ; nWords . put ( word , count ) ; } count . incrementAndGet ( ) ; } line = in . readLine ( ) ; } }
target:  Read words from the given reader and count their occurrences.