Skip to content

Instantly share code, notes, and snippets.

@codezakh
Created August 17, 2017 21:03
Show Gist options
  • Save codezakh/6ea1c2af737a76af04bab6f57af55d5b to your computer and use it in GitHub Desktop.
Save codezakh/6ea1c2af737a76af04bab6f57af55d5b to your computer and use it in GitHub Desktop.
An example response returned by the microsoft cognition api when using OCR.
{
"language": "en",
"textAngle": 0.0,
"orientation": "Up",
"regions": [
{
"boundingBox": "22,25,1389,1863",
"lines": [
{
"boundingBox": "22,25,1389,49",
"words": [
{
"boundingBox": "22,26,40,38",
"text": "In"
},
{
"boundingBox": "76,26,57,38",
"text": "the"
},
{
"boundingBox": "144,26,95,48",
"text": "early"
},
{
"boundingBox": "250,26,85,48",
"text": "days"
},
{
"boundingBox": "347,25,41,38",
"text": "of"
},
{
"boundingBox": "395,26,58,38",
"text": "the"
},
{
"boundingBox": "466,25,79,39",
"text": "13th"
},
{
"boundingBox": "558,25,155,49",
"text": "Century"
},
{
"boundingBox": "725,25,153,49",
"text": "Ghengis"
},
{
"boundingBox": "891,26,102,37",
"text": "Kahn"
},
{
"boundingBox": "1006,25,195,49",
"text": "conquered"
},
{
"boundingBox": "1214,26,46,37",
"text": "all"
},
{
"boundingBox": "1272,26,41,38",
"text": "of"
},
{
"boundingBox": "1319,26,92,38",
"text": "Asia."
}
]
},
{
"boundingBox": "167,86,1087,49",
"words": [
{
"boundingBox": "167,87,61,38",
"text": "Ilis"
},
{
"boundingBox": "240,87,131,48",
"text": "empire"
},
{
"boundingBox": "382,87,170,37",
"text": "stretched"
},
{
"boundingBox": "565,88,87,37",
"text": "5000"
},
{
"boundingBox": "665,87,95,38",
"text": "miles"
},
{
"boundingBox": "774,86,88,39",
"text": "from"
},
{
"boundingBox": "877,87,175,48",
"text": "Budapest"
},
{
"boundingBox": "1063,91,35,34",
"text": "to"
},
{
"boundingBox": "1110,87,144,48",
"text": "Beijing."
}
]
},
{
"boundingBox": "292,152,853,56",
"words": [
{
"boundingBox": "292,153,60,42",
"text": "He"
},
{
"boundingBox": "366,152,133,43",
"text": "didn't"
},
{
"boundingBox": "512,153,102,42",
"text": "have"
},
{
"boundingBox": "628,165,23,30",
"text": "a"
},
{
"boundingBox": "666,152,107,55",
"text": "High"
},
{
"boundingBox": "787,153,144,42",
"text": "School"
},
{
"boundingBox": "945,153,200,55",
"text": "Diploma."
}
]
},
{
"boundingBox": "88,218,1259,49",
"words": [
{
"boundingBox": "88,219,39,37",
"text": "In"
},
{
"boundingBox": "141,218,80,45",
"text": "fact,"
},
{
"boundingBox": "234,230,44,26",
"text": "no"
},
{
"boundingBox": "290,230,65,26",
"text": "one"
},
{
"boundingBox": "366,219,82,37",
"text": "with"
},
{
"boundingBox": "461,230,20,26",
"text": "a"
},
{
"boundingBox": "494,218,81,49",
"text": "high"
},
{
"boundingBox": "588,219,117,37",
"text": "school"
},
{
"boundingBox": "716,219,152,48",
"text": "diploma"
},
{
"boundingBox": "881,219,62,37",
"text": "has"
},
{
"boundingBox": "955,230,80,27",
"text": "ever"
},
{
"boundingBox": "1046,219,195,48",
"text": "conquered"
},
{
"boundingBox": "1253,219,94,38",
"text": "Asia."
}
]
},
{
"boundingBox": "247,290,938,48",
"words": [
{
"boundingBox": "247,290,69,38",
"text": "Not"
},
{
"boundingBox": "328,301,65,27",
"text": "one"
},
{
"boundingBox": "405,290,80,48",
"text": "high"
},
{
"boundingBox": "499,290,116,38",
"text": "school"
},
{
"boundingBox": "627,290,167,48",
"text": "graduate"
},
{
"boundingBox": "807,290,62,37",
"text": "has"
},
{
"boundingBox": "881,301,82,27",
"text": "even"
},
{
"boundingBox": "977,301,97,27",
"text": "come"
},
{
"boundingBox": "1086,290,99,38",
"text": "close."
}
]
},
{
"boundingBox": "53,1521,955,102",
"words": [
{
"boundingBox": "53,1521,279,102",
"text": "Drop"
},
{
"boundingBox": "394,1521,210,91",
"text": "OUC"
},
{
"boundingBox": "655,1521,353,102",
"text": "Today"
}
]
},
{
"boundingBox": "53,1654,767,90",
"words": [
{
"boundingBox": "53,1654,210,90",
"text": "and"
},
{
"boundingBox": "324,1655,496,89",
"text": "success"
}
]
},
{
"boundingBox": "53,1786,909,102",
"words": [
{
"boundingBox": "53,1786,102,92",
"text": "Is"
},
{
"boundingBox": "215,1787,137,91",
"text": "on"
},
{
"boundingBox": "413,1786,205,91",
"text": "cne"
},
{
"boundingBox": "678,1786,284,102",
"text": "unau!"
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment