Jointly Extracting Relations with Class Ties via Effective Deep Ranking