public void fitOnSequences ( Integer [ ] [ ] sequences ) { documentCount += 1 ; for ( Integer [ ] sequence : sequences ) { Set < Integer > sequenceSet = new HashSet <> ( Arrays . asList ( sequence ) ) ; for ( Integer index : sequenceSet ) indexDocs . put ( index , indexDocs . get ( index ) + 1 ) ; } }
Fit this tokenizer on a corpus of word indices