code: public int[] buildSuffixArray(T[] tokens) {
          final int length = tokens.length;
          /*
           * Allocate slightly more space, some suffix construction strategies need it and
           * we don't want to waste space for multiple symbol mappings.
           */
          input = new int[length + SuffixArrays.MAX_EXTRA_TRAILING_SPACE];
  
          //System.out.println("Assigning token ids ...");
  
          /*
           * We associate every token to an id, all `equal´ tokens to the same id.
           * The suffix array is built using only the the ids.
           */
          tokIDs = new TreeMap<>(comparator);
  
          for (int i = 0; i < length; i++) {
              tokIDs.putIfAbsent(tokens[i], i);
              input[i] = tokIDs.get(tokens[i]);
          }
  
          //System.out.println("Token ids assigned.");
  
          return delegate.buildSuffixArray(input, 0, length);
      }
docs: Construct a suffix array for a given generic token array.