Reputation: 11
I am sending a multiple sentence at a time as a table and using inspect_content to find personal information for each sentences.
When I use the inspect_content function, I could receive a series of findings with various information.
However, I could not find which row the each inspect result came from.
I have to deliver both original text and the location range of each target info types.
Thank you for your precious time ^^
Upvotes: 1
Views: 75
Reputation: 995
There is a rowIndex for inspect content.
Example request
{"item":{"table":{"headers":[{"name":"column1"}],"rows":[{"values":[{"stringValue":"not an email"}]},{"values":[{"stringValue":"[email protected]"}]}]}}}
Example response (see the table location)
{
"result": {
"findings": [
{
"infoType": {
"name": "EMAIL_ADDRESS"
},
"likelihood": "LIKELY",
"location": {
"byteRange": {
"end": "14"
},
"codepointRange": {
"end": "14"
},
"contentLocations": [
{
"recordLocation": {
"fieldId": {
"name": "column1"
},
"tableLocation": {
"rowIndex": "1"
}
}
}
]
},
"createTime": "2022-01-05T18:15:04.413Z",
"findingId": "2022-01-05T18:15:04.422252Z312288285164444315"
}
]
}
}
Upvotes: 1