Efficient pruning of large knowledge graphs