public static AwsOcrResponse Get(DetectTextResponse detectTextResponse) { AwsOcrResponse ocrResponse = new AwsOcrResponse(); ocrResponse.TextModelVersion = detectTextResponse.TextModelVersion; ocrResponse.TextDetections = detectTextResponse.TextDetections.Select(t => MapDetection(t)).ToList(); return(ocrResponse); }
public static GenericOcrResponse Map(AwsOcrResponse awsResponse) { var response = new GenericOcrResponse(); response.SummaryText = string.Join(" ", awsResponse.TextDetections.Select(td => td.DetectedText)); response.Detections = awsResponse.TextDetections.Select(td => Get(td)).ToList(); return(response); }