public int createIndex ( String tokenForm ) { int [ ] index = ( int [ ] ) tokenForm2index . get ( tokenForm ) ; if ( index == null ) { index = new int [ ] { nextAttributeID } ; tokenForm2index . put ( tokenForm , index ) ; nextAttributeID ++ ; } // add information about number of documents // for the term Integer integ = Integer . valueOf ( index [ 0 ] ) ; int [ ] docfreq = ( int [ ] ) this . index2docfreq . get ( integ ) ; if ( docfreq == null ) { docfreq = new int [ ] { 0 } ; index2docfreq . put ( integ , docfreq ) ; } docfreq [ 0 ] ++ ; return index [ 0 ] ; }
called from Document