Sentence filtering by existence of relations in instances