Adapting graph mining techniques for text classification