code: public void fitOnTexts(String[] texts) {
          String[] sequence;
          for (String text : texts) {
              if (documentCount == null)
                  documentCount = 1;
              else
                  documentCount += 1;
              if (charLevel) {
                  if (lower)
                      text = text.toLowerCase();
                  sequence = text.split("");
              } else {
                  sequence = textToWordSequence(text, filters, lower, split);
              }
              for (String word : sequence) {
                  if (wordCounts.containsKey(word))
                      wordCounts.put(word, wordCounts.get(word) + 1);
                  else
                      wordCounts.put(word, 1);
              }
              Set<String> sequenceSet = new HashSet<>(Arrays.asList(sequence));
              for (String word: sequenceSet) {
                  if (wordDocs.containsKey(word))
                      wordDocs.put(word, wordDocs.get(word) + 1);
                  else
                      wordDocs.put(word, 1);
              }
          }
          Map<String, Integer> sortedWordCounts = reverseSortByValues((HashMap) wordCounts);
  
          ArrayList<String> sortedVocabulary = new ArrayList<>();
          if (outOfVocabularyToken != null)
              sortedVocabulary.add(outOfVocabularyToken);
          for (String word: sortedWordCounts.keySet()) {
              sortedVocabulary.add(word);
          }
  
          for (int i = 0; i < sortedVocabulary.size(); i++)
              wordIndex.put(sortedVocabulary.get(i), i+1);
  
          for(String key : wordIndex.keySet()){
              indexWord.put(wordIndex.get(key), key);
          }
  
          for (String key: wordDocs.keySet())
              indexDocs.put(wordIndex.get(key), wordDocs.get(key));
      }
docs: Fit this tokenizer on a corpus of texts.
  
  @param texts array of strings to fit tokenizer on.