Text this: Partitioning Technique for Transformation of Connected Graphs into Single-Row Network