Check whether an edge is a self-loop
Read graphs in the SemEval-2014 Shared Task format