def get_text(analysis):
    """
    Gets the resultant text of the image supplied
    
    Arguments:
        analysis {JSON} -- JSON form of the final response 
        that contains the text detected
    
    Returns:
        [list] -- Returns the polygon data, and the text detected 
    """


    if('recognitionResult' in analysis):
        polygons = [(line["boundingBox"], line["text"])for line in analysis["recognitionResult"]["lines"]]
        text = [line['text'] for line in analysis["recognitionResult"]["lines"]]
        return (polygons, text)
    else:
        return('Sorry the image that you sent cannot be \
        recognised! Please try with another image.')