docs: public double similarityToLabel(LabelledDocument document, String label) {
          if (document.getReferencedContent() != null) {
              return similarityToLabel(document.getReferencedContent(), label);
          } else
              return similarityToLabel(document.getContent(), label);
      }