public static GenericOcrResponse Map(WindowsOcrResult ocrResult)
 {
     return(new GenericOcrResponse
     {
         SummaryText = ocrResult.Text,
         Language = ocrResult.Language,
         Detections = ocrResult.Lines.SelectMany(l => l.Words).Select(w => Get(w)).ToList()
     });
 }
        public static WindowsOcrResult FromDynamic(dynamic ocrResult)
        {
            var result = new WindowsOcrResult();

            result.Lines = new List <OcrLine>();
            foreach (var line in ocrResult.Lines)
            {
                result.Lines.Add(OcrLine.FromDynamic(line));
            }
            result.Text = ocrResult.Text;

            return(result);
        }