A general strategy to determine the congruence between a hierarchical and a non-hierarchical classification