Using shortest path to find out the relations between categories.
Using scala-graph as graph data structure.