docs: public Document fromTokens(@NonNull Iterable<String> tokens, @NonNull Language language) {
        StringBuilder content = new StringBuilder();
        List<Span> tokenSpans = new ArrayList<>();
        for (String token : tokens) {
           tokenSpans.add(new Span(content.length(), content.length() + token.length()));
           content.append(token);
           if (language.usesWhitespace()) {
              content.append(" ");
           }
        }
        Document doc = new Document(null, content.toString().trim(), defaultLanguage);
        for (int idx = 0; idx < tokenSpans.size(); idx++) {
           doc.annotationBuilder()
              .type(Types.TOKEN)
              .bounds(tokenSpans.get(idx))
              .attribute(Types.INDEX, idx).createAttached();
        }
        doc.getAnnotationSet().setIsCompleted(Types.TOKEN, true, "PROVIDED");
        return doc;
     }