A semantic matching energy function for learning with multi-relational data