public static IEnumerable <string> InitLineSegmentation(AnnotateImageResponse data)
        {
            var yMax = CoordinateHelpers.GetYMax(data);

            data = CoordinateHelpers.InvertAxis(data, yMax);

            // The first index refers to the auto identified words which belongs to a sings line
            var lines = data.TextAnnotations[0].Description.Split('\n');

            // gcp vision full text
            var rawText = new List <EntityAnnotation>();

            for (int i = 1; i < data.TextAnnotations.Count; i++)
            {
                rawText.Add(data.TextAnnotations[i]);
            }

            // reverse to use lifo, because array.shift() will consume 0(n)
            lines = lines.Reverse().ToArray();
            rawText.Reverse();

            var mergedArray = GetMergedLines(lines, rawText);

            var boundingPolygon = CoordinateHelpers.GetBoundingPolygon(mergedArray);

            var combinedPolygon = CoordinateHelpers.CombineBoundingPolygon(boundingPolygon);

            return(ConstructLineWithBoundingPolygon(combinedPolygon));
        }