@Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        Map<AnnotationClass, List<Annotations>> annotations = getAll();
        Iterator<Map.Entry<AnnotationClass,List<Annotations>>> mapIterator = annotations.entrySet().iterator();
        while (mapIterator.hasNext()) {
            Map.Entry<AnnotationClass, List<Annotations>> entry = mapIterator.next();
            Iterator<Annotations> annoIterator = entry.getValue().iterator();
            sb.append(entry.getKey()).append(" : [");

            while (annoIterator.hasNext()) {
                Annotations annotation = annoIterator.next();
                sb.append("\"").append(annotation.getSubString()).append("\"");
                dumpAnnotation(sb, annotation);
                if(annoIterator.hasNext()) {
                    sb.append(",");
                }
            }
            sb.append("]");
            if(mapIterator.hasNext()) {
                sb.append(", ");
            }
        }
        sb.append(")");
        return sb.toString();
    }
Returns all spans that consists of the term given. If no span with that term exists,
the empty list is returned.
container-search/src/main/java/com/yahoo/text/interpretation/Interpretation.java