public double similarityToLabel(LabelledDocument document, String label) {
        if (document.getReferencedContent() != null) {
            return similarityToLabel(document.getReferencedContent(), label);
        } else
            return similarityToLabel(document.getContent(), label);
    }
public double similarityToLabel ( LabelledDocument document , String label ) { if ( document . getReferencedContent ( ) != null ) { return similarityToLabel ( document . getReferencedContent ( ) , label ) ; } else return similarityToLabel ( document . getContent ( ) , label ) ; }
This method returns similarity of the document to specific label, based on mean value

@param document
@param label
@return