some changes to relations and construct graph for freebase