Generalized Framework for Syntax-based Relation Mining