code: public String[] decodeSequences(final String[] preds) {
      final List<String> decodedSequences = new ArrayList<>();
      for (String pred : preds) {
        pred = startPattern.matcher(pred).replaceAll("B-$1");
        pred = contPattern.matcher(pred).replaceAll("I-$1");
        pred = lastPattern.matcher(pred).replaceAll("I-$1");
        pred = unitPattern.matcher(pred).replaceAll("B-$1");
        pred = otherPattern.matcher(pred).replaceAll("O");
        decodedSequences.add(pred);
      }
      return decodedSequences.toArray(new String[decodedSequences.size()]);
    }
docs: Decode Sequences from an array of Strings.
  
  @param preds
  the sequences in an string array.
  @return the decoded sequences