Reducing cardinality of text