Output unique label and class pairs per document.

See NCBO-972.