Topic based classification and pattern identification in patents