A Unified Framework for Rank-based Evaluation Metrics for Link Prediction in Knowledge Graphs